\documentclass{book}
%\newcommand{\VolumeName}{Volume 2: Axiom Users Guide}
%\input{bookheader.tex}
\pagenumbering{arabic}
\mainmatter
\setcounter{chapter}{0} % Chapter 1

\usepackage{makeidx}
\makeindex
\begin{document}
\begin{verbatim}
\start
Date: Sat, 1 Sep 2007 14:39:26 -0400
From: Bill Page
To: Stephen Watt
Subject: Aldor source code release!

Dear Aldor and Axiom developers and users;

I would like to congratulate Stephen Watt and the team at aldor.org
for achieving their goal of releasing Aldor in source code form as
planned!

See: http://www.aldor.org

-------

Source Release

Aldor sources are now available for non-commercial purposes, under the
Aldor Public License Version 2.0:
http://www.aldor.org/AldorPublicLicense2_0.html . The sources may be
retrieved from the SVN server (see "Development" below) and following
the instructions in the README.building file. Documentation for the
language and libraries is available from the Aldor Wiki documentation
page: http://www.aldor.org/wiki/index.php/Aldor_Documentation .
Applications requiring other licensing terms should contact 'proposals
at aldor.org'.

...

 Public Subversion Repository

http://aquarium.aldor.csd.uwo.ca/svn/trunk

To obtain a full source tree do:

   svn co http://aquarium.aldor.csd.uwo.ca/svn/trunk

\start
Date: Sat, 01 Sep 2007 23:36:02 +0200
From: Gregory Vanuxem
To: Bill Page
Subject: Re: [Aldor-l] Aldor source code release!
Cc: Stephen Watt

Many thanks.

Greg

Le samedi 01 septembre 2007 =E0 14:39 -0400, Bill Page a =E9crit :
> Dear Aldor and Axiom developers and users;
>
> I would like to congratulate Stephen Watt and the team at aldor.org
> for achieving their goal of releasing Aldor in source code form as
> planned!
>
> See: http://www.aldor.org
>
> -------
>
> Source Release
>
> Aldor sources are now available for non-commercial purposes, under the
> Aldor Public License Version 2.0:
> http://www.aldor.org/AldorPublicLicense2_0.html . The sources may be
> retrieved from the SVN server (see "Development" below) and following
> the instructions in the README.building file. Documentation for the
> language and libraries is available from the Aldor Wiki documentation
> page: http://www.aldor.org/wiki/index.php/Aldor_Documentation .
> Applications requiring other licensing terms should contact 'proposals
> at aldor.org'.
>
> ...
>
>  Public Subversion Repository
>
> http://aquarium.aldor.csd.uwo.ca/svn/trunk
>
> To obtain a full source tree do:
>
>    svn co http://aquarium.aldor.csd.uwo.ca/svn/trunk

\start
Date: Sun, 2 Sep 2007 08:48:31 +1000
From: Alasdair McAndrew
To: list
Subject: A student comment

As some of you may know, this semester I am using Axiom in a cryptography
subject.  I have asked my students to comment briefly on what they
like/dislike about it.  Some like it, and find it "intuitive", while others
dislike it.  One comment in particular was:

"The lack of Windows like interface make this package look and feel
second rate.
The need to use )command is annoying in that the command line is
already parsed to handle the maths, the lack of command parsing shows
a lack of interest in an interface."

This student also complained about the lack of a native Mac version.

Just thought you'd like to know.

\start
Date: Sat, 1 Sep 2007 19:12:01 -0500
From: Tim Daly
To: Alasdair McAndrew
Subject: A student comment

Alasdair,

"The lack of Windows like interface makes this package look and feel
 second rate."

Great. I await his Windows-like interface patches on the mailing list.




"The need to use )command is annoying in that the command line is
 already parsed to handle the maths, the lack of command parsing shows
 a lack of interest in an interface."

Typing help is ambiguous if you first type:

  help(x) == x

followed by 

  help Fraction

but is not ambiguous if you type

  )help Fraction

The lack of the student interest in learning parsing techniques is annoying
and shows a lack of interest in computer science.




"The student also complained about the lack of a native Mac version."

Developing open source requires 2 things: source code and time.
The student has both. Ask him to let me know when he has the Mac
version working.

\start
Date: Sat, 1 Sep 2007 19:17:09 -0500
From: Tim Daly
To: Alasdair McAndrew
Subject: Algebra documentation

I have recently uploaded )help files to document the following algebra:

  RealSolvePackage
  LinearOrdinaryDifferentialOperator2
  LinearOrdinaryDifferentialOperator1
  LinearOrdinaryDifferentialOperator
  LiePolynomial
  LieExponentials
  Library
  LexTriangularPackage
  KeyedAccessFile
  Kernel
  IntegerNumberTheoryFunctions
  IntegerLinearDependence
  RomanNumeral
  Integer
  HexadecimalExpansion
  Heap
  GroebnerFactorizationPackage
  GeneralSparseTable
  FullPartialFractionExpansion
  Fraction
  Float
  FlexibleArray
  FileName
  File
  FactoredFunctions2
  Factored

They are automatically generated from the spad files during system build.
You can query any of these using either the full name or the abbreviation:

  )help Integer
  )help INT

There is more algebra documentation to follow at the end of the next
testing cycle.

\start
Date: Sat, 1 Sep 2007 20:31:08 -0400
From: Alfredo Portes
To: Alasdair McAndrew
Subject: Re: A student comment

Hi Alasdair,

Did the Windows installer work fine for you and your students?

On 9/1/07, Alasdair McAndrew wrote:
> As some of you may know, this semester I am using Axiom in a cryptography
> subject.  I have asked my students to comment briefly on what they
> like/dislike about it.  Some like it, and find it "intuitive", while others
> dislike it.  One comment in particular was:
>
> "The lack of Windows like interface make this package look and feel
>  second rate.
>  The need to use )command is annoying in that the command line is
>  already parsed to handle the maths, the lack of command parsing shows
>  a lack of interest in an interface."
>
> This student also complained about the lack of a native Mac version.
>
> Just thought you'd like to know.

\start
Date: 01 Sep 2007 19:38:44 -0500
From: Gabriel Dos Reis
To: Alasdair McAndrew
Subject: Re: A student comment

Alasdair McAndrew writes:

| As some of you may know, this semester I am using Axiom in a cryptography
| subject.  I have asked my students to comment briefly on what they
| like/dislike about it.  Some like it, and find it "intuitive", while others
| dislike it.  One comment in particular was:
| 
| "The lack of Windows like interface make this package look and feel
| second rate.

I can only agree -- sadly.

[...]

| This student also complained about the lack of a native Mac version.

I believe Axiom.build-improvements has been reported many times to
build on Mac.  FriCAS, based on Axiom.wh-sandbox, which in turn is
based on Axiom.build-improvements is known to build on Mac.  I had a
report yesterday that OpenAxiom can be successfully built on Mac as
well.

| Just thought you'd like to know.

\start
Date: Sat, 1 Sep 2007 23:14:46 -0400
From: Bill Page
To: Alasdair McAndrew
Subject: Re: A student comment

On 9/1/07, Alasdair McAndrew wrote:
> As some of you may know, this semester I am using Axiom in a
> cryptography subject.  I have asked my students to comment briefly
> on what they like/dislike about it.  Some like it, and find it "intuitive",
> while others dislike it.

As a "first impression" I think this feedback is quite valuable. I
wonder how these same students will feel at the end of a semester of
using Axiom. Do you plan to ask them again? I would also like to know
exactly what aspects of Axiom some students found "intuitive".

> One comment in particular was:
>
> "The lack of Windows like interface make this package look and feel
>  second rate. The need to use )command is annoying in that the
>  command line is already parsed to handle the maths, the lack of
> command parsing shows a lack of interest in an interface."
>

Actually I agree with that sentiment. I think the decision to
distinguish commands by this peculiar syntactic convention was
probably already "out of fashion" even at the time Axiom was
originally implemented. Plus this makes it difficult to extend the
user interface in a natural manner simply by writing new library code.
Certainly there are some reasonable alternatives that would be more
nature and extensible.

It seems quite fair to claim that during most of Axiom's "nine lives"
user interface was given lower priority than the implementation of
mathematical algorithms. (The work that NAG did on the Techexplorer
interface for Windows was an exception, unfortunately that was lost
when the commercial version died.) Even the output of the Spad library
compiler demonstrates this apparent "lack of interest" in user
interface. As a research platform I suppose this made a certain kind
of sense but for the use you are trying to make of Axiom, I think it
could be a problem.

> This student also complained about the lack of a native Mac version.
>

For a better user interface experience I would recommend using Axiom
within Sage. Sage provides a browser-based notebook interface that
should be familiar to most students these days. And for cryptography I
think Sage's common interface to other packages like singular and gap
might also be of interest. It is very easy to install the Axiom
package for Sage on both Linux and Mac, though Windows is a more
difficult problem - usually solved by running Linux in a virtual
machine under Windows.

> Just thought you'd like to know.
>

Thanks. I would like to know more. But apparently some people here
really do not care to know. :-( The suggestion to turn these comments
back on the student surely can not be of much use since it seems
rather unlikely to me that cryptography students will be motivated to
solve these sort problems with the Axiom user interface when there are
so many other alternatives available.

\start
Date: Sat, 01 Sep 2007 21:03:24 -0700
From: Ed Borasky
To: list
Subject: Re: A student comment

Bill Page wrote:
> For a better user interface experience I would recommend using Axiom
> within Sage. Sage provides a browser-based notebook interface that
> should be familiar to most students these days. And for cryptography I
> think Sage's common interface to other packages like singular and gap
> might also be of interest. It is very easy to install the Axiom
> package for Sage on both Linux and Mac, though Windows is a more
> difficult problem - usually solved by running Linux in a virtual
> machine under Windows.
> 
>> Just thought you'd like to know.
>>
> 
> Thanks. I would like to know more. But apparently some people here
> really do not care to know. :-( The suggestion to turn these comments
> back on the student surely can not be of much use since it seems
> rather unlikely to me that cryptography students will be motivated to
> solve these sort problems with the Axiom user interface when there are
> so many other alternatives available.

Well ... I don't know a heck of a lot about cryptography, but I do know
that it's computationally intensive and a student is indeed probably
better off using something more optimized, such as Singular, Gap,
GiNaC/CLN, or Sage than a "general purpose math package like Axiom." The
kinds of things *I* do in Axiom, on the other hand, *are* things where a
pleasant, easy to use interface is vital. I don't do anything bizarre or
demanding; nearly everything I do could be done on an HP or TI high-end
symbolic calculator if it had the speed and the memory. It can certainly
be done in Axiom or Maxima or Yacas (or Derive) -- about the only
requirement I have beyond the basics is Laplace transforms.

\start
Date: Sat, 1 Sep 2007 22:02:01 -0700 (PDT)
From: Cliff Yapp
To: Bill Page, Alasdair McAndrew
Subject: Re: A student comment

--- Bill Page wrote:

> On 9/1/07, Alasdair McAndrew wrote:
> > As some of you may know, this semester I am using Axiom in a
> > cryptography subject.  I have asked my students to comment briefly
> > on what they like/dislike about it.  Some like it, and find it
> > "intuitive", while others dislike it.
> 
> As a "first impression" I think this feedback is quite valuable. I
> wonder how these same students will feel at the end of a semester of
> using Axiom. Do you plan to ask them again? I would also like to know
> exactly what aspects of Axiom some students found "intuitive".

Actually I find the fact that some students found it intuitive to be
intriguing - I would not have expected any of them to react in that
fashion.

> I think the decision to
> distinguish commands by this peculiar syntactic convention was
> probably already "out of fashion" even at the time Axiom was
> originally implemented. Plus this makes it difficult to extend the
> user interface in a natural manner simply by writing new library
> code.

If I understand correctly, the objection is to the use of the ")"
prefix when processing system commands?

I think the current interpreter will need to be re-thought regardless
in light of the Bnatural papers and ideas - perhaps this convention
should also be re-examined at that time.  In any case, there should be
documented reasons for its use if any are found or deduced.

> Certainly there are some reasonable alternatives that would be more
> nature and extensible.

It is worth looking into.

> It seems quite fair to claim that during most of Axiom's "nine lives"
> user interface was given lower priority than the implementation of
> mathematical algorithms.

Certainly.  That's a natural consequence of focusing the development
resources on the core mathematical system.  User interaction
considerations are non-trivial.

> (The work that NAG did on the Techexplorer
> interface for Windows was an exception, unfortunately that was lost
> when the commercial version died.) Even the output of the Spad
> library compiler demonstrates this apparent "lack of interest" in
> user interface. As a research platform I suppose this made a certain
> kind of sense but for the use you are trying to make of Axiom, I 
> think it could be a problem.

I would expect that it is.  The intersection between strict
mathematical correctness and "user friendliness" is not well mapped as
yet, and doing so will be an ongoing challenge.  Since (IMHO) the
strong foundation must be present before the question can even be
considered seriously, Axiom's original focus was quite logical.

> Thanks. I would like to know more. But apparently some people here
> really do not care to know. :-(

I think it's more of a case that they already know, but are not able to
shift resources from current efforts to attempt to address that
shortcoming at this time (which is not easy to address.)

> The suggestion to turn these comments
> back on the student surely can not be of much use since it seems
> rather unlikely to me that cryptography students will be motivated to
> solve these sort problems with the Axiom user interface when there
> are so many other alternatives available.

If an alternate environment already solves the problem, why not use it?
 Axiom brings something new to the table in the form of potentially
having much higher degrees of mathematical rigor, but this comes at a
price in terms of development time.  The solution to this particular
problem in the Axiom environment requires some prerequisites that are
themselves non-trivial and time consuming.  In my opinion, to map
concretely and usefully the strong correctness intended for the core of
Axiom to a "working" environment you need at least:

1.  The strong "foundation" containing the necessary mathematical
knowledge and algorithms to solve the problems in the target problem
space (cryptography, in this case.)

2.  User interface tools, toolkits, and interaction environments
sufficiently "friendly" (whatever that means) to provide the expected
aids to problem solving.

3.  Solid knowledge of the conventions used in the problem space and
how to express those conventions in terms of Axiom's foundations.

This has the consequence of restricting the "casual" user to previously
defined mathematical libraries for hard core reliable solutions, but
that's as it should be since rigorous, trustworthy and probably correct
solutions to most problems are not possible in a casual context. (It
might be possible in some cases for Axiom to generate "rigorous" code
for library inclusion using Bnatural input and environmental knowledge,
but that will need looking into.) "Unspoken assumptions" made in a
field must be made explicit, so when and if they break down the
breakage is clear and not "glossed over" by insufficiently rigorous
symbol manipulation.

Of the three stages above, we are still a long way from having #1 or
#2.  Once we do have those #3 will hopefully be possible using
collaborations between specialists in the various fields and
mathematicians.  One example that has been mentioned in the past is the
possibility of implementing something like distributions (a.k.a
generalized functions) for the treatment of Dirac Deltas in advanced
physics.  There are undoubtedly others, and with hard work that's where
Axiom will someday begin to show its real strength.

\start
Date: Mon, 3 Sep 2007 06:17:45 -0500
From: Tim Daly
To: Constantine Frangos
Subject: Installing axiom on suse linux 10.2

(copied to the axiom mailing list to preserve the information)

I think your version of Axiom is quite old (uses gcl-2.5).

I downloaded the DVD image from the site you posted (software.opensuse.org)
and installed it on a clean machine. I needed to use yast to install gcc, 
gnumake, cvs, latex, and the X developers libraries (for X11 headers).

Then I did a checkout of the Sept 2007 version of Axiom:

cvs -d:pserver:anonymous@axiom.cvs.sourceforge.net:/cvsroot/axiom login
(just hit enter for the password)

cvs -z3 -d:pserver:anonymous@axiom.cvs.sourceforge.net:/cvsroot/axiom co -P axiom
(-z3 gives compression, -P skips empty directories)

this gives a local directory called 'axiom'. Then do:

(we use 'fedora5' rather than 'linux' or 'suse10' due to a library location 
 issue. this will be fixed in the next release of Gold)

cd axiom
export AXIOM=`pwd`/mnt/fedora5
export PATH=$AXIOM/bin:$PATH
make 

If you don't wish to build from scratch
an executable image for suse10.2 can be found at 
  http://axiom.axiom-developer.org/axiom-200709-fedora5.tgz 

To use this image do:

  wget http://daly.axiom-developer.org/axiom-200709-fedora5.tgz 
  cd /usr/local (or your preferred location)
  mkdir axiom
  cd axiom
  tar -zxf axiom-200709-fedora5.tgz 
  export AXIOM=`pwd`/mnt/fedora5
  export PATH=$AXIOM/bin:$PATH
  axiom

Let me know if there are any other problems.

\start
Date: Mon, 3 Sep 2007 06:31:34 -0500
From: Tim Daly
To: Constantine Frangos
Subject: Installing axiom on suse linux 10.2 (typo)

There is a minor typo in the location of the image:

> If you don't wish to build from scratch
> an executable image for suse10.2can be found at:
> http://axiom.axiom-developer.org/axiom-200709-fedora5.tgz
         ^^^^^
  http://daly.axiom-developer.org/axiom-200709-fedora5.tgz

\start
Date: Mon, 3 Sep 2007 22:12:56 -0400
From: Bill Page
To: list
Subject: Axiom for Aldor or Aldor for Axiom?

Dear Aldorados,

(:- "Aldorado" = heterographic homophone of Eldorado i.e. "the Golden One" :-)

During the recent Aldor workshop the subject of the relationship
between Aldor and Axiom was discussed. Some of the participants
expressed the point of view that Axiom was important to Aldor
developers as an environment for testing complex math libraries such
as BasicMath. In general the interactive 'aldor -gloop' mode was
considered too primitive for this purpose, but Axiom fits this role
almost perfectly because it includes other library functions that can
be very useful for the development and testing new libraries. Whether
the new Aldor library is eventually intended to be used stand alone or
as part of Axiom is usually not so important. But what is important is
the development environment provided by Axiom.

This idea came as a bit of a surprise to me since normally I had been
thinking of Aldor as a missing and essential part of Axiom - the next
generation library compiler. But I realize now that this might work
both ways. Of course there are alternatives - such as implementing a
more powerful and convenient interpreter directly in Aldor - but this
is probably best viewed as a longer term goal which is more easily
obtained right now directly from Axiom.

So the issue that arises: Now that Aldor is available in an open
source form, how best to package Aldor and Axiom to facilitate this
use? Currently Aldor's APL2 source license prohibits commercial use of
the Aldor source code. This apparently makes it incompatible with GPL.
However it might be important to observe that software that is
licensed under modified BSD is both GPL and APL2-compatible - meaning
that software licensed under modified BSD could be combined with
Aldor's APL2 and released as one product under APL2. Axiom is an
example of such a package.

Although the comments in this email are not intended to be primarily
about licensing issues, I can well imagine that because it might
divert some resources away from Aldor, aldor.org might be reluctant to
package Axiom in this way specifically for use with Aldor. Maybe I am
wrong and I would like to hear more opinions about this from Aldor
developers. Similarly the current Axiom projects (including FriCAS and
OpenAxiom) might be equally reluctant to adopt the non-commercial use
clause of APL2 since that would make them incompatible with GPL.

So what (if anything) should we (both Axiom and Aldor developers) do
about this? Certainly with three Axiom forks already, it might stretch
credibility to far to fork Axiom again with an APL2 license just to
pursue the original goal of re-implementing the Axiom library in
Aldor. Is there an existing Axiom project/fork that is willing to
adopt Aldor as the new library compiler?

I think that from a technical point of view right now the FriCAS fork
of Axiom might be the most suitable system in which to re-implement
Axiom libary code in Aldor since FriCAS now builds both the algebra
code and the associated databases from directly from source using a
new bootstrap procedure. This makes it possible to make deep changes
in the Axiom algebra code without encountering Spad errors due to
inconsistent database files. But Gaby (the primary developer of
OpenAxiom) has also stated that it is the intention of the OpenAxiom
project to pursue similar goals as the original Axiom developers. Does
this include the goal of re-implementing (all or some part of) the
Axiom library in Aldor?

\start
Date: 03 Sep 2007 21:43:53 -0500
From: Gabriel Dos Reis
To: Bill Page
Subject: Re: Axiom for Aldor or Aldor for Axiom?

Bill Page writes:

| Dear Aldorados,
| 
| (:- "Aldorado" = heterographic homophone of Eldorado i.e. "the Golden One" :-)

Bill --

  Thanks for the report! 

[...]

| So the issue that arises: Now that Aldor is available in an open
| source form, how best to package Aldor and Axiom to facilitate this
| use? Currently Aldor's APL2 source license prohibits commercial use of
| the Aldor source code. This apparently makes it incompatible with GPL.
| However it might be important to observe that software that is
| licensed under modified BSD is both GPL and APL2-compatible - meaning
| that software licensed under modified BSD could be combined with
| Aldor's APL2 and released as one product under APL2. Axiom is an
| example of such a package.

There is a little snag.  Axiom currently uses GCL, which by its
licensing -- if I understand correctly -- makes the end product GPL,
for the components BFD and UNEXEC.  This, I believe, is a consequence
of the Lisp technology itself -- you don't use it; it invades you.

A way out might be for Axiom to use SBCL which is in public domain.

[...]

| I think that from a technical point of view right now the FriCAS fork
| of Axiom might be the most suitable system in which to re-implement
| Axiom libary code in Aldor since FriCAS now builds both the algebra
| code and the associated databases from directly from source using a
| new bootstrap procedure. This makes it possible to make deep changes
| in the Axiom algebra code without encountering Spad errors due to
| inconsistent database files. But Gaby (the primary developer of
| OpenAxiom) has also stated that it is the intention of the OpenAxiom
| project to pursue similar goals as the original Axiom developers. Does
| this include the goal of re-implementing (all or some part of) the
| Axiom library in Aldor?

It is OpenAxiom's intent to inter-operate with libraries written
Aldor.  However, at this moment, I do not anticipate a complete
rewrite of OpenAxiom's algebra in Aldor.  One thing at the time :-)

I would like, first, to improve inter-operability with Aldor libraries
from within Axiom (and vice versa)  through ISA like FOAM.

\start
Date: Mon, 3 Sep 2007 23:22:31 -0400
From: Bill Page
To: Gabriel Dos Reis
Subject: Re: Axiom for Aldor or Aldor for Axiom?

On 03 Sep 2007 21:43:53 -0500, Gabriel Dos Reis wrote:
> ...
> It is OpenAxiom's intent to inter-operate with libraries written
> Aldor.  However, at this moment, I do not anticipate a complete
> rewrite of OpenAxiom's algebra in Aldor.  One thing at the time :-)
>

The last commercial version of Axiom was shipped with some Axiom
packages and domains already converted to Aldor. I think it would be
good to continue this conversion process in an incremental manner.

> I would like, first, to improve inter-operability with Aldor libraries
> from within Axiom (and vice versa)  through ISA like FOAM.
>

Sorry, what is "ISA"?

Are you aware that currently Aldor works within Axiom by compiling to
Lisp? How do you see FOAM being involved? Could you expand a little on
this comment?

\start
Date: Mon, 3 Sep 2007 22:31:45 -0500 (CDT)
From: Gabriel Dos Reis
To: list
Subject: Re: [fricas-devel] Re: Axiom for Aldor or Aldor for Axiom?

On Mon, 3 Sep 2007, Bill Page wrote:

| > I would like, first, to improve inter-operability with Aldor libraries
| > from within Axiom (and vice versa)  through ISA like FOAM.
| >
| 
| Sorry, what is "ISA"?

"Instruction Set Architecture".  This is in reference to my goal to
have a well defined Axiom Virtual Machine that is not tied to Lisp.

| Are you aware that currently Aldor works within Axiom by compiling to
| Lisp?

Yes. But, eventually, I want to move away from Lisp.

| How do you see FOAM being involved?

I would like to see more documentation of FOAM and its semantics -- I
know there is a documentation; but I'm not sure how current it is and
whether it provides me with all I need.  I briefly discussed the
documentation issue with Stephen when I was in London last July.  

\start
Date: Mon, 3 Sep 2007 23:39:10 -0400
From: Stephen Watt
To: Bill Page
Subject: Re: [Aldor-l] Axiom for Aldor or Aldor for Axiom?
Cc: Gabriel Dos Reis

On Mon, Sep 03, 2007 at 11:22:31PM -0400, Bill Page wrote:
> ... 
> Are you aware that currently Aldor works within Axiom by compiling to
> Lisp? How do you see FOAM being involved? Could you expand a little on
> this comment?

In case it is not clear:  FOAM is the compilation target for Aldor, and this 
is used to generate low-level Lisp.   

FOAM is designed to have only operations that are efficient both in Lisp 
and in a machine code-only environment.  (So, for example, there is no way 
to take an address of something.)

\start
Date: 04 Sep 2007 09:20:59 +0200
From: Martin Rubey
To: Bill Page
Subject: umlaut in Guess - mailing list for algebra

Sorry Bill for replying late.  At least communication became a lot more
complicated with these forks.

> While building FriCAS rev: 46 using GNU CLISP 2.39 on Solaris 10.2 x86 
>  I received the error message: 
>  
>   invalid byte #xC3 in CHARSET:ASCII conversion 
>  
> in the file 'GUESS.spad'. Is this a known problem? 
[...]
> Any suggestions? Should I just edit the file to remove these 
>  "non-standard" characters? 

Yes.  Newer versions of Guess should not have any umlauts, but I'm still
considering to release newer versions GPL only.  (Because of the forks)

Maybe we could agree on having at least only one mailing list for the algebra
related stuff.  Maybe aldor-l or axiom-math?

\start
Date: Tue, 4 Sep 2007 10:05:45 -0400
From: Bill Page
To: list
Subject: Re: [fricas-devel] umlaut in Guess - mailing list for algebra

On 04 Sep 2007 09:20:59 +0200, Martin Rubey wrote:
>
> Sorry Bill for replying late.  At least communication became a lot more
> complicated with these forks.
>
> > While building FriCAS rev: 46 using GNU CLISP 2.39 on Solaris 10.2 x86
> >  I received the error message:
> >
> >   invalid byte #xC3 in CHARSET:ASCII conversion
> >
> > in the file 'GUESS.spad'. Is this a known problem?
> [...]
> > Any suggestions? Should I just edit the file to remove these
> >  "non-standard" characters?
>
> Yes.  Newer versions of Guess should not have any umlauts, but I'm still
> considering to release newer versions GPL only.  (Because of the forks)
>

Would this mean that Guess could not be included in any of the
existing Axiom forks (which are all licensed under modified BSD)?
Since Guess is a "library" package, would you consider releasing it
under LGPL instead? That would allow it to be included with Axiom
without affecting the Axiom license. If you are willing to have it
included in one or more Axiom distribution, could you please post up
to date sources for GUESS somewhere?

> Maybe we could agree on having at least only one mailing list for the algebra
> related stuff.  Maybe aldor-l or axiom-math?
>

I share your frustration with the current mailing list situation but I
do not know how to correct this. I presume that 'aldor-l' would be
mostly be about Aldor in general - not just algebra code. And I am not
sure what Tim Daly's opinion might be about the use of 'axiom-math' to
discuss algebra issues that arise in other Axiom forks and in Aldor
since 'axiom-math' is nominally only part of the original Axiom
project. We are caught in this situation of trying to respect his
wishes while continuing to develop Axiom in different directions.
Sooner or later we will have to focus on only one fork of Axiom or
another... :-(

\start
Date: Tue, 4 Sep 2007 10:14:54 -0400
From: Bill Page
To: Stephen Watt
Subject: Re: [Aldor-l] Axiom for Aldor or Aldor for Axiom?
Cc: Gabriel Dos Reis

On 9/3/07, Stephen Watt wrote:
> On Mon, Sep 03, 2007 at 11:22:31PM -0400, Bill Page wrote:
> > ...
> > Are you aware that currently Aldor works within Axiom by compiling to
> > Lisp? How do you see FOAM being involved? Could you expand a little on
> > this comment?
>
> In case it is not clear:  FOAM is the compilation target for Aldor, and this
> is used to generate low-level Lisp.
>

Yes, I think that is clear. I wanted to understand how FOAM could be
used in Axiom as implied by Gaby's email.

> FOAM is designed to have only operations that are efficient both in Lisp
> and in a machine code-only environment.  (So, for example, there is no way
> to take an address of something.)
>

As an abstraction layer this makes very good sense. I believe that
Aldor also provides an interpreter for this layer: "-gloop", right?
But it is not clear to me how Axiom could make use of this.

On 9/3/07, Gabriel Dos Reis wrote:
> On Mon, 3 Sep 2007, Bill Page wrote:
>
> | > I would like, first, to improve inter-operability with Aldor libraries
> | > from within Axiom (and vice versa)  through ISA like FOAM.
> | >
> |
> | Sorry, what is "ISA"?
>
> "Instruction Set Architecture".  This is in reference to my goal to
> have a well defined Axiom Virtual Machine that is not tied to Lisp.
>

As I understand it, this was also the goal of the specification of
FOAM for Aldor.

> | Are you aware that currently Aldor works within Axiom by compiling to
> | Lisp?
>
> Yes. But, eventually, I want to move away from Lisp.
>

I agree with that - or perhaps at least I agree that it is desirable
to identify a specific subset of Lisp that is required to support
Axiom and it's current algebra library. I am thinking here for example
about CCL as used in the last commercial release of Axiom.

> | How do you see FOAM being involved?
>
> I would like to see more documentation of FOAM and its semantics -- I
> know there is a documentation; but I'm not sure how current it is and
> whether it provides me with all I need.  I briefly discussed the
> documentation issue with Stephen when I was in London last July.
>

What do you need to investigate this issue more deeply? Are you
willing to devote some time to reviewing and expanding the FOAM
documentation?

Regards,
Bill Page.



\start
Date: Tue, 4 Sep 2007 09:26:53 -0500 (CDT)
From: Gabriel Dos Reis
To: Bill Page
Subject: Re: [Aldor-l] Axiom for Aldor or Aldor for Axiom?
Cc: Stephen Watt

On Tue, 4 Sep 2007, Bill Page wrote:

| As an abstraction layer this makes very good sense. I believe that
| Aldor also provides an interpreter for this layer: "-gloop", right?
| But it is not clear to me how Axiom could make use of this.

I believe the Aldor compiler can re-load FOAM files and work with
them.  `All' OpenAxiom needs to do is to generate FOAMs for linking with
the Aldor object files.

[...]

| > | How do you see FOAM being involved?
| >
| > I would like to see more documentation of FOAM and its semantics -- I
| > know there is a documentation; but I'm not sure how current it is and
| > whether it provides me with all I need.  I briefly discussed the
| > documentation issue with Stephen when I was in London last July.
| >
| 
| What do you need to investigate this issue more deeply? 

As I said, it is not clear to me that the documentation currently
publically available contains all I need to know to generate (efficient)
FOAMs for Aldor compiler to use.  

| Are you willing to devote some time to reviewing and expanding the FOAM
| documentation?

Well, I suspect the documentation job is best done by someone who
underdtand FOAM much better than me.  When I (briefly) discussed this
with Stephen, he (jokingly) refered to legendary Unix manpages that
appear impenetrable to the novice, and crystal clear to the
experts who already know their contents :-)

\start
Date: 04 Sep 2007 16:32:12 +0200
From: Martin Rubey
To: Bill Page
Subject: Re: [open-axiom-devel] [fricas-devel] umlaut in Guess - mailing list for algebra

Bill Page writes:

> On 04 Sep 2007 09:20:59 +0200, Martin Rubey wrote:
> >
> > Sorry Bill for replying late.  At least communication became a lot more
> > complicated with these forks.
> >
> > > While building FriCAS rev: 46 using GNU CLISP 2.39 on Solaris 10.2 x86
> > >  I received the error message:
> > >
> > >   invalid byte #xC3 in CHARSET:ASCII conversion
> > >
> > > in the file 'GUESS.spad'. Is this a known problem?
> > [...]
> > > Any suggestions? Should I just edit the file to remove these
> > >  "non-standard" characters?
> >
> > Yes.  Newer versions of Guess should not have any umlauts, but I'm still
> > considering to release newer versions GPL only.  (Because of the forks)
> >
> 
> Would this mean that Guess could not be included in any of the
> existing Axiom forks (which are all licensed under modified BSD)?
> Since Guess is a "library" package, would you consider releasing it
> under LGPL instead? That would allow it to be included with Axiom
> without affecting the Axiom license. If you are willing to have it
> included in one or more Axiom distribution, could you please post up
> to date sources for GUESS somewhere?

I won't have time today, but I can I'll put updated sources on mathaction this
week.  Note that the license there is GPL, I explicitly gave permission only to
the version included in wh-sandbox.  This permission does cover bugfixes, of
course.  I would like to think about the benefits and drawbacks of a specific
license, before I make a decision.

> Sooner or later we will have to focus on only one fork of Axiom or
> another... :-(

Yes, and currently, there is really no fork I like.  I *did* like the structure
of the axiom project before the forks, though.  Four interesting branches with
different goals and ways to achieve them, but discussion on only one place.

But maybe we could at least concentrate the algebra discussion at one place.

\start
Date: Tue, 4 Sep 2007 10:34:08 -0400
From: Bill Page
To: Gabriel Dos Reis
Subject: Re: [Aldor-l] Axiom for Aldor or Aldor for Axiom?
Cc: Stephen Watt, Laurentiu Dragan

On 9/4/07, Bill Page wrote:
> ...
> On 9/3/07, Gabriel Dos Reis wrote:
> > On Mon, 3 Sep 2007, Bill Page wrote:
> ...
> > | How do you see FOAM being involved?
> >
> > I would like to see more documentation of FOAM and its semantics --
> > I know there is a documentation; but I'm not sure how current it is
> > and whether it provides me with all I need.  I briefly discussed the
> > documentation issue with Stephen when I was in London last July.
> >
>
> What do you need to investigate this issue more deeply? Are you
> willing to devote some time to reviewing and expanding the FOAM
> documentation?
>

This reminds me to mention that the issue of FOAM and other Aldor
documentation was also raised at the recent Aldor Workshop. One thing
that came to light was some additional and more recent documentation
that was apparently translated from something originally in German. I
regret that I did not take specific note of the author or obtain a
photocopy of the document that I briefly examined at the workshop
(provided by Laurentiu Dragan) but I am sure that Laurentiu knows to
which document I am referring. I think that it might be very useful to
make this document available for download from the Aldor Wiki. If an
electronic format (e.g. dvi, pdf)  is not available than even a
scanned format would be useful.

\start
Date: Tue, 4 Sep 2007 10:39:35 -0400
From: Bill Page
To: Gabriel Dos Reis
Subject: Re: [Aldor-l] Axiom for Aldor or Aldor for Axiom?
Cc: Stephen Watt

On 9/4/07, Gabriel Dos Reis wrote:
> On Tue, 4 Sep 2007, Bill Page wrote:
>
> | As an abstraction layer this makes very good sense. I believe that
> | Aldor also provides an interpreter for this layer: "-gloop", right?
> | But it is not clear to me how Axiom could make use of this.
>
> I believe the Aldor compiler can re-load FOAM files and work with
> them.  `All' OpenAxiom needs to do is to generate FOAMs for linking
> with the Aldor object files.
>

Having Spad generate FOAM code seems like a rather radical (and
interesting!) idea. How practical do you think it might be to make
such deep changes to Spad?

\start
Date: Tue, 4 Sep 2007 09:45:05 -0500 (CDT)
From: Gabriel Dos Reis
To: Bill Page
Subject: Re: [Aldor-l] Axiom for Aldor or Aldor for Axiom?
Cc: Stephen Watt

On Tue, 4 Sep 2007, Bill Page wrote:

| On 9/4/07, Gabriel Dos Reis wrote:
| > On Tue, 4 Sep 2007, Bill Page wrote:
| >
| > | As an abstraction layer this makes very good sense. I believe that
| > | Aldor also provides an interpreter for this layer: "-gloop", right?
| > | But it is not clear to me how Axiom could make use of this.
| >
| > I believe the Aldor compiler can re-load FOAM files and work with
| > them.  `All' OpenAxiom needs to do is to generate FOAMs for linking
| > with the Aldor object files.
| >
| 
| Having Spad generate FOAM code seems like a rather radical (and
| interesting!) idea. How practical do you think it might be to make
| such deep changes to Spad?

At the moment, I don't know.  
But, the existing compiler can already generates Lisp FOAM for some
codes.  I suspect that was the work of Peter Broadbery -- anyone to concur?

\start
Date: 04 Sep 2007 09:53:18 -0500
From: Gabriel Dos Reis
To: Bill Page
Subject: Re: umlaut in Guess - mailing list for algebra

Bill Page writes:

[...]

| Would this mean that Guess could not be included in any of the
| existing Axiom forks (which are all licensed under modified BSD)?
| Since Guess is a "library" package, would you consider releasing it
| under LGPL instead?

OpenAxiom has a contrib/ directory for packages that are released under
different licenses, and not part of the OpenAxiom distribution.

However, I'm not going to include any package against its authors'
wishes or likes.   Authors who believe their work might be of value to
others and would like to get them included in OpenAxiom are very much
welcome.

\start
Date: Tue, 4 Sep 2007 14:32:06 -0400
From: Bill Page
To: Gabriel Dos Reis
Subject: Re: [Aldor-l] [fricas-devel] umlaut in Guess -	mailing list for algebra

On 04 Sep 2007 09:53:18 -0500, Gabriel Dos Reis wrote:
> Bill Page writes:
>
> [...]
>
> | Would this mean that Guess could not be included in any of the
> | existing Axiom forks (which are all licensed under modified BSD)?
> | Since Guess is a "library" package, would you consider releasing it
> | under LGPL instead?
>
> OpenAxiom has a contrib/ directory for packages that are released under
> different licenses, and not part of the OpenAxiom distribution.
>
> However, I'm not going to include any package against its authors'
> wishes or likes.   Authors who believe their work might be of value to
> others and would like to get them included in OpenAxiom are very much
> welcome.
>

Have you given any thought about how to package separately licensed
work such as this for inclusion into Axiom? As far as I know at the
present time none of the Axiom variants have an integral facility to
install optional library packages after installation. It would be nice
to be able to create a tarball in a format that was understood by some
')install ...' command.

Apparently in order to use a package like GUESS in the same manner as
if it had been installed during the Axiom build, it would be necessary
to at least update the database files. How can we do this?

\start
Date: Tue, 4 Sep 2007 15:13:12 -0400
From: Alfredo Portes
To: Bill Page
Subject: Re: [open-axiom-devel] [fricas-devel] umlaut in Guess - mailing list for algebra

Hi Bill,

> Would this mean that Guess could not be included in any of the
> existing Axiom forks (which are all licensed under modified BSD)?

But I was under the assumption that modified BSD is compatible with GPL.

\start
Date: Tue, 4 Sep 2007 14:16:43 -0500 (CDT)
From: Gabriel Dos Reis
To: list
Subject: umlaut in Guess - mailing list for algebra
Cc: Bill Page

On Tue, 4 Sep 2007, Alfredo Portes wrote:

| Hi Bill,
| 
| > Would this mean that Guess could not be included in any of the
| > existing Axiom forks (which are all licensed under modified BSD)?
| 
| But I was under the assumption that modified BSD is compatible with GPL.

The issue, for someone packaging the whole stuff, is what the license
of the whole system is, once it has been `infected' by updating the
databases and other derivative information.

\start
Date: Tue, 4 Sep 2007 16:12:12 -0400
From: Bill Page
To: Alfredo Portes
Subject: umlaut in Guess - mailing list for algebra

On 9/4/07, Alfredo Portes wrote:
> Bill Page asked:
> > Would this mean that Guess could not be included in any of the
> > existing Axiom forks (which are all licensed under modified BSD)?
>
> But I was under the assumption that modified BSD is compatible with GPL.
>

Yes that is definitely true: modified BSD *is* compatible with GPL.
Sometimes all this licensing nonsense is hard to get your head around.
Here is how I understand it:

One of the defining characteristics of GPL is that *if* you
incorporate *any* source code from some other package that is licensed
under GPL into some new product - _whatever the license of the
original code_ - *then* the entire derived work must be licensed under
GPL. That is what is meant by saying that GPL is a "viral license" and
that it "infects" the otherwise compatible licenses of other software
packages. (Of course people who phrase things this way usually intend
to cast GPL in an apparently negative light.) But this is a deliberate
feature of GPL to which some people object and other people applaud.
It all depends on how you think open source licensing and free access
to source code is best promoted.

Actually this kind of "infection" is not such an unusual thing. For
example: modified BSD is also compatible with Aldor's new APL2
license. Incorporating Aldor into Axiom in such a way that Aldor was
*required* in order to build Axiom would have a similar affect of
"infecting" Axiom with Aldor's "non-commerical uses only clause". The
difference is that GPL requires infection to occur even in the case
when the GPL software to be included is not an integral and essential
part of the combined package.

So in this case, if Martin's GUESS code is licensed under GPL and it
is added permanently to any of the AXIOM distributions that are
normally licensed under modified BSD, the license of the combined
result must be GPL. Since it is apparently the intention of the Axiom
distributions to remain licensed under modified BSD, this means that
GUESS could not be included in any of these Axiom distributions. But
in any case this "infection" has already occurred for those Axiom
distributions that require certain GCL components (unexec,bfd and
xgcl). So maybe this is not such a big deal when all is said and done.

I am sorry to be so pedantic and possibly annoying to some people but
I hope that what I am saying makes sense.

\start
Date: Tue, 04 Sep 2007 15:48:35 -0400
From: Laurentiu Dragan
To: Bill Page
Subject: Re: [Aldor-l] Axiom for Aldor or Aldor for Axiom?
Cc: Stephen Watt, Gabriel Dos Reis

Bill Page wrote:
> This reminds me to mention that the issue of FOAM and other Aldor
> documentation was also raised at the recent Aldor Workshop. One thing
> that came to light was some additional and more recent documentation
> that was apparently translated from something originally in German. I
> regret that I did not take specific note of the author or obtain a
> photocopy of the document that I briefly examined at the workshop
> (provided by Laurentiu Dragan) but I am sure that Laurentiu knows to
> which document I am referring. I think that it might be very useful to
> make this document available for download from the Aldor Wiki. If an
> electronic format (e.g. dvi, pdf)  is not available than even a
> scanned format would be useful.

Yes, I'll dig it up and put in on the web. The original FOAM 
documentation is already published.

\start
Date: Tue, 4 Sep 2007 16:18:04 -0400
From: Bill Page
To: Laurentiu Dragan
Subject: Re: [Aldor-l] Axiom for Aldor or Aldor for Axiom?
Cc: Stephen Watt, Gabriel Dos Reis

On 9/4/07, Laurentiu Dragan wrote:
> Bill Page wrote:
> > This reminds me to mention that the issue of FOAM and other Aldor
> > documentation was also raised at the recent Aldor Workshop. One thing
> > that came to light was some additional and more recent documentation
> > ...
>
> Yes, I'll dig it up and put in on the web. The original FOAM
> documentation is already published.
>

Excellent. Thanks, Laurentiu.

\start
Date: Tue, 4 Sep 2007 22:55:29 +0200 (CEST)
From: Waldek Hebisch
To: list
Subject: Re: [fricas-devel] umlaut in Guess - mailing list for algebra
Cc: Bill Page

Martin Rubey wrote:
> 
> Sorry Bill for replying late.  At least communication became a lot more
> complicated with these forks.
> 
> > While building FriCAS rev: 46 using GNU CLISP 2.39 on Solaris 10.2 x86 
> >  I received the error message: 
> >  
> >   invalid byte #xC3 in CHARSET:ASCII conversion 
> >  
> > in the file 'GUESS.spad'. Is this a known problem? 
> [...]
> > Any suggestions? Should I just edit the file to remove these 
> >  "non-standard" characters? 
>
> Yes.  Newer versions of Guess should not have any umlauts, but I'm still
> considering to release newer versions GPL only.  (Because of the forks)
> 

I set LC_ALL to ISO-8859-1 -- this normally solves the problem
(however, it seems that some clisp versions ignore this setting).
Personally, I belive that clisp insistence on single file
encoding is really a bug (there should be a way to say within
a program that we want to read a file using 8-bit encoding).

\start
Date: Tue, 4 Sep 2007 23:28:48 +0200
From: Ondrej Certik
To: Tim Daly
Subject: Re: A student comment
Cc: list

> Typing help is ambiguous if you first type:
>
>   help(x) == x
>
> followed by
>
>   help Fraction
>
> but is not ambiguous if you type
>
>   )help Fraction
>
> The lack of the student interest in learning parsing techniques is annoying
> and shows a lack of interest in computer science.

I am a student too and I don't think I have a lack of interest in
computer science, nevertheless lisp and ")help Fraction" looks very
archaic to me as well. But in any case, Axiom developers should try to
motivate students to work on it, not discouraging them by telling them
they are stupid or annoying.

\start
Date: Tue, 04 Sep 2007 15:42:01 -0700
From: Ed Borasky
To: list
Subject: re: [open-axiom-devel] [fricas-devel] umlaut in Guess - mailing list for algebra

Bill Page wrote:
> One of the defining characteristics of GPL is that *if* you
> incorporate *any* source code from some other package that is licensed
> under GPL into some new product - _whatever the license of the
> original code_ - *then* the entire derived work must be licensed under
> GPL. That is what is meant by saying that GPL is a "viral license" and
> that it "infects" the otherwise compatible licenses of other software
> packages. (Of course people who phrase things this way usually intend
> to cast GPL in an apparently negative light.) But this is a deliberate
> feature of GPL to which some people object and other people applaud.
> It all depends on how you think open source licensing and free access
> to source code is best promoted.

It doesn't matter how I *think* ... the license makes very clear what I
am allowed to *do* and what I am *not* allowed to do. In the end, the
effect is that people with software intellectual property must spend
expensive legal and engineering person-hours to prevent infection and
prevent disclosure of things that they have a perfect legal right *not*
to disclose.
> 

[snip]

> 
> 
> I am sorry to be so pedantic and possibly annoying to some people but
> I hope that what I am saying makes sense.

It's not *you* that annoys people -- it's the chaos caused by insane
software licenses like the GPL. It's software licensed "academic" style
- -- freely available to faculty and students in source form but only
available to corporate users for a large license fee. This one
particularly irks me, given the support major universities get from
major corporations in donations, scholarships for students of employees,
discounts on equipment and supplies, adjunct professors, etc. The
non-commercial virus in Aldor is another case.

The saddest part is that in many cases the *quality* of open source
software is far superior to expensive closed source packages. In my own
area, I'll take R over any number crunching/statistics/graphics software
on the planet. I'll take Ruby, Perl and Python over Visual Basic for
scripting *even* on a Windows platform! For some special cases, there
are compilers better than GCC, but in the *general* case I don't think
there's anything that can touch it.

\start
Date: Tue, 4 Sep 2007 18:18:46 -0500
From: Tim Daly
To: Ondrej Certik
Subject: A student comment

> I am a student too and I don't think I have a lack of interest in
> computer science, nevertheless lisp and ")help Fraction" looks very
> archaic to me as well. But in any case, Axiom developers should try to
> motivate students to work on it, not discourage them by telling them
> they are stupid and annoying.

I started open source programming in the late 90s and was quite 
idealistic about the whole idea, contributing to other projects
and starting my own project (Pinger). 

In the last few months I've gotten quite cynical. I don't see the
sense of community, cooperation, and selfless assistance I used to
see. Now I see a great deal of "it should be different" but no actual
code to support the "should". Or "it should run on X" with no actual
code to support the "should" (hyperdoc? graphics? sman? clef?). Or "it
should be licensed thus" with no thought of the great deal of effort
freely given under the current license. Or "it should be windows
based" with no effort to try to actually make it run. Or it has a bug
with no effort to find/fix/test/diff/patch the bug. Or "it should
.... " fill in whatever anyone has an opinion about what "it should
do" or how "it should be". 

I remember a time when open source was characterized as a group of
people who "scratched their own itch", that is, they wrote CODE that
make the world look like "it should". I remember a time when open
source was characterized by people who freely gave away code so that
others could benefit without restriction because it was the right 
thing to do. They used the code, they fixed or extended the code, and 
they sent the changes back, a very small part of a much larger whole.

I have wasted a year debating. I have wasted a year listening to
people say what it should do. I have wasted a year trying to explain
to people that this is open source and there are certain norms about
how to contribute code and documentation. I have been posting
diff-Naur patches to try to show how contributions are done.  I have
lost patience with people who say "this is nice but..." or "it should
do this" or "make it work the way *I* want it to work" or "graphics
should run on windows" or "this isn't windows so it is archaic" or 
whatever the complaint is.

Opinions about what "it should do" are worthless. No code, no sympathy.
Download the code, scratch your itch, test it, document it, diff it,
and post it. I've done that with projects, had patches rejected (e.g. noweb)
and accepted (aldor tutorial typos, presumably). But I made the effort.

Students need to find their own motivation. Either the itch is great
enough and the student good enough to scratch it or not. Asking for
help in fixing/extending/documenting is well supported. I just built
a whole Suse 10.2 system and an axiom image to debug a problem. But
the person with the problem ACTUALLY TRIED to do something.

I'd have been much more sympathetic if the student sent in a patch to 
make )help start hyperdoc on windows. I don't recall seeing a patch.
The student has the source, the student has the time, the student has
the opinion, the student has the itch. I await the patch.

Tim, the newly cynical curmudgeon.

\start
Date: Wed, 5 Sep 2007 01:44:56 +0200
From: Ondrej Certik
To: Tim Daly
Subject: Re: A student comment

> I started open source programming in the late 90s and was quite
> idealistic about the whole idea, contributing to other projects
> and starting my own project (Pinger).
>
> In the last few months I've gotten quite cynical. I don't see the
> sense of community, cooperation, and selfless assistance I used to
> see. Now I see a great deal of "it should be different" but no actual
> code to support the "should". Or "it should run on X" with no actual
> code to support the "should" (hyperdoc? graphics? sman? clef?). Or "it
> should be licensed thus" with no thought of the great deal of effort
> freely given under the current license. Or "it should be windows
> based" with no effort to try to actually make it run. Or it has a bug
> with no effort to find/fix/test/diff/patch the bug. Or "it should
> .... " fill in whatever anyone has an opinion about what "it should
> do" or how "it should be".
>
> I remember a time when open source was characterized as a group of
> people who "scratched their own itch", that is, they wrote CODE that
> make the world look like "it should". I remember a time when open
> source was characterized by people who freely gave away code so that
> others could benefit without restriction because it was the right
> thing to do. They used the code, they fixed or extended the code, and
> they sent the changes back, a very small part of a much larger whole.
>
> I have wasted a year debating. I have wasted a year listening to
> people say what it should do. I have wasted a year trying to explain
> to people that this is open source and there are certain norms about
> how to contribute code and documentation. I have been posting
> diff-Naur patches to try to show how contributions are done.  I have
> lost patience with people who say "this is nice but..." or "it should
> do this" or "make it work the way *I* want it to work" or "graphics
> should run on windows" or "this isn't windows so it is archaic" or
> whatever the complaint is.
>
> Opinions about what "it should do" are worthless. No code, no sympathy.
> Download the code, scratch your itch, test it, document it, diff it,
> and post it. I've done that with projects, had patches rejected (e.g. noweb)
> and accepted (aldor tutorial typos, presumably). But I made the effort.
>
> Students need to find their own motivation. Either the itch is great
> enough and the student good enough to scratch it or not. Asking for
> help in fixing/extending/documenting is well supported. I just built
> a whole Suse 10.2 system and an axiom image to debug a problem. But
> the person with the problem ACTUALLY TRIED to do something.
>
> I'd have been much more sympathetic if the student sent in a patch to
> make )help start hyperdoc on windows. I don't recall seeing a patch.
> The student has the source, the student has the time, the student has
> the opinion, the student has the itch. I await the patch.
>
> Tim, the newly cynical curmudgeon.

I understand your annoyance with a behavior of someone just
criticizing without doing anything. Nevertheless, I myself just ask a
question - why am I doing the opensource project? My answer is,
because I want people to use it. Thus being able to know how the
majority of people would like to use my project is crucial. I have no
problems with someone just stating what he expected, or what he was
annoyed about.

The "send a patch or shut up" attitude is perfectly legitimate, but I
think there are also other attitudes that can help the project more.
For example, you can come to the SymPy mailinglist and say whatever
you want, more criticisms, the better. I think it's very important for
new users of any software to experience a pleasant surprise, not to be
annoyed. With the "send a patch or shut up" attitude, you will never
know, what exactly your users don't like on it.

\start
Date: Tue, 4 Sep 2007 19:33:02 -0500
From: Tim Daly
To: Ondrej Certik
Subject: A student comment

Ondrej,

Well, "send a patch or shut up" is pretty much a statement that if
you plan to contribute you need to do SOME form of work, if only to
get educated about the project you plan to criticise. Criticism is
a valuable "patch" if it is well informed.

Axiom has a goal of a new, non-archaic user interface called Crystal.
I've spent a fair amount of time researching the subject and creating
little test case setups to experiment with ideas. The Crystal effort
has been discussed on this list. Had the student taken the time to 
read the list they might have generated a question, a proposal, or
an informed comment about the long term vision of a new user interface.

Calling the help system (documented in the axiom book, previously 
defined, recently fixed and extended to 160 algebra files) "archaic" is 
easily viewed as (a) uninformed criticism, (b) ignoring the value of being
able to actually get help immediately, and (c) failing to scratch one's 
own itch.

Had the student bothered to generate more than a knee-jerk comment
we could have had a reasonable design discussion about some subgoal
of a radically new help system (e.g. crystal), a previously well
research help system (e.g. DWIM), or a porting discussion for
hyperdoc to some other platform (e.g. Firefox).

Frankly though, "its archaic" is a worthless, effortless, bit of noise.

\start
Date: Tue, 04 Sep 2007 18:53:41 -0700
From: Ed Borasky
To: list
Subject: Re: A student comment

Tim Daly wrote:
> Axiom has a goal of a new, non-archaic user interface called Crystal.
> I've spent a fair amount of time researching the subject and creating
> little test case setups to experiment with ideas. The Crystal effort
> has been discussed on this list. Had the student taken the time to 
> read the list they might have generated a question, a proposal, or
> an informed comment about the long term vision of a new user interface.

Is the only documentation on Crystal to be found by searching the
mailing list archives, or is there some more central description of it
somewhere?

> Calling the help system (documented in the axiom book, previously 
> defined, recently fixed and extended to 160 algebra files) "archaic" is 
> easily viewed as (a) uninformed criticism, (b) ignoring the value of being
> able to actually get help immediately, and (c) failing to scratch one's 
> own itch.

Very true! As far as I can tell, Axiom, as complex as its build system
can get, does work, is reasonably efficient, and is documented well
enough that I can solve problems with it. I'm strictly a user, though --
I don't have the bandwidth to help with construction of anything except
solutions for my own problems, and of course, bug reports.

\start
Date: Tue, 4 Sep 2007 22:09:38 -0500
From: Tim Daly
To: Ed Borasky
Subject: Crystal

I have some documentation on Crystal although it hasn't been brought
up to date with my latest experiments.

The central conceptual idea is that the problem resides in a
krops-style knowledge network which is surrounded by a "crystal"
consisting of many different facets. Each facet retrieves, formats,
displays, and manipulates the problem. (It's a model-view-controller
pattern). Think of your problem as a graph floating in space
surrounded by a clear crystal, each facet maintaining a view of the
graph. The problem you are working on is embedded in the graph and the
views in the facets. Thus, trivially, the documentation facet, the
source code facet, the literate facet, etc. "Rotating" the crystal to
a new facet gives a new view of the same problem.

The crystal maintains an "intensional stance" (IS), a representation
of the state of the researcher that is used to predict goals. The IS
is used to drive things like literature searching in the background to
present related papers. It also modifies the connections between
facets, or creates new facets, so central focus concepts are
emphasized on each visible facet. Essentially it is a "research
assistant", working to modify itself to match your needs. The IS is
interactive and queries you to add or resolve information need to 
maintain or update the stance.

Because the crystal is adaptive it learns a deep view of your
knowledge about the problem. Thus copying knowledge from your crystal
to mine is a non-trivial task. Think of two people, a computer person
and a circuit designer.  Each one has a completely different
"knowledge graph" around the concept of a "register". They use the
same word but mean completely different things. Your crystal knows
what you mean by a "register", which may not be what I mean. This
raises interesting "knowledge transfer" questions.

Krops is a prior piece of research I did that unifies a knowledge
representation graph (essentially Eric May's Krep) and a rule based
programming language (essentially Charles Forgy's OPS5). The krops
object can be viewed in either form as the representations are dual.
There is an isomorphism between a rete rule tree and a knowledge
graph.  Krops was the language underlying IBM's Financial and
Marketing Expert System (FAME).

Needless to say this involves a "petamachine". That is, a machine with
a terahertz of cpu, a terabyte of memory, a petabyte of storage, a
terahertz of bandwidth, and a continuous connection to a flow of newly
published research papers (hopefully in a literate format) which can be
stored, indexed, pushed into the krops net, searchable by concept, imported,
compiled, executed, etc. Each facet has its own CPU, many processors can
search literature in parallel (see Google's MapReduce algorithm but using 
Krops and inflowing literature).

I guessed that such a petamachine was 30 years out but found out that a
petabyte of storage isn't all that expensive anymore and 400 2.5Ghz
processors is on the near horizon.

The big problem will be the mathematical literature. You can put all of
the known published mathematics in a petabyte of storage. What you'd
like to have is a continuous stream of recent "publications" (essentially
exports from other crystals) so you can keep up to date. Unfortunately
the idea of continuously sharing literate documents in mathematics has
a huge social/economic/political/technical set of barriers. (Who gets 
"first idea"? (social) Who pays? (economic) Who gets tenure? (political)
What literate format? (technical)).

I've started addressing this problem with Carlo Traverso, the head of
the Math Dept. at the University of Pisa but progress is glacial at best.
We'd like to have a "live journal" (Carlo's term) or a "literate journal"
(my term) where researchers could submit literate papers that could be
just "drag-and-dropped" onto a common system. 

The work on the common system already exists and is being done by Jose
Portes, the Doyen project. I started that originally at City College
of New York. Jose has done all of the implementation, documentation,
and publication.  See <http://doyencd.sourceforge.net>)

The crystal work is mentioned in my axiom research agenda, which used to 
be maintained (up until October of 2004) when the wiki went live at:
<http://daly.axiom-developer.org/axiom-website/currentstate.html>
There you can see the crystal idea mentioned, including KROPS, IS, etc.

When I recover the Axiom website I'll put up documentation that
describes the current state of the research.

\start
Date: Tue, 4 Sep 2007 23:05:33 -0500
From: Tim Daly
To: Ed Borasky
Subject: Crystal

Even if you are "only a user" it would be useful to get output
of various experiements you perform. These are useful for three
purposes: they can be used to document operations from domains, 
they can be used as regression test suites, and they can be used
to explain simple experiements from a given domain (e.g. using
axiom to do signal processing).

If you (or anyone else) is willing to share them I'd be most pleased.
The best case would be to write simple sentences or paragraphs between
each command to explain the next step. For examples, see the documentation
in the Jenks book (either online in $AXIOM/doc/book.dvi or in paper copy,
see chapters 8 and 9).

It doesn't have to be fancy. It's just easier to capture the steps as
you work than to create them from nothing without a motivating problem.

\start
Date: Wed, 5 Sep 2007 08:08:13 +0000
From: Themos Tsikas
To: list
Subject: Re: A student comment (Ondrej Certik)

> Typing help is ambiguous if you first type:
>
>   help(x) == x
>
> followed by
>
>   help Fraction
>
> but is not ambiguous if you type
>
>   )help Fraction

(1) -> )version

Value = "Tuesday July 17, 2007 at 14:02:22 "
(1) -> )syn help tr

(1) -> )help Fraction

   Parameterized constructors traced:
      FRAC
(1) -> )syn help

(1) -> )help Fraction
   If the system command or synonym Fraction exists, help information
      is not available for it. Issue )what commands or )what synonyms
      to determine is Fraction is a valid name.
(1) -> )syn help help

(1) -> )help Fraction

   >> System error:
   Console interrupt.

\start
Date: Wed, 05 Sep 2007 11:12:49 +0200
From: Christian Aistleitner
To: Bill Page, Alfredo Portes
Subject: APL2 is evil
Cc: Bill Page

On Tue, 04 Sep 2007 22:12:12 +0200, Bill Page  
wrote:

> For
> example: modified BSD is also compatible with Aldor's new APL2
> license. Incorporating Aldor into Axiom in such a way that Aldor was
> *required* in order to build Axiom would have a similar affect of
> "infecting" Axiom with Aldor's "non-commerical uses only clause".

I agree. IANAL, but merging Axiom (in a modified BSD version) and Aldor  
(in an APL2 version) would infect Axiom with APL2's "non-commercial uses  
only" (fifth *) clause.
I know that you probably just wanted to give a short example involving  
APL2, but from my point of view that's not the whole story. And the untold  
part of the story is hair-raising.

If one would merge Axiom (in a modified BSD version) and Aldor (in an APL2  
version), the resulting project would be a modification of Axiom and a  
modification of Aldor.
The modification of Axiom does not make too much difficulties, because  
Axiom is used under the modified BSD.
But the modification of Aldor is a problem. The APL2 does not only carry  
the problematic fifth *, but also the fourth *--which is even more evil.  
The APL2 license requires that:
[...]
   (b) you grant the Aldor Software Organization a royalty-free license to  
use,
       modify or redistribute your modifications without limitation, and
[...]
(APL2, fourth *)

Who would be legally entitled to give "the Aldor Software Organization" (I  
will use ASO to abbreviate this) for example a license to "redistribute"  
the modifications (i.e.: a modified Axiom) "without limitation"?

What does this mean? The "without limitation" actually means that one  
would hand over the modified version of Axiom to the ASO without the  
limitations imposed by the modified BSD license.

Even more, according to my understanding of Austrian law, I must not  
distribute Axiom (Axiom, not the merged Aldor+Axiom. The reason is that  
the merged version of Axiom will be mostly identical to Axiom and  
therefore, the ASO controls these parts "without limitation") any longer  
under the modified BSD without the consent of ASO, because my distribution  
of Axiom would "limit" the possibilities of ASO to take advantage of Axiom  
(for example to charge money for Axiom or the distribution of Axiom).

I know these things sound far-fetched.
I do not assume anybody would be legally entitled to grant ASO these  
rights.
And I do not think ASO would do such things.
But why does ASO force contributers to grant ASO such rights, if they do  
not inted to use them once in a while?

\start
Date: Wed, 5 Sep 2007 05:38:35 -0500
From: Tim Daly
To: Themos Tsikas
Subject: help function
Cc: list

Themos,

The help function is based on newly created files that are only 
available in the very latest release. These are being added to
on a daily basis. Because the final result of 
  )help foo 
is to search for a flat file called 
  $AXIOM/doc/spadhelp/foo.help
you can create help files by just creating the flat file.

The git and SVN/trunk versions of Axiom contain the new algebra
documentation. 

I put a tarball of the current $AXIOM/doc/spadhelp directory at:
<http://daly.axiom-developer.org/doc.spadhelp.20070904.tgz>

To use it do:

   cd $AXIOM
   wget http://daly.axiom-developer.org/doc.spadhelp.20070904.tgz
   tar -zxf doc.spadhelp.20070904.tgz
   axiom 
     -> )help Segment
     -> )help SEG

\start
Date: Wed, 5 Sep 2007 06:32:55 -0500
From: Tim Daly
To: Themos Tsikas
Subject: help function

Themos,

Ah. I didn't read it as a bug report. Sorry.

The help functionality as it currently exists has limitations.
I know about the synonym problem as well as the abbreviation problem.
My current working list (queued file) for help reads:

============ queued ==========
change )help to
 0) handle abbrev and synonym better
 1) show all topics
 2) use min prefix
 3) be case sensitive Eg: library vs Library
 4) )help name )function to show the docs on a function
 5) )view help should fire up a dvi reader on the appropriate dvi file
 6) create help files on the fly from axiom commands so help expands
    as the user works
 7) )hyperdoc should (re-)start hyperdoc and reconnect
 8) )drag should auto-create help for newly drag-and-dropped files
 9) )document should update help
10) )weave should update help
11) )lib should update help
12) )co should update help
============ queued ==========

As you can see there is much more work to do. Some of the functionality
such as )drag, )document, )weave are not yet released into the wild.

At the moment I'm writing the documentation files into the algebra 
sources and then planning to work on a regular form for help files.
The functions mentioned in help files are also run at build time to
regression test the results to check for breakage.

\start
Date: 05 Sep 2007 07:20:24 -0500
From: Gabriel Dos Reis
To: Themos Tsikas
Subject: re: A student comment (Ondrej Certik)

Themos Tsikas Themos Tsikas writes:

| > Typing help is ambiguous if you first type:
| >
| >   help(x) == x
| >
| > followed by
| >
| >   help Fraction
| >
| > but is not ambiguous if you type
| >
| >   )help Fraction
| 
| (1) -> )version
| 
| Value = "Tuesday July 17, 2007 at 14:02:22 "
| (1) -> )syn help tr
| 
| (1) -> )help Fraction
| 
|    Parameterized constructors traced:
|       FRAC
| (1) -> )syn help
| 
| (1) -> )help Fraction
|    If the system command or synonym Fraction exists, help information
|       is not available for it. Issue )what commands or )what synonyms
|       to determine is Fraction is a valid name.
| (1) -> )syn help help
| 
| (1) -> )help Fraction
| 
|    >> System error:
|    Console interrupt.

Wonderful! 
:-)

\start
Date: 05 Sep 2007 07:23:21 -0500
From: Gabriel Dos Reis
To: Tim Daly
Subject: Re: help function
Cc: Themos Tsikas,

Tim Daly writes:

| Themos,
| 
| The help function is based on newly created files that are only 
| available in the very latest release.

I believe you missed his point entirely.

You made a statement of why ')help' is prefered over 'help'.
Thomas just showed a case demaonstrating that that reason is at best
a fallacy (my term).

\start
Date: 05 Sep 2007 14:30:45 +0200
From: Martin Rubey
To: Gabriel Dos Reis
Subject: Re: help function
Cc: Themos Tsikas

Gabriel Dos Reis writes:

> Tim Daly writes:
> 
> | Themos,
> | 
> | The help function is based on newly created files that are only 
> | available in the very latest release.
> 
> I believe you missed his point entirely.
> 
> You made a statement of why ')help' is prefered over 'help'.
> Thomas just showed a case demaonstrating that that reason is at best
> a fallacy (my term).

I also believe that ")help" is much(!) better than "help".  I believe that it
does make sense to separate functionality like )help, )display, )show, )lib,
etc. from algebra functionality.

If you agree to that the closing parenthesis is in my opinion a very good
sistinction symbol.  Aldor uses "#" which is very confusing for humans and for
the compiler.

If you do not agree to the first statement, we just disagree, which is OK.

Just that you don't get me wrong: I have nothing against providing
algebra-level access to ")help" - in fact, it does exist. (MoreSystemCommands
does it.)  But I do believe that a separate "system command syntax" is a very
good idea.  At least, it appears to me so in everyday usage - and I use axiom
more as a mathematician, and rather seldom as a programmer.

\start
Date: Wed, 5 Sep 2007 07:35:13 -0500 (CDT)
From: Gabriel Dos Reis
To: Martin Rubey
Subject: Re: help function
Cc: Themos Tsikas

On Wed, 5 Sep 2007, Martin Rubey wrote:

| Gabriel Dos Reis writes:
| 
| > Tim Daly writes:
| > 
| > | Themos,
| > | 
| > | The help function is based on newly created files that are only 
| > | available in the very latest release.
| > 
| > I believe you missed his point entirely.
| > 
| > You made a statement of why ')help' is prefered over 'help'.
| > Thomas just showed a case demaonstrating that that reason is at best
| > a fallacy (my term).
| 
| I also believe that ")help" is much(!) better than "help".  I believe that it
| does make sense to separate functionality like )help, )display, )show, )lib,
| etc. from algebra functionality.


There definitely are reasons -- subjective such as 'I like it much better',
objective such as 'using system reserved name space for system
commands'.  But, the one given by Tim is plain bogus: it tried to be
objective, but its logic is flawed. 

| If you agree to that the closing parenthesis is in my opinion a very good
| sistinction symbol.  Aldor uses "#" which is very confusing for humans and for
| the compiler.

I don't see '#' more confusing than ')' -- but maybe your point is
that I'm not a human.

\start
Date: 05 Sep 2007 14:48:50 +0200
From: Martin Rubey
To: Gabriel Dos Reis
Subject: Re: help function
Cc: Themos Tsikas

Gabriel Dos Reis writes:

> I don't see '#' more confusing than ')' -- but maybe your point is
> that I'm not a human.

No, you don't seem to have programmed much in Aldor.  Here an example,
constructed from combinat, containing an "obvious" error:

<<exports of List from LibAldor>>=
if S has OutputType then OutputType;
#: % -> ACMachineInteger;
empty: %;
apply: (%, ACMachineInteger) -> S;
set!: (%, ACMachineInteger, S) -> S;
map: (S -> S) -> % -> %;
setRest!: (%, %) -> %;
@

Of course, given the context of the discussion, the error is not hard to spot.
But at least I ran into it several times.

\start
Date: Wed, 5 Sep 2007 07:50:39 -0500 (CDT)
From: Gabriel Dos Reis
To: Martin Rubey
Subject: Re: help function
Cc: Themos Tsikas

On Wed, 5 Sep 2007, Martin Rubey wrote:

| Gabriel Dos Reis writes:
| 
| > I don't see '#' more confusing than ')' -- but maybe your point is
| > that I'm not a human.
| 
| No, you don't seem to have programmed much in Aldor.

I'm very much interested in the chain of logical inferences that led to
that conclusion. 

\start
Date: Wed, 5 Sep 2007 14:57:08 +0200 (CEST)
From: Waldek Hebisch
To: list
Subject: Re: help function

Martin Rubey wrote:
> I also believe that ")help" is much(!) better than "help".  I believe that it
> does make sense to separate functionality like )help, )display, )show, )lib,
> etc. from algebra functionality.
> 
> If you agree to that the closing parenthesis is in my opinion a very good
> sistinction symbol.  Aldor uses "#" which is very confusing for humans and for
> the compiler.

When I began to use Axiom closing parenthesis looked pointless and
obscure to me.  Now I can see reasons for using closing parenthesis
and I think it is both obscure and ingenious.  It is ingenious
largely because of obscurity -- closing parenthesis at the
beginning of the line rarely conflicts with other uses.  However
it is confusing at least for computer literate people -- we
are trained that parenthesis should always match.  It may
be confusing for programs: once you put system command in 
a file simple editor functions to show matching parenthesis
will behave strangely.

Also, we have at least on bug report where closing parenthesis
is user input is wrongly read as system command.  And there
are subtle differences between input taken from standard
input, input read via read command and Shoe (old Boot and
Spad use the same handler so they should be compatible).

\start
Date: 05 Sep 2007 14:58:43 +0200
From: Martin Rubey
To: Gabriel Dos Reis
Subject: Re: help function
Cc: Themos Tsikas

Gabriel Dos Reis writes:

> | No, you don't seem to have programmed much in Aldor.
> 
> I'm very much interested in the chain of logical inferences that led to
> that conclusion. 

There was no "chain of logical inferences". I'm a person relying (too often
probably) on intuition and guessing.  But I thought that if you program
sufficiently much in Aldor, some time you will probably export a function "#",
and some time you will happen to place this "#" in the first column by error.
Of course, using noweb this is more likely to happen than without.

I'm sorry about being too quick and in error at times,

\start
Date: Wed, 5 Sep 2007 08:10:33 -0500 (CDT)
From: Gabriel Dos Reis
To: Martin Rubey
Subject: Re: help function
Cc: Themos Tsikas

On Wed, 5 Sep 2007, Martin Rubey wrote:

| Gabriel Dos Reis writes:
| 
| > | No, you don't seem to have programmed much in Aldor.
| > 
| > I'm very much interested in the chain of logical inferences that led to
| > that conclusion. 
| 
| There was no "chain of logical inferences". I'm a person relying (too often
| probably) on intuition and guessing.  But I thought that if you program
| sufficiently much in Aldor, some time you will probably export a function "#",
| and some time you will happen to place this "#" in the first column by error.
| Of course, using noweb this is more likely to happen than without.

In my experience, almost all programming languages I've used have
their own idiosyncracies.  I'm quicker to make certain type of errors
in some, and less in others, given the environments I program in.  
I've found that I tend to make some mistakes that are common, some are
just plain peculiar to me; and I almost never make some `common'
mistakes.  I believe we should not underestimate the subjective,
psychological, part of each programmer in its programming habits.

\start
Date: Wed, 5 Sep 2007 13:24:08 +0000
From: Themos Tsikas Themos Tsikas
To: list
Subject: Re: help function (Waldek Hebisch)

I take the evolutionary approach: if it was A Good Idea it would have been 
copied by now. 

Best Regards 
Themos Tsikas

> From: Waldek Hebisch

> When I began to use Axiom closing parenthesis looked pointless and
> obscure to me.  Now I can see reasons for using closing parenthesis
> and I think it is both obscure and ingenious.  It is ingenious
> largely because of obscurity -- closing parenthesis at the
> beginning of the line rarely conflicts with other uses.  However
> it is confusing at least for computer literate people -- we
> are trained that parenthesis should always match.  It may
> be confusing for programs: once you put system command in
> a file simple editor functions to show matching parenthesis
> will behave strangely.
>
> Also, we have at least on bug report where closing parenthesis
> is user input is wrongly read as system command.  And there
> are subtle differences between input taken from standard
> input, input read via read command and Shoe (old Boot and
> Spad use the same handler so they should be compatible).

\start
Date: 05 Sep 2007 08:34:42 -0500
From: Gabriel Dos Reis
To: Themos Tsikas
Subject: re: help function (Waldek Hebisch)

Themos Tsikas Themos Tsikas writes:

| I take the evolutionary approach: if it was A Good Idea it would have been 
| copied by now. 

:-) :-)
You made my day.

\start
Date: 05 Sep 2007 15:31:37 +0200
From: Martin Rubey
To: Themos Tsikas
Subject: re: help function (Waldek Hebisch)

Themos Tsikas Themos Tsikas writes:

> I take the evolutionary approach: if it was A Good Idea it would have been
> copied by now.

Is this the evolutionary approach, or is it just a definition of "good idea"?

I could imagine that just nobody in the surviving environments knew about the
idea.

\start
Date: 05 Sep 2007 08:57:01 -0500
From: Gabriel Dos Reis
To: Martin Rubey
Subject: re: help function (Waldek Hebisch)
Cc: Themos Tsikas

Martin Rubey writes:

| Themos Tsikas Themos Tsikas writes:
| 
| > I take the evolutionary approach: if it was A Good Idea it would have been
| > copied by now.
| 
| Is this the evolutionary approach, or is it just a definition of "good idea"?
| 
| I could imagine that just nobody in the surviving environments knew about the
| idea.

The idea of using `close paren' or that of separating system commands
in separate name space?

\start
Date: Wed, 5 Sep 2007 08:56:26 -0500
From: Tim Daly
To: Ed Borasky
Subject: bug #381

Ok. The axiom command is now generated and I clearly missed a
change. I'll fix it in the next patch.

\start
Date: 05 Sep 2007 16:14:59 +0200
From: Martin Rubey
To: Gabriel Dos Reis
Subject: re: help function (Waldek Hebisch)

Gabriel Dos Reis writes:

> Martin Rubey writes:
> 
> | Themos Tsikas Themos Tsikas writes:
> | 
> | > I take the evolutionary approach: if it was A Good Idea it would have
> | > been copied by now.
> | 
> | Is this the evolutionary approach, or is it just a definition of "good
> | idea"?
> | 
> | I could imagine that just nobody in the surviving environments knew about
> | the idea.
> 
> The idea of using `close paren' or that of separating system commands in
> separate name space?

Neither - nor. I was referring to "evolutionary approach".  I think at times
(not particularly often), good ideas do not survive.

Mathematica uses

?foo   for )help foo

<<foo  for )lib foo and )read foo

!foo   for )sys foo

But since Mathematica does not allow either of ?, <<, ! as first char of an
identifier, they do not have the same problem, so using ")" as separator of
name spaces doesn't make any sense.  Aldor and Axiom allow all three, so ")" is
a natural choice.

Waldek wrote:

> Also, we have at least on bug report where closing parenthesis is user input
> is wrongly read as system command.

I didn't see this bug report, could you send me a reference, please.  Do you
think using another character to distinguish name spaces would be better
suited?  Or would you advocate getting rid of the distinction alltogether?

\start
Date: Wed, 5 Sep 2007 09:26:15 -0500 (CDT)
From: Gabriel Dos Reis
To: Martin Rubey
Subject: re: help function (Waldek Hebisch)

On Wed, 5 Sep 2007, Martin Rubey wrote:

| Gabriel Dos Reis writes:
| 
| > Martin Rubey writes:
| > 
| > | Themos Tsikas Themos Tsikas writes:
| > | 
| > | > I take the evolutionary approach: if it was A Good Idea it would have
| > | > been copied by now.
| > | 
| > | Is this the evolutionary approach, or is it just a definition of "good
| > | idea"?
| > | 
| > | I could imagine that just nobody in the surviving environments knew about
| > | the idea.
| > 
| > The idea of using `close paren' or that of separating system commands in
| > separate name space?
| 
| Neither - nor. I was referring to "evolutionary approach".  I think at times
| (not particularly often), good ideas do not survive.
| 
| Mathematica uses
| 
| ?foo   for )help foo
| 
| <<foo  for )lib foo and )read foo
| 
| !foo   for )sys foo
| 
| But since Mathematica does not allow either of ?, <<, ! as first char of an
| identifier, they do not have the same problem, so using ")" as separator of
| name spaces doesn't make any sense.  Aldor and Axiom allow all three, so ")" is
| a natural choice.


(1) -> ?foo x  == x + x
                                                                   Type: Void
(2) -> ?foo 3
   There are no library operations named foo 
      Use HyperDoc Browse or issue
                                )what op foo
      to learn if there is any operation containing " foo " in its 
      name.
 
   Cannot find a definition or applicable library operation named foo 
      with argument type(s) 
                               PositiveInteger
      
      Perhaps you should use "@" to indicate the required return type, 
      or "$" to specify which version of the function you need.

(2) -> <<bar x == x + x
                                                                   Type: Void
(3) -> <<bar 3
   There are no library operations named bar 
      Use HyperDoc Browse or issue
                                )what op bar
      to learn if there is any operation containing " bar " in its 
      name.
 
   Cannot find a definition or applicable library operation named bar 
      with argument type(s) 
                               PositiveInteger
      
      Perhaps you should use "@" to indicate the required return type, 
      or "$" to specify which version of the function you need.

\start
Date: Wed, 05 Sep 2007 07:36:16 -0700
From: Ed Borasky
To: list
Subject: Re: help function

Waldek Hebisch wrote:
> When I began to use Axiom closing parenthesis looked pointless and
> obscure to me.  Now I can see reasons for using closing parenthesis
> and I think it is both obscure and ingenious.  It is ingenious
> largely because of obscurity -- closing parenthesis at the
> beginning of the line rarely conflicts with other uses.  However
> it is confusing at least for computer literate people -- we
> are trained that parenthesis should always match.  It may
> be confusing for programs: once you put system command in 
> a file simple editor functions to show matching parenthesis
> will behave strangely.
> 
> Also, we have at least on bug report where closing parenthesis
> is user input is wrongly read as system command.  And there
> are subtle differences between input taken from standard
> input, input read via read command and Shoe (old Boot and
> Spad use the same handler so they should be compatible).

My first reaction on seeing commands starting with ")" was to recall
having seen that convention used in other software from IBM in the
mid-1960s, although I can't remember exactly when and where. It might
even date back before the 029 keypunch became widespread.

Now, can we argue about something else? )smiley

\start
Date: 05 Sep 2007 16:48:57 +0200
From: Martin Rubey
To: Gabriel Dos Reis
Subject: re: help function (Waldek Hebisch)

Gabriel Dos Reis writes:

> (1) -> ?foo x  == x + x
>                                                                    Type: Void
> (2) -> ?foo 3
>    There are no library operations named foo 

> (2) -> <<bar x == x + x
>                                                                    Type: Void
> (3) -> <<bar 3
>    There are no library operations named bar 

Interesting.  I'd consider these as bugs. 

(1) -> ? x == x^2
                                                                   Type: Void
(2) -> ? x
   Loading /users/rubey/axiom/target/i686-pc-linux//algebra/UPMP.o for 
      package UnivariatePolynomialMultiplicationPackage 
   Compiling function $EmptyMode with type Variable x -> Polynomial 
      Integer 

         2
   (2)  x
                                                     Type: Polynomial Integer
(3) -> << x == x^2
                                                                   Type: Void
(4) -> << x
   Compiling function << with type Variable x -> Polynomial Integer 

         2
   (4)  x
                                                     Type: Polynomial Integer

(5) -> <<foo x == x^2
                                                                   Type: Void
(6) -> <<foo
   Compiling function << with type Variable foo -> AnonymousFunction 

   Loading /users/rubey/axiom/target/i686-pc-linux//algebra/ANON.o for 
      domain AnonymousFunction 
               2
   (6)  x +-> x
                                                      Type: AnonymousFunction
(7) -> <<foo x
   There are no library operations named foo 
      Use HyperDoc Browse or issue
                                )what op foo
      to learn if there is any operation containing " foo " in its 
      name.
 
   Cannot find a definition or applicable library operation named foo 
      with argument type(s) 
                                 Variable x
      
      Perhaps you should use "@" to indicate the required return type, 
      or "$" to specify which version of the function you need.
(7) -> _<_<foo x
   Loading /users/rubey/axiom/target/i686-pc-linux//algebra/UPMP.o for 
      package UnivariatePolynomialMultiplicationPackage 
   Compiling function <<foo with type Variable x -> Polynomial Integer 

         2
   (7)  x
                                                     Type: Polynomial Integer

\start
Date: Wed, 5 Sep 2007 09:57:27 -0500 (CDT)
From: Gabriel Dos Reis
To: Martin Rubey
Subject: re: help function (Waldek Hebisch)

On Wed, 5 Sep 2007, Martin Rubey wrote:

| Gabriel Dos Reis writes:
| 
| > (1) -> ?foo x  == x + x
| >                                                                    Type: Void
| > (2) -> ?foo 3
| >    There are no library operations named foo 
| 
| > (2) -> <<bar x == x + x
| >                                                                    Type: Void
| > (3) -> <<bar 3
| >    There are no library operations named bar 
| 
| Interesting.  I'd consider these as bugs. 

Whatever they are, I believe your earlier statement that some choice
was natural needs, at minimum, some proof.

| (1) -> ? x == x^2

Noice that your claim wasn't that the single character "?" by itself
can be a name.  You clearly stated:

  But since Mathematica does not allow either of ?, <<, ! *as first
  char of an identifier*, they do not have the same problem, so using
  ")" as separator of name spaces doesn't make any sense.  *Aldor and
  Axiom allow all three*,   so ")" is a natural choice.

Emphasis is mine.

[...]

| (7) -> _<_<foo x

The character ")" can also start an Axiom identifier if is it
escaped.  From there, I don't see how the choice of ")" is natural.
Would you mind clarifying the naturalness?

\start
Date: Wed, 5 Sep 2007 17:15:19 +0200 (CEST)
From: Waldek Hebisch
To: Martin Rubey
Subject: re: help function (Waldek Hebisch)
Cc: Gabriel Dos Reis

Martin Rubey wrote:
> Waldek wrote:
> 
> > Also, we have at least on bug report where closing parenthesis is user input
> > is wrongly read as system command.
> 
> I didn't see this bug report, could you send me a reference, please.  Do you
> think using another character to distinguish name spaces would be better
> suited?  Or would you advocate getting rid of the distinction alltogether?
> 

Sorry, I can not find the report now -- many reports are widely mis-labeled
so I would have to go trough all of them...  But I can show what the
problem was.  Put the following in a file:

poly := (x_
)*y

and try )read command on corresponding input file -- you will
get syntax error and message about unrecognized system command.
The same on the command line works fine -- command line uses old
parser which recognizes system commands only outside of
parenthesis.  But the new parser rejects this.

BTW: User example was much bigger -- when you naively split big
polymomials into multiple lines you will quickly hit this problem.

I am not sure if we need separate namespace for user commands.
But I think that we need sparate namespace for some programming
constructs, notably )if.  Also ')set message auto off' should
be handled immediately which is easy with separate namespace.
So I would probably keep separate namespace.

Choosing good prefix character is not easy, mnemonically !
would be very good, but ! really is allowed as first character
in names... IMHO # causes at least as much possibilities for
errors as ).  So we may be stuck with ).

OTOH for users we may provide alternative commands, for example
one can do:

help(x) == systemCommand("help " . x)

Drawback is that one have to give string as an argument  (I would
guess that having help as system command was at least partially
motivated by need to have unevaluated argument).

\start
Date: Wed, 5 Sep 2007 10:20:46 -0500 (CDT)
From: Gabriel Dos Reis
To: Waldek Hebisch
Subject: re: help function (Waldek Hebisch)

On Wed, 5 Sep 2007, Waldek Hebisch wrote:

| Choosing good prefix character is not easy, mnemonically

Go GUI.

\start
Date: Wed, 5 Sep 2007 12:11:24 -0400
From: Bill Page
To: Christian Aistleitner
Subject: Re: APL2 is evil
Cc: Stephen Watt

On 9/5/07, Christian Aistleitner wrote:
> ...
> I know these things sound far-fetched.
> I do not assume anybody would be legally entitled to grant ASO
> these rights. And I do not think ASO would do such things.
> But why does ASO force contributers to grant ASO such rights,
> if they do not inted to use them once in a while?
>

During the recent Aldor Workshop Stephen Watt said that it is his
intention to publish an "interpretation" of APL2 that would clarify
exactly how it is intended to apply to specific situations. For
example: 1) Apparently it is intended that the use of Aldor for
teaching does not constitute "commercial use" even if you are a paid
teacher. Similarly, 2) If you take advantage of access to of the Aldor
source code to understand how certain specific things are done in
Aldor and then use that knowledge to improve some other package (e.g.
Spad) and then attempt to sell a version of Axiom with the enhanced
Spad compiler, then should that use be deemed to violate Aldor's
non-commerical use clause?

If issues and rights such as these were specifically addressed in
published document that is intended to clarify the application of
APL2, would that satisfy some or all of your concerns?

\start
Date: Wed, 5 Sep 2007 11:18:59 -0500 (CDT)
From: Gabriel Dos Reis
To:  
Subject: Re: [fricas-devel] Re: APL2 is evil [was: Re:
Cc: Stephen Watt, Christian Aistleitner, Bill Page

On Wed, 5 Sep 2007, Bill Page wrote:

| If issues and rights such as these were specifically addressed in
| published document that is intended to clarify the application of
| APL2, would that satisfy some or all of your concerns?

That would clarify things for many people -- and probably save debates :-)

\start
Date: 05 Sep 2007 20:21:34 +0200
From: Martin Rubey
To: Waldek Hebisch
Subject: re: help function (Waldek Hebisch)
Cc: Gabriel Dos Reis

Waldek Hebisch writes:

> Sorry, I can not find the report now -- [...] But I can show what the problem
> was.  Put the following in a file:
> 
> poly := (x_
> )*y

[...]

> BTW: User example was much bigger -- when you naively split big polymomials
> into multiple lines you will quickly hit this problem.

OK, I imagined something along these lines.

> OTOH for users we may provide alternative commands, for example one can do:
> 
> help(x) == systemCommand("help " . x)

Yes, I also think that this is good.  Still, I really like the second name
space.

> Drawback is that one have to give string as an argument (I would guess that
> having help as system command was at least partially motivated by need to
> have unevaluated argument).

Having Aldor might help here, since then the argument to a function may be a
domain or a category or whatever.  Although I must admit that I didn't check
the details.  I think the main problem is that you cannot easily get the name
of a domain.  There is name(%)$Trace, but I cannot remember right now how
reliable that is.

\start
Date: Wed, 5 Sep 2007 13:34:42 -0500
From: Tim Daly
To: Franz Huber
Subject: SpadHelp files

>There is only one small problem since your latest release from
>yesterday: in Windows file system there's no difference between
>files with the same names but with uppercase/lowercase letters.

At the moment I'm following the exact name convention. It takes a
while to create these files and I'm just grinding thru the work.

Even in the unix case the code ends up using monocase so Set and SET
collide. This isn't a problem since the file contents are identical. 
The collision with the set command is unfortunate, however.

I'm pondering a solution. It's on the "queued" list of changes for help.
Unfortunately once I start hacking the code the end result won't work
for old systems.

\start
Date: 05 Sep 2007 22:08:18 +0200
From: Francois Maltey
To: list
Subject: Re: help function

...
> I also believe that ")help" is much(!) better than "help".  I believe that it
> does make sense to separate functionality like )help, )display, )show, )lib,
> etc. from algebra functionality.
> 
> If you agree to that the closing parenthesis is in my opinion a very good
> sistinction symbol.  
...

But is it sure that )read is a meta-system command ?
It's impossible to insert )sys and )cd in an axiom function.

Is it possible to use a local )set command for )set stream... 

and the )set function cache... is outside the definition of the function,
but its sense is (for me) a local declaration as local variable or so.

Have a nice day !

\start
Date: 06 Sep 2007 08:29:06 +0200
From: Martin Rubey
To: Francois Maltey
Subject: Re: help function

Francois Maltey writes:

> > I also believe that ")help" is much(!) better than "help".  I believe that
> > it does make sense to separate functionality like )help, )display, )show,
> > )lib, etc. from algebra functionality.

> But is it sure that )read is a meta-system command ?  

Not sure, but I like it better that way.

> It's impossible to insert )sys and )cd in an axiom function.

No.

(97) -> systemCommand("sys ls")
papers           pdsaw52even.dvi  pdsaw52even.pdf  pdsaw52even.tex
pdsaw.input   pdsaw.input.~BASE~
pdsaw52even.aux  pdsaw52even.log  pdsaw52even.ps   pdsaw52even.tex~
pdsaw.input~

                                                                   Type: Void

But of course, everything after "sys " is system-dependent.

> Is it possible to use a local )set command for )set stream... 

Try it, I do not know.

> and the )set function cache... is outside the definition of the function,
> but its sense is (for me) a local declaration as local variable or so.

Yes, I do think it's a pity that ")se fu ca" can not be turned on from within
spad or aldor.  At least, I do not really know how to do it.  On the other
hand, it's very easy to do it yourself:  (untested)

remember: Table(DomA, DomB) := empty()

f(arg: DomA): DomB ==
     res := search(arg, remember)
     if res case DomB 
     then res
     else
        ...

And of course, in input files ")se fu ca" just works.

\start
Date: Thu, 06 Sep 2007 11:41:53 +0200
From: Christian Aistleitner
To: Bill Page
Subject: Re: APL2 is evil [was: Re: [Aldor-l]
Cc: Stephen Watt

On Wed, 05 Sep 2007 18:11:24 +0200, Bill Page  
wrote:

> On 9/5/07, Christian Aistleitner wrote:
>>
>> [APL2 concerns]
>
> If issues and rights such as these were specifically addressed in
> published document that is intended to clarify the application of
> APL2, would that satisfy some or all of your concerns?

I agree that publishing a clarification document is a good thing.
Lots of licenses provide clairification documents, which help non-jurists  
understand what is meant by the licence. However, such clarification  
documents typically just give examples and never lessen the requirements  
of a licence.

Same for the APL2: A clarification document is what it is, a separate  
document. And therefore does not alter the APL2.
If the APL2 states requirements, these requirements are there.
If an additional clarification document tries to lessen these requirements  
(e.g.: allowing teachers to use Aldor _and_ get salary), it does not and  
cannot effectively lessen the requirements of the APL2. A clairification  
document can at most show the good will of the ASO to not make use of  
their APL2-given rights until they decide otherwise.

If a teacher uses Aldor to give lectures while getting a pay-check for  
this task, he is breaking the APL2 (in the current version). "Good will of  
the ASO" regardless of whether in written or non-written form may save him  
 from punishment for now. But still, he is breaking the APL2--and giving a  
bad role model.

The things I particulary dislike about the APL2 are caused by too  
restrictive terms (the fourth and fifth * of the APL).
"Good will" written in a separate document does not take these  
restrictions away.
If the ASO decides that the APL2 is ambiguous or too strict in some ways,  
they have to correct the APL2. Otherwise, the problem persists.

\start
Date: Mon, 3 Sep 2007 18:25:14 -0500
From: Tim Daly
To: list
Subject: 20070903.01.tpd.patch

The following patch is a continuation of the algebra documentation effort.

 o) adds or fixes )help documentation for the domains:

    Octonion.help (OCT)
    None.help (NONE)
    MultivariatePolynomial.help (MPOLY)
    Multiset.help (MSET)
    Matrix.help (MATRIX)
    MappingPackage3.help (MAPPKG3)
    MappingPackage2.help (MAPPKG2)
    MappingPackage1.help (MAPPKG1)
    MakeFunction.help (MKFUNC)
    Magma.help (MAGMA)
    LyndonWord.help (LWORD)
    List.help (LIST)
    Permutation.help (PERM)
    TwoDimensionalViewport.help (VIEW2D)
    PlaneAlgebraicCurvePlot.help (ACPLOT)
    OneDimensionalArray (ARRAY1)
    HexadecimalExpansion
    RomanNumeral

 o) fixes a typo in the Jenks book
   
    in src/doc/book MultiSet -> Multiset

 o) documents how to create )help file documentation
 o) documents how to create regression tests for algebra files

    in src/doc/bookvol4, Developers Guide
    in src/algebra/Makefile
    in src/input/Makefile

 o) removes and replaces the previous algebra testing stanzas

    in src/input/Makefile
    in src/algebra/perm.spad
    in src/algebra/view2d.spad
    in src/algebra/fr.spad


====================================================================
diff --git a/changelog b/changelog
index a8cf9d5..eeab935 100644
--- a/changelog
+++ b/changelog
@@ -1,3 +1,79 @@
+20070903 tpd src/algebra/radix.spad fix typos in help file
+20070903 tpd src/algebra/integer.spad fix typos in help file
+20070903 tpd src/doc/bookvol4 fix typos
+20070902 tpd src/doc/spadhelp add OneDimensionalArray
+20070902 tpd src/algebra/Makefile add OneDimensionalArray.help 
+20070902 tpd src/algebra/array1.spad add OneDimensionalArray.help (ARRAY1)
+20070902 tpd src/algebra/array1.spad OneDimensionalArray.input
+20070902 tpd src/doc/spadhelp add Octonion
+20070902 tpd src/algebra/Makefile add Octonion.help 
+20070902 tpd src/algebra/oct.spad add Octonion.help (OCT)
+20070902 tpd src/algebra/oct.spad Octonion.input
+20070902 tpd src/doc/spadhelp add None
+20070902 tpd src/algebra/Makefile add None.help 
+20070902 tpd src/algebra/any.spad add None.help (NONE)
+20070902 tpd src/algebra/any.spad None.input
+20070902 tpd src/doc/spadhelp add MultivariatePolynomial
+20070902 tpd src/algebra/Makefile add MultivariatePolynomial.help 
+20070902 tpd src/algebra/multpoly.spad add MultivariatePolynomial.help (MPOLY)
+20070902 tpd src/algebra/multpoly.spad MultivariatePolynomial.input
+20070902 tpd src/doc/spadhelp add Multiset
+20070902 tpd src/algebra/Makefile add Multiset.help 
+20070902 tpd src/algebra/mset.spad add Multiset.help (MSET)
+20070902 tpd src/algebra/mset.spad Multiset.input
+20070902 tpd src/doc/book MultiSet -> Multiset
+20070902 tpd src/doc/spadhelp add Matrix
+20070902 tpd src/algebra/Makefile add Matrix.help 
+20070902 tpd src/algebra/matrix.spad add Matrix.help (MATRIX)
+20070902 tpd src/algebra/matrix.spad Matrix.input
+20070902 tpd src/doc/bookvol4 document how to add help files
+20070902 tpd src/algebra/Makefile document how to add help files
+20070902 tpd src/doc/spadhelp add MappingPackage3
+20070902 tpd src/algebra/Makefile add MappingPackage3.help 
+20070902 tpd src/algebra/mappkg.spad add MappingPackage3.help (MAPPKG3)
+20070902 tpd src/algebra/mappkg.spad MappingPackage3.input
+20070902 tpd src/doc/spadhelp add MappingPackage2
+20070902 tpd src/algebra/Makefile add MappingPackage2.help 
+20070902 tpd src/algebra/mappkg.spad add MappingPackage2.help (MAPPKG2)
+20070902 tpd src/algebra/mappkg.spad MappingPackage2.input
+20070902 tpd src/doc/spadhelp add MappingPackage1
+20070902 tpd src/algebra/Makefile add MappingPackage1.help 
+20070902 tpd src/algebra/mappkg.spad add MappingPackage1.help (MAPPKG1)
+20070902 tpd src/algebra/mappkg.spad MappingPackage1.input
+20070902 tpd src/doc/spadhelp add MakeFunction
+20070902 tpd src/algebra/Makefile add MakeFunction.help 
+20070902 tpd src/algebra/mkfunc.spad add MakeFunction.help (MKFUNC)
+20070902 tpd src/algebra/mkfunc.spad MakeFunction.input
+20070902 tpd src/algebra/view2d.spad fix typos in help file
+20070902 tpd src/algebra/files.spad fix typos in help file
+20070902 tpd src/algebra/acplot.spad fix typos in help file
+20070902 tpd src/doc/spadhelp add Magma
+20070902 tpd src/algebra/Makefile add Magma.help 
+20070902 tpd src/algebra/xlpoly.spad add Magma.help (MAGMA)
+20070902 tpd src/algebra/xlpoly.spad Magma.input
+20070902 tpd src/doc/spadhelp add LyndonWord
+20070902 tpd src/algebra/Makefile add LyndonWord.help 
+20070902 tpd src/algebra/xlpoly.spad add LyndonWord.help (LWORD)
+20070902 tpd src/algebra/xlpoly.spad LyndonWord.input
+20070902 tpd src/doc/spadhelp add List
+20070902 tpd src/algebra/Makefile add List.help 
+20070902 tpd src/algebra/list.spad add List.help (LIST)
+20070902 tpd src/algebra/list.spad List.input
+20070901 tpd src/input/Makefile remove ALGEBRA variable
+20070901 tpd src/doc/spadhelp add Permutation
+20070901 tpd src/algebra/Makefile add Permutation.help 
+20070901 tpd src/algebra/acplot.spad add Permutation.help (PERM)
+20070901 tpd src/algebra/acplot.spad Permutation.input
+20070901 tpd src/doc/spadhelp add TwoDimensionalViewport
+20070901 tpd src/algebra/Makefile add TwoDimensionalViewport.help
+20070901 tpd src/algebra/view2d.spad add TwoDimensionalViewport.help (VIEW2D)
+20070901 tpd src/algebra/perm.spad remove TEST mechanism
+20070901 tpd src/algebra/view2d.spad remove TEST mechanism
+20070901 tpd src/algebra/fr.spad remove TEST mechanism
+20070901 tpd src/doc/spadhelp add PlaneAlgebraicCurvePlot
+20070901 tpd src/algebra/Makefile add PlaneAlgebraicCurvePlot.help 
+20070901 tpd src/algebra/acplot.spad add PlaneAlgebraicCurvePlot.help (ACPLOT)
+20070901 tpd src/algebra/acplot.spad PlaneAlgebraicCurvePlot.input
 20070901 tpd zips/aldor.20070901.tgz add pdf documentation
 20070901 tpd zips/aldor.20070901.tgz added
 20070901 tpd src/doc/spadhelp add RealSolvePackage
diff --git a/src/algebra/Makefile.pamphlet b/src/algebra/Makefile.pamphlet
index 9621c48..b011d80 100644
--- a/src/algebra/Makefile.pamphlet
+++ b/src/algebra/Makefile.pamphlet
@@ -1487,43 +1487,6 @@ DOCFILES= \
  ${DOC}/zerodim.spad.dvi
 
 @
-\section{Test Cases}
-<<environment>>=
-
-TESTS=${INPUT}/ACPLOT.input ${INPUT}/INTHEORY.input ${INPUT}/PERM.input \
-      ${INPUT}/TESTFR.input ${INPUT}/VIEW2D.input 
-
-@
-<<testrules>>=
-
-${INPUT}/ACPLOT.input: ${IN}/acplot.spad.pamphlet
-	@ echo making ${INPUT}/ACPLOT.input from ${IN}/acplot.spad.pamphlet
-	@(cd ${INPUT} ; \
-	 ${TANGLE} -R"TEST ACPLOT" ${IN}/acplot.spad.pamphlet >ACPLOT.input )
-
-${INPUT}/TESTFR.input: ${IN}/fr.spad.pamphlet
-	@ echo making ${INPUT}/frtest.input from ${IN}/fr.spad.pamphlet
-	@(cd ${INPUT} ; \
-	 ${TANGLE} -R"TEST FR" ${IN}/fr.spad.pamphlet >TESTFR.input )
-
-${INPUT}/INTHEORY.input: ${IN}/numtheor.spad.pamphlet
-	@ echo making ${INPUT}/INTHEORY.input from ${IN}/numtheor.spad.pamphlet
-	@(cd ${INPUT} ; \
-	 ${TANGLE} -R"TEST INTHEORY" ${IN}/numtheor.spad.pamphlet \
-            >INTHEORY.input )
-
-${INPUT}/PERM.input: ${IN}/perm.spad.pamphlet
-	@ echo making ${INPUT}/PERM.input from ${IN}/perm.spad.pamphlet
-	@(cd ${INPUT} ; \
-	 ${TANGLE} -R"TEST PERM" ${IN}/perm.spad.pamphlet \
-            >PERM.input )
-
-${INPUT}/VIEW2D.input: ${IN}/view2d.spad.pamphlet
-	@ echo making ${INPUT}/VIEW2D.input from ${IN}/view2d.spad.pamphlet
-	@(cd ${INPUT} ; \
-	 ${TANGLE} -R"TEST VIEW2D" ${IN}/view2d.spad.pamphlet >VIEW2D.input )
-
-@
 \section{The Makefile Stanzas}
 A [[spad]] pamphlet can contain many Axiom [[categories]], [[domains]], and
 [[packages]]. 
@@ -2011,6 +1974,99 @@ layer23done:
 	@ echo ==================================
 
 @
+\section{help command documentation}
+Axiom supports a )help command that takes a single argument.
+This argument is interpreted as the name of a flat ascii file
+which should live in \$AXIOM/doc/src/spadhelp.
+
+\subsection{help documentation for algebra}
+The help documentation for algebra files lives within the algebra
+pamphlet. The help chunk contains the name of the domain, thus:
+
+\begin{verbatim}
+<<thisdomain.help>>=
+====================================================================
+thisdomain examples
+====================================================================
+
+   (documentation for this domain)
+
+  examplefunction foo
+   output
+                Type: thetype
+
+See Also:
+o )show thisdomain
+o $AXIOM/bin/src/doc/algebra/thisfile.spad.dvi
+
+@
+\end{verbatim}
+
+The documentation starts off with the domain enclosed in two lines
+of equal signs. The documentation is free format. Generally the
+functions are indented two spaces, the output is indented 3 spaces,
+and the Type field has been moved toward the center of the line.
+
+The ``See Also:'' section lists the domain with the ``show'' command
+and the path to the source file in dvi format.
+
+\subsection{adding help documentation in Makefile}
+
+There is a section in the src/algebra/Makefile.pamphlet that reads:
+\begin{verbatim}
+SPADHELP=\
+ ${HELP}/AssociationList.help  ${HELP}/BalancedBinaryTree.help \
+\end{verbatim}
+which is essentially a list of all of the algebra help files. Each item
+in this list refers to a stanza that looks like:
+
+\begin{verbatim}
+${HELP}/AssociationList.help: ${IN}/list.spad.pamphlet
+	@echo 7000 create AssociationList.help from ${IN}/list.spad.pamphlet
+	@${TANGLE} -R"AssociationList.help" ${IN}/list.spad.pamphlet \
+            >${HELP}/AssociationList.help
+	@cp ${HELP}/AssociationList.help ${HELP}/ALIST.help
+	@${TANGLE} -R"AssociationList.input" ${IN}/list.spad.pamphlet \
+            >${INPUT}/AssociationList.input
+\end{verbatim}
+
+Notice that the first line has an connection between the help file and 
+the spad file that contains it. The second line gives debugging output
+containing a unique number. The third line extracts the help file. The
+fourth line copies the file with the long name of the domain to a file
+with the abbreviation of the domain so the user can query the domain
+with either form.
+
+\subsection{Using help documentation for regression testing}
+
+The last line extracts an input test file for the algebra. In general
+each help file is used to create an input test file for regression testing.
+
+There is a Makefile variable called REGRESS in the algebra Makefile:
+\begin{verbatim}
+REGRESS=\
+ AssociationList.regress  BalancedBinaryTree.regress \
+\end{verbatim}
+
+This is part of a Makefile that structure within the algebra Makefile.
+This Makefile gets extracted by the Makefile in the input subdirectory.
+Thus there is a connection between the two Makefiles (algebra and input).
+This algebra regression Makefile goes by the chunk name 
+{\bf algebra.regress}. It contains a list of regression files and a 
+single stanza:
+\begin{verbatim}
+%.regress: %.input
+	@ echo algebra regression testing $*
+	@ rm -f $*.output
+	@ echo ')read $*.input' | ${TESTSYS} 
+	@ echo ')lisp (regress "$*.output")' | ${TESTSYS} \
+                | egrep -v '(Timestamp|Version)' | tee $*.regress
+\end{verbatim}
+The input Makefile extracts {\bf algebra.regress} and then calls 
+make to process this file.
+
+This keeps the regression test list in the algebra Makefile.
+
 <<environment>>=
 SPADHELP=\
  ${HELP}/AssociationList.help  ${HELP}/BalancedBinaryTree.help \
@@ -2035,9 +2091,18 @@ SPADHELP=\
  ${HELP}/LiePolynomial.help   \
  ${HELP}/LinearOrdinaryDifferentialOperator.help \
  ${HELP}/LinearOrdinaryDifferentialOperator1.help \
- ${HELP}/LinearOrdinaryDifferentialOperator2.help \
+ ${HELP}/LinearOrdinaryDifferentialOperator2.help ${HELP}/List.help \
+ ${HELP}/LyndonWord.help       ${HELP}/Magma.help \
+ ${HELP}/MakeFunction.help     ${HELP}/MappingPackage1.help \
+ ${HELP}/MappingPackage2.help  ${HELP}/MappingPackage3.help \
+ ${HELP}/Matrix.help           ${HELP}/Multiset.help \
+ ${HELP}/MultivariatePolynomial.help ${HELP}/None.help \
+ ${HELP}/Octonion.help         ${HELP}/OneDimensionalArray.help \
+ ${HELP}/PlaneAlgebraicCurvePlot.help \
+ ${HELP}/Permutation.help \
  ${HELP}/RealSolvePackage.help \
- ${HELP}/RomanNumeral.help
+ ${HELP}/RomanNumeral.help \
+ ${HELP}/TwoDimensionalViewport.help
 
 @
 The algebra files contain input chunks in regress format.
@@ -2070,9 +2135,20 @@ REGRESS=\
  LieExponentials.regress  LiePolynomial.regress \
  LinearOrdinaryDifferentialOperator.regress \
  LinearOrdinaryDifferentialOperator1.regress \
- LinearOrdinaryDifferentialOperator2.regress \
+ LinearOrdinaryDifferentialOperator2.regress List.regress \
+ LyndonWord.regress        Magma.regress \
+ MakeFunction.regress      MappingPackage1.regress \
+ MappingPackage2.regress   MappingPackage3.regress \
+ Matrix.regress            Multiset.regress \
+ MultivariatePolynomial.regress None.regress \
+ Octonion.regress          OneDimensionalArray.regress \
  RealSolvePackage.regress \
- RomanNumeral.regress
+ PlaneAlgebraicCurvePlot.regress \
+ Permutation.regress \
+ RomanNumeral.regress 
+
+# this requires graphics
+# TwoDimensionalViewport
 
 %.regress: %.input
 	@ echo algebra regression testing $*
@@ -2446,8 +2522,133 @@ ${HELP}/LinearOrdinaryDifferentialOperator2.help: ${IN}/lodo.spad.pamphlet
            ${IN}/lodo.spad.pamphlet \
             >${INPUT}/LinearOrdinaryDifferentialOperator2.input
 
+${HELP}/List.help: ${IN}/list.spad.pamphlet
+	@echo 7040 create List.help from ${IN}/list.spad.pamphlet
+	@${TANGLE} -R"List.help" ${IN}/list.spad.pamphlet \
+           >${HELP}/List.help
+	@cp ${HELP}/List.help ${HELP}/LIST.help
+	@${TANGLE} -R"List.input" ${IN}/list.spad.pamphlet \
+            >${INPUT}/List.input
+
+${HELP}/LyndonWord.help: ${IN}/xlpoly.spad.pamphlet
+	@echo 7041 create LyndonWord.help from ${IN}/xlpoly.spad.pamphlet
+	@${TANGLE} -R"LyndonWord.help" ${IN}/xlpoly.spad.pamphlet \
+            >${HELP}/LyndonWord.help
+	@cp ${HELP}/LyndonWord.help ${HELP}/LWORD.help
+	@${TANGLE} -R"LyndonWord.input" ${IN}/xlpoly.spad.pamphlet \
+            >${INPUT}/LyndonWord.input
+
+${HELP}/Magma.help: ${IN}/xlpoly.spad.pamphlet
+	@echo 7042 create Magma.help from ${IN}/xlpoly.spad.pamphlet
+	@${TANGLE} -R"Magma.help" ${IN}/xlpoly.spad.pamphlet \
+            >${HELP}/Magma.help
+	@cp ${HELP}/Magma.help ${HELP}/MAGMA.help
+	@${TANGLE} -R"Magma.input" ${IN}/xlpoly.spad.pamphlet \
+            >${INPUT}/Magma.input
+
+${HELP}/MakeFunction.help: ${IN}/mkfunc.spad.pamphlet
+	@echo 7043 create MakeFunction.help from ${IN}/mkfunc.spad.pamphlet
+	@${TANGLE} -R"MakeFunction.help" ${IN}/mkfunc.spad.pamphlet \
+           >${HELP}/MakeFunction.help
+	@cp ${HELP}/MakeFunction.help ${HELP}/MKFUNC.help
+	@${TANGLE} -R"MakeFunction.input" ${IN}/mkfunc.spad.pamphlet \
+            >${INPUT}/MakeFunction.input
+
+${HELP}/MappingPackage1.help: ${IN}/mappkg.spad.pamphlet
+	@echo 7044 create MappingPackage1.help from ${IN}/mappkg.spad.pamphlet
+	@${TANGLE} -R"MappingPackage1.help" ${IN}/mappkg.spad.pamphlet \
+           >${HELP}/MappingPackage1.help
+	@cp ${HELP}/MappingPackage1.help ${HELP}/MAPPKG1.help
+	@${TANGLE} -R"MappingPackage1.input" ${IN}/mappkg.spad.pamphlet \
+            >${INPUT}/MappingPackage1.input
+
+${HELP}/MappingPackage2.help: ${IN}/mappkg.spad.pamphlet
+	@echo 7045 create MappingPackage2.help from ${IN}/mappkg.spad.pamphlet
+	@${TANGLE} -R"MappingPackage2.help" ${IN}/mappkg.spad.pamphlet \
+           >${HELP}/MappingPackage2.help
+	@cp ${HELP}/MappingPackage2.help ${HELP}/MAPPKG2.help
+	@${TANGLE} -R"MappingPackage2.input" ${IN}/mappkg.spad.pamphlet \
+            >${INPUT}/MappingPackage2.input
+
+${HELP}/MappingPackage3.help: ${IN}/mappkg.spad.pamphlet
+	@echo 7046 create MappingPackage3.help from ${IN}/mappkg.spad.pamphlet
+	@${TANGLE} -R"MappingPackage3.help" ${IN}/mappkg.spad.pamphlet \
+           >${HELP}/MappingPackage3.help
+	@cp ${HELP}/MappingPackage3.help ${HELP}/MAPPKG3.help
+	@${TANGLE} -R"MappingPackage3.input" ${IN}/mappkg.spad.pamphlet \
+            >${INPUT}/MappingPackage3.input
+
+${HELP}/Matrix.help: ${IN}/matrix.spad.pamphlet
+	@echo 7047 create Matrix.help from ${IN}/matrix.spad.pamphlet
+	@${TANGLE} -R"Matrix.help" ${IN}/matrix.spad.pamphlet \
+           >${HELP}/Matrix.help
+	@cp ${HELP}/Matrix.help ${HELP}/MATRIX.help
+	@${TANGLE} -R"Matrix.input" ${IN}/matrix.spad.pamphlet \
+            >${INPUT}/Matrix.input
+
+${HELP}/Multiset.help: ${IN}/mset.spad.pamphlet
+	@echo 7048 create Multiset.help from ${IN}/mset.spad.pamphlet
+	@${TANGLE} -R"Multiset.help" ${IN}/mset.spad.pamphlet \
+           >${HELP}/Multiset.help
+	@cp ${HELP}/Multiset.help ${HELP}/MSET.help
+	@${TANGLE} -R"Multiset.input" ${IN}/mset.spad.pamphlet \
+            >${INPUT}/Multiset.input
+
+${HELP}/MultivariatePolynomial.help: ${IN}/multpoly.spad.pamphlet
+	@echo 7049 create MultivariatePolynomial.help from \
+           ${IN}/multpoly.spad.pamphlet
+	@${TANGLE} -R"MultivariatePolynomial.help" \
+           ${IN}/multpoly.spad.pamphlet \
+           >${HELP}/MultivariatePolynomial.help
+	@cp ${HELP}/MultivariatePolynomial.help ${HELP}/MPOLY.help
+	@${TANGLE} -R"MultivariatePolynomial.input" \
+            ${IN}/multpoly.spad.pamphlet \
+            >${INPUT}/MultivariatePolynomial.input
+
+${HELP}/None.help: ${IN}/any.spad.pamphlet
+	@echo 7050 create None.help from ${IN}/any.spad.pamphlet
+	@${TANGLE} -R"None.help" ${IN}/any.spad.pamphlet >${HELP}/None.help
+	@cp ${HELP}/None.help ${HELP}/NONE.help
+	@${TANGLE} -R"None.input" ${IN}/any.spad.pamphlet >${INPUT}/None.input
+
+${HELP}/Octonion.help: ${IN}/oct.spad.pamphlet
+	@echo 7051 create Octonion.help from ${IN}/oct.spad.pamphlet
+	@${TANGLE} -R"Octonion.help" ${IN}/oct.spad.pamphlet \
+           >${HELP}/Octonion.help
+	@cp ${HELP}/Octonion.help ${HELP}/OCT.help
+	@${TANGLE} -R"Octonion.input" ${IN}/oct.spad.pamphlet \
+            >${INPUT}/Octonion.input
+
+${HELP}/OneDimensionalArray.help: ${IN}/array1.spad.pamphlet
+	@echo 7052 create OneDimensionalArray.help from \
+           ${IN}/array1.spad.pamphlet
+	@${TANGLE} -R"OneDimensionalArray.help" ${IN}/array1.spad.pamphlet \
+           >${HELP}/OneDimensionalArray.help
+	@cp ${HELP}/OneDimensionalArray.help ${HELP}/ARRAY1.help
+	@${TANGLE} -R"OneDimensionalArray.input" ${IN}/array1.spad.pamphlet \
+            >${INPUT}/OneDimensionalArray.input
+
+${HELP}/PlaneAlgebraicCurvePlot.help: ${IN}/acplot.spad.pamphlet
+	@echo 7053 create PlaneAlgebraicCurvePlot.help from \
+            ${IN}/acplot.spad.pamphlet
+	@${TANGLE} -R"PlaneAlgebraicCurvePlot.help" \
+          ${IN}/acplot.spad.pamphlet \
+           >${HELP}/PlaneAlgebraicCurvePlot.help
+	@cp ${HELP}/PlaneAlgebraicCurvePlot.help ${HELP}/ACPLOT.help
+	@${TANGLE} -R"PlaneAlgebraicCurvePlot.input" \
+           ${IN}/acplot.spad.pamphlet \
+            >${INPUT}/PlaneAlgebraicCurvePlot.input
+
+${HELP}/Permutation.help: ${IN}/perm.spad.pamphlet
+	@echo 7054 create Permutation.help from ${IN}/perm.spad.pamphlet
+	@${TANGLE} -R"Permutation.help" ${IN}/perm.spad.pamphlet \
+           >${HELP}/Permutation.help
+	@cp ${HELP}/Permutation.help ${HELP}/PERM.help
+	@${TANGLE} -R"Permutation.input" ${IN}/perm.spad.pamphlet \
+            >${INPUT}/Permutation.input
+
 ${HELP}/RealSolvePackage.help: ${IN}/acplot.spad.pamphlet
-	@echo 7040 create RealSolvePackage.help from ${IN}/acplot.spad.pamphlet
+	@echo 7055 create RealSolvePackage.help from ${IN}/acplot.spad.pamphlet
 	@${TANGLE} -R"RealSolvePackage.help" ${IN}/acplot.spad.pamphlet \
            >${HELP}/RealSolvePackage.help
 	@cp ${HELP}/RealSolvePackage.help ${HELP}/REALSOLV.help
@@ -2455,13 +2656,22 @@ ${HELP}/RealSolvePackage.help: ${IN}/acplot.spad.pamphlet
             >${INPUT}/RealSolvePackage.input
 
 ${HELP}/RomanNumeral.help: ${IN}/integer.spad.pamphlet
-	@echo 7041 create RomanNumeral.help from ${IN}/integer.spad.pamphlet
+	@echo 7056 create RomanNumeral.help from ${IN}/integer.spad.pamphlet
 	@${TANGLE} -R"RomanNumeral.help" ${IN}/integer.spad.pamphlet \
            >${HELP}/RomanNumeral.help
 	@cp ${HELP}/RomanNumeral.help ${HELP}/ROMAN.help
 	@${TANGLE} -R"RomanNumeral.input" ${IN}/integer.spad.pamphlet \
             >${INPUT}/RomanNumeral.input
 
+${HELP}/TwoDimensionalViewport.help: ${IN}/view2d.spad.pamphlet
+	@echo 7057 create TwoDimensionalViewport.help from \
+           ${IN}/view2d.spad.pamphlet
+	@${TANGLE} -R"TwoDimensionalViewport.help" \
+           ${IN}/view2d.spad.pamphlet \
+           >${HELP}/TwoDimensionalViewport.help 
+	@cp ${HELP}/TwoDimensionalViewport.help ${HELP}/VIEW2D.help
+# Note:no input regression file due to graphics
+
 @
 
 \section{The Makefile}
@@ -2499,7 +2709,7 @@ ${HELP}/RomanNumeral.help: ${IN}/integer.spad.pamphlet
 <<USERLAYER>>
 <<order>>
 
-all: src ${OUT}/libdb.text ${DOCFILES} ${TESTS} ${SPADBIN}/index.html \
+all: src ${OUT}/libdb.text ${DOCFILES} ${SPADBIN}/index.html \
         ${SPADHELP}
 	@ echo 4302 finished ${IN}
 
@@ -2539,7 +2749,6 @@ document: ${DOCFILES}
 <<genericRules>>
 
 <<spadhelp>>
-<<testrules>>
 <<ps (DOC from SRC)>>
 <<libdb.text (OUT from IN)>>
 <<stages>>
diff --git a/src/algebra/acplot.spad.pamphlet b/src/algebra/acplot.spad.pamphlet
index dfef292..b43e587 100644
--- a/src/algebra/acplot.spad.pamphlet
+++ b/src/algebra/acplot.spad.pamphlet
@@ -130,6 +130,10 @@ ans3 := realSolve(lp,lsv,0.01)$REALSOLV
 )lisp (bye)
 @
 <<RealSolvePackage.help>>=
+====================================================================
+RealSolvePackage examples
+====================================================================
+
   p := 4*x^3 - 3*x^2 + 2*x - 4
 
   ans1 := solve(p,0.01)$REALSOLV
@@ -212,25 +216,31 @@ RealSolvePackage(): _
 
 @
 \section{domain ACPLOT PlaneAlgebraicCurvePlot}
-\subsection{acplot input}
-<<TEST ACPLOT>>=
-makeSketch(x+y,x,y,-1/2..1/2,-1/2..1/2)
+<<PlaneAlgebraicCurvePlot.input>>=
+-- acplot.spad.pamphlet PlaneAlgebraicCurvePlot.input
+--S 1 of 1
+makeSketch(x+y,x,y,-1/2..1/2,-1/2..1/2)$ACPLOT
+--R   (1)                    ACPLOT
+--R                       1         1      1         1
+--R        y + x = 0,   - - <= x <= -,   - - <= y <= -
+--R                       2         2      2         2
+--R                        [0.5,-0.5]
+--R                        [-0.5,0.5]
+--R                                                Type: PlaneAlgebraicCurvePlot
+--E 1
 @
-\subsection{acplot examples}
-<<acplot.examples>>=
-\spadcommand{makeSketch(x+y,x,y,-1/2..1/2,-1/2..1/2)}
-$$
-\begin{array}{c}ACPLOT\\{\begin{array}{c}{{y+x}
-\mbox{\rm = 0} \mbox{\rm , } -{1 \over 2} \mbox{\rm <= } x \mbox{\rm <= } {1 
-\over 2} \mbox{\rm , } -{1 \over 2} \mbox{\rm <= } y \mbox{\rm <= } {1 \over 
-2}}\\{\begin{array}{c}{\begin{array}{c}{\left[ {0.5}, \: -{0.5} 
-\right]}\\{\left[
--{0.5}, \: {0.5} 
-\right]}\\\end{array}}\\\end{array}}\\\end{array}}\\\end{array}
-$$
-\returnType{Type: PlaneAlgebraicCurvePlot}
+<<PlaneAlgebraicCurvePlot.help>>=
+====================================================================
+PlaneAlgebraicCurvePlot examples
+====================================================================
+
+  makeSketch(x+y,x,y,-1/2..1/2,-1/2..1/2)$ACPLOT
+
+See Also:
+o )show PlaneAlgebraicCurvePlot
+o $AXIOM/doc/src/algebra/acplot.spad.dvi 
+
 @
-\subsection{acplot code}
 <<domain ACPLOT PlaneAlgebraicCurvePlot>>=
 --% PlaneAlgebraicCurvePlot
 ++ Plot a NON-SINGULAR plane algebraic curve p(x,y) = 0.
diff --git a/src/algebra/any.spad.pamphlet b/src/algebra/any.spad.pamphlet
index cabeec6..ef2f1b9 100644
--- a/src/algebra/any.spad.pamphlet
+++ b/src/algebra/any.spad.pamphlet
@@ -10,6 +10,72 @@
 \tableofcontents
 \eject
 \section{domain NONE None}
+<<None.input>>=
+-- any.spad.pamphlet None.input
+)spool None.output
+)set message test on
+)set message auto off
+)clear all
+--S 1 of 3
+[ ]
+--R 
+--R
+--R   (1)  []
+--R                                                              Type: List None
+--E 1
+
+--S 2 of 3
+[ ] :: List Float
+--R 
+--R
+--R   (2)  []
+--R                                                             Type: List Float
+--E 2
+
+--S 3 of 3
+[ ]$List(NonNegativeInteger)
+--R 
+--R
+--R   (3)  []
+--R                                                Type: List NonNegativeInteger
+--E 3 
+)spool
+)lisp (bye)
+@
+<<None.help>>=
+====================================================================
+None examples
+====================================================================
+
+The None domain is not very useful for interactive work but it is
+provided nevertheless for completeness of the Axiom type system.
+
+Probably the only place you will ever see it is if you enter an
+empty list with no type information.
+
+  [ ]
+    []
+                         Type: List None
+
+Such an empty list can be converted into an empty list of any other
+type.
+
+  [ ] :: List Float
+    []
+                         Type: List Float
+
+If you wish to produce an empty list of a particular type directly,
+such as List NonNegativeInteger, do it this way.
+
+  [ ]$List(NonNegativeInteger)
+    []
+                         Type: List NonNegativeInteger
+
+See Also:
+o )show None
+o $AXIOM/doc/src/algebra/any.spad.dvi
+
+@
 <<domain NONE None>>=
 )abbrev domain NONE None
 ++ Author:
diff --git a/src/algebra/array1.spad.pamphlet b/src/algebra/array1.spad.pamphlet
index 8c9e4af..10456d7 100644
--- a/src/algebra/array1.spad.pamphlet
+++ b/src/algebra/array1.spad.pamphlet
@@ -748,6 +748,162 @@ IndexedOneDimensionalArray(S:Type, mn:Integer):
 
 @
 \section{domain ARRAY1 OneDimensionalArray}
+<<OneDimensionalArray.input>>=
+-- array1.spad.pamphlet OneDimensionalArray.input
+)spool OneDimensionalArray.output
+)set message test on
+)set message auto off
+)clear all
+--S 1 of 9
+oneDimensionalArray [i**2 for i in 1..10]
+--R 
+--R
+--R   (1)  [1,4,9,16,25,36,49,64,81,100]
+--R                                    Type: OneDimensionalArray PositiveInteger
+--E 1
+
+--S 2 of 9
+a : ARRAY1 INT := new(10,0)
+--R 
+--R
+--R   (2)  [0,0,0,0,0,0,0,0,0,0]
+--R                                            Type: OneDimensionalArray Integer
+--E 2
+
+--S 3 of 9
+for i in 1..10 repeat a.i := i; a
+--R 
+--R
+--R   (3)  [1,2,3,4,5,6,7,8,9,10]
+--R                                            Type: OneDimensionalArray Integer
+--E 3
+
+--S 4 of 9
+map!(i +-> i ** 2,a); a
+--R 
+--R
+--R   (4)  [1,4,9,16,25,36,49,64,81,100]
+--R                                            Type: OneDimensionalArray Integer
+--E 4
+
+--S 5 of 9
+reverse! a
+--R 
+--R
+--R   (5)  [100,81,64,49,36,25,16,9,4,1]
+--R                                            Type: OneDimensionalArray Integer
+--E 5
+
+--S 6 of 9
+swap!(a,4,5); a
+--R 
+--R
+--R   (6)  [100,81,64,36,49,25,16,9,4,1]
+--R                                            Type: OneDimensionalArray Integer
+--E 6
+
+--S 7 of 9
+sort! a 
+--R 
+--R
+--R   (7)  [1,4,9,16,25,36,49,64,81,100]
+--R                                            Type: OneDimensionalArray Integer
+--E 7
+
+--S 8 of 9
+b := a(6..10)
+--R 
+--R
+--R   (8)  [36,49,64,81,100]
+--R                                            Type: OneDimensionalArray Integer
+--E 8
+
+--S 9 of 9
+copyInto!(a,b,1)
+--R 
+--R
+--R   (9)  [36,49,64,81,100,36,49,64,81,100]
+--R                                            Type: OneDimensionalArray Integer
+--E 9
+)spool
+)lisp (bye)
+@
+<<OneDimensionalArray.help>>=
+====================================================================
+OneDimensionalArray examples
+====================================================================
+
+The OneDimensionalArray domain is used for storing data in a
+one-dimensional indexed data structure.  Such an array is a
+homogeneous data structure in that all the entries of the array must
+belong to the same Axiom domain.  Each array has a fixed length
+specified by the user and arrays are not extensible.  The indexing of
+one-dimensional arrays is one-based.  This means that the "first"
+element of an array is given the index 1. 
+
+To create a one-dimensional array, apply the operation 
+oneDimensionalArray to a list.
+
+  oneDimensionalArray [i**2 for i in 1..10]
+    [1,4,9,16,25,36,49,64,81,100]
+                     Type: OneDimensionalArray PositiveInteger
+
+Another approach is to first create a, a one-dimensional array of 10
+0's.  OneDimensionalArray has the convenient abbreviation ARRAY1.
+
+  a : ARRAY1 INT := new(10,0)
+    [0,0,0,0,0,0,0,0,0,0]
+                     Type: OneDimensionalArray Integer
+
+Set each i-th element to i, then display the result.
+
+  for i in 1..10 repeat a.i := i; a
+    [1,2,3,4,5,6,7,8,9,10]
+                     Type: OneDimensionalArray Integer
+
+Square each element by mapping the function i +-> i^2 onto each element.
+
+  map!(i +-> i ** 2,a); a
+    [1,4,9,16,25,36,49,64,81,100]
+                     Type: OneDimensionalArray Integer
+
+Reverse the elements in place.
+
+  reverse! a
+    [100,81,64,49,36,25,16,9,4,1]
+                     Type: OneDimensionalArray Integer
+
+Swap the 4th and 5th element.
+
+  swap!(a,4,5); a
+    [100,81,64,36,49,25,16,9,4,1]
+                     Type: OneDimensionalArray Integer
+
+Sort the elements in place.
+
+  sort! a 
+    [1,4,9,16,25,36,49,64,81,100]
+                     Type: OneDimensionalArray Integer
+
+Create a new one-dimensional array b containing the last 5 elements of a.
+
+  b := a(6..10)
+    [36,49,64,81,100]
+                     Type: OneDimensionalArray Integer
+
+Replace the first 5 elements of a with those of b.
+
+  copyInto!(a,b,1)
+    [36,49,64,81,100,36,49,64,81,100]
+                     Type: OneDimensionalArray Integer
+
+See Also:
+o )help Vector
+o )help FlexibleArray
+o )show OneDimensionalArray
+o $AXIOM/doc/src/algebra/array1.spad.dvi
+
+@
 <<domain ARRAY1 OneDimensionalArray>>=
 )abbrev domain ARRAY1 OneDimensionalArray
 ++ This is the domain of 1-based one dimensional arrays
diff --git a/src/algebra/files.spad.pamphlet b/src/algebra/files.spad.pamphlet
index 184ab3e..ec29146 100644
--- a/src/algebra/files.spad.pamphlet
+++ b/src/algebra/files.spad.pamphlet
@@ -573,8 +573,9 @@ members ey
 )lisp (bye)
 @
 <<KeyedAccessFile.help>>=
-\section{KeyedAccessFile}
-\label{KeyedAccessFileXmpPage}
+====================================================================
+KeyedAccessFile examples
+====================================================================
 
 The domain KeyedAccessFile(S) provides files which can be used
 as associative tables.  Data values are stored in these files and can
diff --git a/src/algebra/fr.spad.pamphlet b/src/algebra/fr.spad.pamphlet
index 5bf65c4..ad4853a 100644
--- a/src/algebra/fr.spad.pamphlet
+++ b/src/algebra/fr.spad.pamphlet
@@ -1056,10 +1056,9 @@ Note that up to [[patch--40]] the following wrong definition was used:
 \end{verbatim}
 
 which causes wrong results as soon as units are involved, for example in 
-
-<<TEST FR>>=
+\begin{verbatim}
   D(factor (-x), x)
-@
+\end{verbatim}
 
 (Issue~\#176)
 
diff --git a/src/algebra/integer.spad.pamphlet b/src/algebra/integer.spad.pamphlet
index bb76998..b5e56d2 100644
--- a/src/algebra/integer.spad.pamphlet
+++ b/src/algebra/integer.spad.pamphlet
@@ -1487,6 +1487,10 @@ b rem a
 @
 
 <<RomanNumeral.help>>=
+====================================================================
+RomanNumeral Examples
+====================================================================
+
   a := roman(78)
     LXXVIII
                       Type: RomanNumeral
diff --git a/src/algebra/list.spad.pamphlet b/src/algebra/list.spad.pamphlet
index 1c534e9..4292df0 100644
--- a/src/algebra/list.spad.pamphlet
+++ b/src/algebra/list.spad.pamphlet
@@ -307,6 +307,565 @@ Note that this code is not included in the generated catdef.spad file.
 (MAKEPROP (QUOTE |IndexedList|) (QUOTE |infovec|) (LIST (QUOTE #(NIL NIL NIL NIL NIL NIL (|local| |#1|) (|local| |#2|) (|NonNegativeInteger|) |ILIST;#;$Nni;1| |ILIST;concat;S2$;2| (|Boolean|) |ILIST;eq?;2$B;3| |ILIST;first;$S;4| (QUOTE "first") |ILIST;elt;$firstS;5| |ILIST;empty;$;6| |ILIST;empty?;$B;7| |ILIST;rest;2$;8| (QUOTE "rest") |ILIST;elt;$rest$;9| |ILIST;setfirst!;$2S;10| |ILIST;setelt;$first2S;11| |ILIST;setrest!;3$;12| |ILIST;setelt;$rest2$;13| (|List| 6) |ILIST;construct;L$;14| |ILIST;parts;$L;15| |ILIST;reverse!;2$;16| |ILIST;reverse;2$;17| (|Integer|) |ILIST;minIndex;$I;18| |ILIST;rest;$Nni$;19| (0 . |cyclic?|) |ILIST;copy;2$;20| (5 . |cycleEntry|) (|OutputForm|) (10 . |coerce|) (|List| |$|) (15 . |bracket|) (|List| 36) (20 . |list|) (25 . |commaSeparate|) (30 . |overbar|) (35 . |concat!|) (41 . |coerce|) (46 . |=|) (52 . |=|) (|String|) (58 . |latex|) (63 . |latex|) (68 . |member?|) |ILIST;concat!;3$;25| (74 . |removeDuplicates!|) (|Mapping| 11 6 6) |ILIST;so!
rt!;M2$;27| |ILIST;merge!;M3$;28| |ILIST;split!;$I$;29| (|Mapping| 6 6 6) (|Equation| 6) (|List| 59) (|Mapping| 11 6) (|Void|) (|UniversalSegment| 30) (QUOTE "last") (QUOTE "value") (|Mapping| 6 6) (|InputForm|) (|SingleInteger|) (|List| 30) (|Union| 6 (QUOTE "failed")))) (QUOTE #(|~=| 79 |value| 85 |third| 90 |tail| 95 |swap!| 100 |split!| 107 |sorted?| 113 |sort!| 124 |sort| 135 |size?| 146 |setvalue!| 152 |setrest!| 158 |setlast!| 164 |setfirst!| 170 |setelt| 176 |setchildren!| 218 |select!| 224 |select| 230 |second| 236 |sample| 241 |reverse!| 245 |reverse| 250 |rest| 255 |removeDuplicates!| 266 |removeDuplicates| 271 |remove!| 276 |remove| 288 |reduce| 300 |qsetelt!| 321 |qelt| 328 |possiblyInfinite?| 334 |position| 339 |parts| 358 |nodes| 363 |node?| 368 |new| 374 |more?| 380 |minIndex| 386 |min| 391 |merge!| 397 |merge| 410 |members| 423 |member?| 428 |maxIndex| 434 |max| 439 |map!| 445 |map| 451 |list| 464 |less?| 469 |leaves| 475 |leaf?| 480 |latex| 485 |last| 490 |!
insert!| 501 |insert| 515 |indices| 529 |index?| 534 |hash| 5!
40 |first| 545 |find| 556 |fill!| 562 |explicitlyFinite?| 568 |every?| 573 |eval| 579 |eq?| 605 |entry?| 611 |entries| 617 |empty?| 622 |empty| 627 |elt| 631 |distance| 674 |delete!| 680 |delete| 692 |cyclic?| 704 |cycleTail| 709 |cycleSplit!| 714 |cycleLength| 719 |cycleEntry| 724 |count| 729 |copyInto!| 741 |copy| 748 |convert| 753 |construct| 758 |concat!| 763 |concat| 775 |coerce| 798 |children| 803 |child?| 808 |any?| 814 |>=| 820 |>| 826 |=| 832 |<=| 838 |<| 844 |#| 850)) (QUOTE ((|shallowlyMutable| . 0) (|finiteAggregate| . 0))) (CONS (|makeByteWordVec2| 7 (QUOTE (0 0 0 0 0 0 0 0 0 0 3 0 0 7 4 0 0 7 1 2 4))) (CONS (QUOTE #(|ListAggregate&| |StreamAggregate&| |ExtensibleLinearAggregate&| |FiniteLinearAggregate&| |UnaryRecursiveAggregate&| |LinearAggregate&| |RecursiveAggregate&| |IndexedAggregate&| |Collection&| |HomogeneousAggregate&| |OrderedSet&| |Aggregate&| |EltableAggregate&| |Evalable&| |SetCategory&| NIL NIL |InnerEvalable&| NIL NIL |BasicType&|)) (CONS (QUOTE !
#((|ListAggregate| 6) (|StreamAggregate| 6) (|ExtensibleLinearAggregate| 6) (|FiniteLinearAggregate| 6) (|UnaryRecursiveAggregate| 6) (|LinearAggregate| 6) (|RecursiveAggregate| 6) (|IndexedAggregate| 30 6) (|Collection| 6) (|HomogeneousAggregate| 6) (|OrderedSet|) (|Aggregate|) (|EltableAggregate| 30 6) (|Evalable| 6) (|SetCategory|) (|Type|) (|Eltable| 30 6) (|InnerEvalable| 6 6) (|CoercibleTo| 36) (|ConvertibleTo| 67) (|BasicType|))) (|makeByteWordVec2| 70 (QUOTE (1 0 11 0 33 1 0 0 0 35 1 6 36 0 37 1 36 0 38 39 1 40 0 36 41 1 36 0 38 42 1 36 0 0 43 2 40 0 0 36 44 1 0 36 0 45 2 6 11 0 0 46 2 0 11 0 0 47 1 6 48 0 49 1 0 48 0 50 2 0 11 6 0 51 1 0 0 0 53 2 1 11 0 0 1 1 0 6 0 1 1 0 6 0 1 1 0 0 0 1 3 0 62 0 30 30 1 2 0 0 0 30 57 1 3 11 0 1 2 0 11 54 0 1 1 3 0 0 1 2 0 0 54 0 55 1 3 0 0 1 2 0 0 54 0 1 2 0 11 0 8 1 2 0 6 0 6 1 2 0 0 0 0 23 2 0 6 0 6 1 2 0 6 0 6 21 3 0 6 0 30 6 1 3 0 6 0 63 6 1 3 0 6 0 64 6 1 3 0 0 0 19 0 24 3 0 6 0 14 6 22 3 0 6 0 65 6 1 2 0 0 0 38 1 2 0 0 61 0 1 !
2 0 0 61 0 1 1 0 6 0 1 0 0 0 1 1 0 0 0 28 1 0 0 0 29 2 0 0 0 !
8 32 1 0 0 0 18 1 1 0 0 53 1 1 0 0 1 2 1 0 6 0 1 2 0 0 61 0 1 2 1 0 6 0 1 2 0 0 61 0 1 4 1 6 58 0 6 6 1 2 0 6 58 0 1 3 0 6 58 0 6 1 3 0 6 0 30 6 1 2 0 6 0 30 1 1 0 11 0 1 2 1 30 6 0 1 3 1 30 6 0 30 1 2 0 30 61 0 1 1 0 25 0 27 1 0 38 0 1 2 1 11 0 0 1 2 0 0 8 6 1 2 0 11 0 8 1 1 5 30 0 31 2 3 0 0 0 1 2 3 0 0 0 1 3 0 0 54 0 0 56 2 3 0 0 0 1 3 0 0 54 0 0 1 1 0 25 0 1 2 1 11 6 0 51 1 5 30 0 1 2 3 0 0 0 1 2 0 0 66 0 1 3 0 0 58 0 0 1 2 0 0 66 0 1 1 0 0 6 1 2 0 11 0 8 1 1 0 25 0 1 1 0 11 0 1 1 1 48 0 50 2 0 0 0 8 1 1 0 6 0 1 3 0 0 6 0 30 1 3 0 0 0 0 30 1 3 0 0 0 0 30 1 3 0 0 6 0 30 1 1 0 69 0 1 2 0 11 30 0 1 1 1 68 0 1 2 0 0 0 8 1 1 0 6 0 13 2 0 70 61 0 1 2 0 0 0 6 1 1 0 11 0 1 2 0 11 61 0 1 3 6 0 0 6 6 1 3 6 0 0 25 25 1 2 6 0 0 59 1 2 6 0 0 60 1 2 0 11 0 0 12 2 1 11 6 0 1 1 0 25 0 1 1 0 11 0 17 0 0 0 16 2 0 6 0 30 1 3 0 6 0 30 6 1 2 0 0 0 63 1 2 0 6 0 64 1 2 0 0 0 19 20 2 0 6 0 14 15 2 0 6 0 65 1 2 0 30 0 0 1 2 0 0 0 63 1 2 0 0 0 30 1 2 0 0 0 63 1 2 0 0 0 30 1 1 0 11 0 33 1 0 0 0 1 !
1 0 0 0 1 1 0 8 0 1 1 0 0 0 35 2 1 8 6 0 1 2 0 8 61 0 1 3 0 0 0 0 30 1 1 0 0 0 34 1 2 67 0 1 1 0 0 25 26 2 0 0 0 0 52 2 0 0 0 6 1 1 0 0 38 1 2 0 0 0 6 1 2 0 0 6 0 10 2 0 0 0 0 1 1 1 36 0 45 1 0 38 0 1 2 1 11 0 0 1 2 0 11 61 0 1 2 3 11 0 0 1 2 3 11 0 0 1 2 1 11 0 0 47 2 3 11 0 0 1 2 3 11 0 0 1 1 0 8 0 9)))))) (QUOTE |lookupComplete|))) 
 @
 \section{domain LIST List}
+<<List.input>>=
+-- list.spad.pamphlet List.input
+)spool List.output
+)set message test on
+)set message auto off
+)clear all
+--S 1 of 34
+[2, 4, 5, 6]
+--R 
+--R
+--R   (1)  [2,4,5,6]
+--R                                                   Type: List PositiveInteger
+--E 1
+
+--S 2 of 34
+[1]
+--R 
+--R
+--R   (2)  [1]
+--R                                                   Type: List PositiveInteger
+--E 2
+
+--S 3 of 34
+list(1)
+--R 
+--R
+--R   (3)  [1]
+--R                                                   Type: List PositiveInteger
+--E 3
+
+--S 4 of 34
+append([1,2,3],[5,6,7])
+--R 
+--R
+--R   (4)  [1,2,3,5,6,7]
+--R                                                   Type: List PositiveInteger
+--E 4
+
+--S 5 of 34
+cons(10,[9,8,7])
+--R 
+--R
+--R   (5)  [10,9,8,7]
+--R                                                   Type: List PositiveInteger
+--E 5
+
+--S 6 of 34
+empty? [x+1]
+--R 
+--R
+--R   (6)  false
+--R                                                                Type: Boolean
+--E 6
+
+--S 7 of 34
+([] = nil)@Boolean
+--R 
+--R
+--R   (7)  true
+--R                                                                Type: Boolean
+--E 7
+
+--S 8 of 34
+k := [4,3,7,3,8,5,9,2]
+--R 
+--R
+--R   (8)  [4,3,7,3,8,5,9,2]
+--R                                                   Type: List PositiveInteger
+--E 8
+
+--S 9 of 34
+first k
+--R 
+--R
+--R   (9)  4
+--R                                                        Type: PositiveInteger
+--E 9
+
+--S 10 of 34
+k.first
+--R 
+--R
+--R   (10)  4
+--R                                                        Type: PositiveInteger
+--E 10
+
+--S 11 of 34
+k.1
+--R 
+--R
+--R   (11)  4
+--R                                                        Type: PositiveInteger
+--E 11
+
+--S 12 of 34
+k(1)
+--R 
+--R
+--R   (12)  4
+--R                                                        Type: PositiveInteger
+--E 12
+
+--S 13 of 34
+n := #k
+--R 
+--R
+--R   (13)  8
+--R                                                        Type: PositiveInteger
+--E 13
+
+--S 14 of 34
+last k
+--R 
+--R
+--R   (14)  2
+--R                                                        Type: PositiveInteger
+--E 14
+
+--S 15 of 34
+k.last
+--R 
+--R
+--R   (15)  2
+--R                                                        Type: PositiveInteger
+--E 15
+
+--S 16 of 34
+k.(#k)
+--R 
+--R
+--R   (16)  2
+--R                                                        Type: PositiveInteger
+--E 16
+
+--S 17 of 34
+k := [4,3,7,3,8,5,9,2]
+--R 
+--R
+--R   (17)  [4,3,7,3,8,5,9,2]
+--R                                                   Type: List PositiveInteger
+--E 17
+
+--S 18 of 34
+k.1 := 999
+--R 
+--R
+--R   (18)  999
+--R                                                        Type: PositiveInteger
+--E 18
+
+--S 19 of 34
+k
+--R 
+--R
+--R   (19)  [999,3,7,3,8,5,9,2]
+--R                                                   Type: List PositiveInteger
+--E 19
+
+--S 20 of 34
+k := [1,2]
+--R 
+--R
+--R   (20)  [1,2]
+--R                                                   Type: List PositiveInteger
+--E 20
+
+--S 21 of 34
+m := cons(0,k)
+--R 
+--R
+--R   (21)  [0,1,2]
+--R                                                           Type: List Integer
+--E 21
+
+--S 22 of 34
+m.2 := 99 
+--R 
+--R
+--R   (22)  99
+--R                                                        Type: PositiveInteger
+--E 22
+
+--S 23 of 34
+m 
+--R 
+--R
+--R   (23)  [0,99,2]
+--R                                                           Type: List Integer
+--E 23
+
+--S 24 of 34
+k
+--R 
+--R
+--R   (24)  [99,2]
+--R                                                   Type: List PositiveInteger
+--E 24
+
+--S 25 of 34
+k := [1,2,3]
+--R 
+--R
+--R   (25)  [1,2,3]
+--R                                                   Type: List PositiveInteger
+--E 25
+
+--S 26 of 34
+rest k
+--R 
+--R
+--R   (26)  [2,3]
+--R                                                   Type: List PositiveInteger
+--E 26
+
+--S 27 of 34
+removeDuplicates [4,3,4,3,5,3,4]
+--R 
+--R
+--R   (27)  [4,3,5]
+--R                                                   Type: List PositiveInteger
+--E 27
+
+--S 28 of 34
+reverse [1,2,3,4,5,6]
+--R 
+--R
+--R   (28)  [6,5,4,3,2,1]
+--R                                                   Type: List PositiveInteger
+--E 28
+
+--S 29 of 34
+member?(1/2,[3/4,5/6,1/2])
+--R 
+--R
+--R   (29)  true
+--R                                                                Type: Boolean
+--E 29
+
+--S 30 of 34
+member?(1/12,[3/4,5/6,1/2])
+--R 
+--R
+--R   (30)  false
+--R                                                                Type: Boolean
+--E 30
+
+--S 31 of 34
+reverse(rest(reverse(k)))
+--R 
+--R
+--R   (31)  [1,2]
+--R                                                   Type: List PositiveInteger
+--E 31
+
+--S 32 of 34
+[1..3,10,20..23]
+--R 
+--R
+--R   (32)  [1..3,10..10,20..23]
+--R                                           Type: List Segment PositiveInteger
+--E 32
+
+--S 33 of 34
+expand [1..3,10,20..23]
+--R 
+--R
+--R   (33)  [1,2,3,10,20,21,22,23]
+--R                                                           Type: List Integer
+--E 33
+
+--S 34 of 34
+expand [1..]
+--R 
+--R
+--R   (34)  [1,2,3,4,5,6,7,8,9,10,...]
+--R                                                         Type: Stream Integer
+--E 34
+)spool
+)lisp (bye)
+@
+<<List.help>>=
+====================================================================
+List examples
+====================================================================
+
+A list is a finite collection of elements in a specified order that
+can contain duplicates.  A list is a convenient structure to work with
+because it is easy to add or remove elements and the length need not
+be constant.  There are many different kinds of lists in Axiom, but
+the default types (and those used most often) are created by the List
+constructor.  For example, there are objects of type List Integer,
+List Float and List Polynomial Fraction Integer.  Indeed, you can even
+have List List List Boolean (that is, lists of lists of lists of
+Boolean values).  You can have lists of any type of Axiom object.
+
+====================================================================
+Creating Lists
+====================================================================
+
+The easiest way to create a list with, for example, the elements 
+2, 4, 5, 6 is to enclose the elements with square brackets and 
+separate the elements with commas.
+
+The spaces after the commas are optional, but they do improve the
+readability.
+
+  [2, 4, 5, 6]
+    [2,4,5,6]
+                          Type: List PositiveInteger
+
+To create a list with the single element 1, you can use either [1] or
+the operation list.
+
+  [1]
+    [1]
+                          Type: List PositiveInteger
+
+  list(1)
+    [1]
+                          Type: List PositiveInteger
+
+Once created, two lists k and m can be concatenated by issuing
+append(k,m).  append does not physically join the lists, but rather
+produces a new list with the elements coming from the two arguments.
+
+  append([1,2,3],[5,6,7])
+    [1,2,3,5,6,7]
+                           Type: List PositiveInteger
+
+Use cons to append an element onto the front of a list.
+
+  cons(10,[9,8,7])
+    [10,9,8,7]
+                           Type: List PositiveInteger
+
+====================================================================
+Accessing List Elements
+====================================================================
+
+To determine whether a list has any elements, use the operation empty?.
+
+  empty? [x+1]
+    false
+                           Type: Boolean
+
+Alternatively, equality with the list constant nil can be tested.
+
+  ([] = nil)@Boolean
+    true
+                           Type: Boolean
+
+We'll use this in some of the following examples.
+
+  k := [4,3,7,3,8,5,9,2]
+    [4,3,7,3,8,5,9,2]
+                           Type: List PositiveInteger
+
+Each of the next four expressions extracts the first element of k.
+
+  first k
+    4
+                           Type: PositiveInteger
+
+  k.first
+    4
+                           Type: PositiveInteger
+
+  k.1
+    4
+                           Type: PositiveInteger
+
+  k(1)
+    4
+                           Type: PositiveInteger
+
+The last two forms generalize to k.i and k(i), respectively, where 
+1 <= i <= n and n equals the length of k.
+
+This length is calculated by #.
+
+  n := #k
+    8
+                           Type: PositiveInteger
+
+Performing an operation such as k.i is sometimes referred to as
+indexing into k or elting into k.  The latter phrase comes about
+because the name of the operation that extracts elements is called
+elt.  That is, k.3 is just alternative syntax for elt(k,3).  It is
+important to remember that list indices begin with 1.  If we issue 
+k := [1,3,2,9,5] then k.4 returns 9.  It is an error to use an index
+that is not in the range from 1 to the length of the list.
+
+The last element of a list is extracted by any of the following three
+expressions.
+
+  last k
+    2
+                              Type: PositiveInteger
+
+  k.last
+    2
+                              Type: PositiveInteger
+
+This form computes the index of the last element and then extracts the
+element from the list.
+
+  k.(#k)
+    2
+                              Type: PositiveInteger
+
+====================================================================
+Changing List Elements
+====================================================================
+
+We'll use this in some of the following examples.
+
+  k := [4,3,7,3,8,5,9,2]
+    [4,3,7,3,8,5,9,2]
+                              Type: List PositiveInteger
+
+List elements are reset by using the k.i form on the left-hand side of 
+an assignment.  This expression resets the first element of k to 999.
+
+  k.1 := 999
+    999
+                              Type: PositiveInteger
+
+As with indexing into a list, it is an error to use an index that is
+not within the proper bounds.  Here you see that k was modified.
+
+  k
+    [999,3,7,3,8,5,9,2]
+                              Type: List PositiveInteger
+
+The operation that performs the assignment of an element to a
+particular position in a list is called setelt.  This operation is
+destructive in that it changes the list.  In the above example, the
+assignment returned the value 999 and k was modified.  For this
+reason, lists are called mutable objects: it is possible to change
+part of a list (mutate it) rather than always returning a new list
+reflecting the intended modifications.
+
+Moreover, since lists can share structure, changes to one list can
+sometimes affect others.
+
+  k := [1,2]
+    [1,2]
+                               Type: List PositiveInteger
+
+  m := cons(0,k)
+    [0,1,2]
+                               Type: List Integer
+
+Change the second element of m.
+
+  m.2 := 99 
+    99
+                               Type: PositiveInteger
+
+See, m was altered.
+
+  m 
+    [0,99,2]
+                               Type: List Integer
+
+But what about k?  It changed too!
+
+  k
+    [99,2]
+                               Type: List PositiveInteger
+
+====================================================================
+Other Functions
+====================================================================
+
+An operation that is used frequently in list processing is that
+which returns all elements in a list after the first element.
+
+  k := [1,2,3]
+    [1,2,3]
+                              Type: List PositiveInteger
+
+Use the rest operation to do this.
+
+  rest k
+    [2,3]
+                              Type: List PositiveInteger
+
+To remove duplicate elements in a list k, use removeDuplicates.
+
+  removeDuplicates [4,3,4,3,5,3,4]
+    [4,3,5]
+                              Type: List PositiveInteger
+
+To get a list with elements in the order opposite to those in a list
+k, use reverse.
+
+  reverse [1,2,3,4,5,6]
+    [6,5,4,3,2,1]
+                              Type: List PositiveInteger
+
+To test whether an element is in a list, use member?: member?(a,k)
+returns true or false depending on whether a is in k or not.
+
+  member?(1/2,[3/4,5/6,1/2])
+    true
+                              Type: Boolean
+
+  member?(1/12,[3/4,5/6,1/2])
+    false
+                              Type: Boolean
+
+We can get a list containing all but the last of the elements in a
+given non-empty list k.
+
+  reverse(rest(reverse(k)))
+    [1,2]
+                              Type: List PositiveInteger
+
+====================================================================
+Dot, Dot
+====================================================================
+
+Certain lists are used so often that Axiom provides an easy way of
+constructing them.  If n and m are integers, then expand [n..m]
+creates a list containing n, n+1, ... m.  If n > m then the list is
+empty.  It is actually permissible to leave off the m in the dot-dot
+construction (see below).
+
+The dot-dot notation can be used more than once in a list construction
+and with specific elements being given.  Items separated by dots are
+called segments.
+
+  [1..3,10,20..23]
+    [1..3,10..10,20..23]
+                             Type: List Segment PositiveInteger
+
+Segments can be expanded into the range of items between the endpoints
+by using expand.
+
+  expand [1..3,10,20..23]
+    [1,2,3,10,20,21,22,23]
+                             Type: List Integer
+
+What happens if we leave off a number on the right-hand side of ..?
+
+  expand [1..]
+    [1,2,3,4,5,6,7,8,9,10,...]
+                             Type: Stream Integer
+
+What is created in this case is a Stream which is a generalization of
+a list.
+
+See Also:
+o )help Stream
+o )show List
+o $AXIOM/doc/src/algebra/list.spad.dvi
+
+@
 <<domain LIST List>>=
 )abbrev domain LIST List
 ++ Author: Michael Monagan
diff --git a/src/algebra/mappkg.spad.pamphlet b/src/algebra/mappkg.spad.pamphlet
index f4d18db..5ec4358 100644
--- a/src/algebra/mappkg.spad.pamphlet
+++ b/src/algebra/mappkg.spad.pamphlet
@@ -77,6 +77,421 @@ MappingPackageInternalHacks3(A: SetCategory, B: SetCategory, C: SetCategory):_
 
 @
 \section{package MAPPKG1 MappingPackage1}
+<<MappingPackage1.input>>=
+-- mappkg.spad.pamphlet MappingPackage1.input
+)spool MappingPackage1.output
+)set message test on
+)set message auto off
+)clear all
+--S 1
+power(q: FRAC INT, n: INT): FRAC INT == q**n
+--R 
+--R   Function declaration power : (Fraction Integer,Integer) -> Fraction 
+--R      Integer has been added to workspace.
+--R                                                                   Type: Void
+--E 1
+
+--S 2
+power(2,3)
+--R 
+--R   Compiling function power with type (Fraction Integer,Integer) -> 
+--R      Fraction Integer 
+--R
+--R   (2)  8
+--R                                                       Type: Fraction Integer
+--E 2
+
+--S 3
+rewop := twist power
+--R 
+--R
+--R   (3)  theMap(MAPPKG3;twist;MM;5!0)
+--R                       Type: ((Integer,Fraction Integer) -> Fraction Integer)
+--E 3
+
+--S 4
+rewop(3, 2)
+--R 
+--R
+--R   (4)  8
+--R                                                       Type: Fraction Integer
+--E 4
+
+--S 5
+square: FRAC INT -> FRAC INT
+--R 
+--R                                                                   Type: Void
+--E 5
+
+--S 6
+square:= curryRight(power, 2)
+--R 
+--R
+--R   (6)  theMap(MAPPKG3;curryRight;MBM;1!0,0)
+--R                                 Type: (Fraction Integer -> Fraction Integer)
+--E 6
+
+--S 7
+square 4
+--R 
+--R
+--R   (7)  16
+--R                                                       Type: Fraction Integer
+--E 7
+
+--S 8
+squirrel:= constantRight(square)$MAPPKG3(FRAC INT,FRAC INT,FRAC INT)
+--R 
+--R
+--R   (8)  theMap(MAPPKG3;constantRight;MM;3!0)
+--R              Type: ((Fraction Integer,Fraction Integer) -> Fraction Integer)
+--E 8
+
+--S 9
+squirrel(1/2, 1/3)
+--R 
+--R
+--R        1
+--R   (9)  -
+--R        4
+--R                                                       Type: Fraction Integer
+--E 9
+
+--S 10
+sixteen := curry(square, 4/1)
+--R 
+--R
+--R   (10)  theMap(MAPPKG2;curry;MAM;2!0,0)
+--R                                               Type: (() -> Fraction Integer)
+--E 10
+
+--S 11
+sixteen()
+--R 
+--R
+--R   (11)  16
+--R                                                       Type: Fraction Integer
+--E 11
+
+--S 12
+square2:=square*square
+--R 
+--R
+--R   (12)  theMap(MAPPKG3;*;MMM;6!0,0)
+--R                                 Type: (Fraction Integer -> Fraction Integer)
+--E 12
+
+--S 13
+square2 3
+--R 
+--R
+--R   (13)  81
+--R                                                       Type: Fraction Integer
+--E 13
+
+--S 14
+sc(x: FRAC INT): FRAC INT == x + 1
+--R 
+--R   Function declaration sc : Fraction Integer -> Fraction Integer has 
+--R      been added to workspace.
+--R                                                                   Type: Void
+--E 14
+
+--S 15
+incfns := [sc**i for i in 0..10]
+--R 
+--R   Compiling function sc with type Fraction Integer -> Fraction Integer
+--R      
+--R
+--R   (15)
+--R   [theMap(MAPPKG1;**;MNniM;6!0,0), theMap(MAPPKG1;**;MNniM;6!0,0),
+--R    theMap(MAPPKG1;**;MNniM;6!0,0), theMap(MAPPKG1;**;MNniM;6!0,0),
+--R    theMap(MAPPKG1;**;MNniM;6!0,0), theMap(MAPPKG1;**;MNniM;6!0,0),
+--R    theMap(MAPPKG1;**;MNniM;6!0,0), theMap(MAPPKG1;**;MNniM;6!0,0),
+--R    theMap(MAPPKG1;**;MNniM;6!0,0), theMap(MAPPKG1;**;MNniM;6!0,0),
+--R    theMap(MAPPKG1;**;MNniM;6!0,0)]
+--R                            Type: List (Fraction Integer -> Fraction Integer)
+--E 15
+
+--S 16
+[f 4 for f in incfns]
+--R 
+--R
+--R   (16)  [4,5,6,7,8,9,10,11,12,13,14]
+--R                                                  Type: List Fraction Integer
+--E 16
+
+--S 17
+times(n:NNI, i:INT):INT == n*i
+--R 
+--R   Function declaration times : (NonNegativeInteger,Integer) -> Integer
+--R      has been added to workspace.
+--R                                                                   Type: Void
+--E 17
+
+--S 18
+r := recur(times)
+--R 
+--R   Compiling function times with type (NonNegativeInteger,Integer) -> 
+--R      Integer 
+--R
+--R   (18)  theMap(MAPPKG1;recur;2M;7!0,0)
+--R                              Type: ((NonNegativeInteger,Integer) -> Integer)
+--E 18
+
+--S 19
+fact := curryRight(r, 1)
+--R 
+--R
+--R   (19)  theMap(MAPPKG3;curryRight;MBM;1!0,0)
+--R                                        Type: (NonNegativeInteger -> Integer)
+--E 19
+
+--S 20
+fact 4
+--R 
+--R
+--R   (20)  24
+--R                                                        Type: PositiveInteger
+--E 20
+
+--S 21
+mto2ton(m, n) ==
+  raiser := square^n
+  raiser m
+--R 
+--R                                                                   Type: Void
+--E 21
+
+--S 22
+mto2ton(3, 3)
+--R 
+--R   Compiling function mto2ton with type (PositiveInteger,
+--R      PositiveInteger) -> Fraction Integer 
+--R
+--R   (22)  6561
+--R                                                       Type: Fraction Integer
+--E 22
+
+--S 23
+shiftfib(r: List INT) : INT ==
+  t := r.1
+  r.1 := r.2
+  r.2 := r.2 + t
+  t
+--R 
+--R   Function declaration shiftfib : List Integer -> Integer has been 
+--R      added to workspace.
+--R                                                                   Type: Void
+--E 23
+
+--S 24
+fibinit: List INT := [0, 1]
+--R 
+--R
+--R   (24)  [0,1]
+--R                                                           Type: List Integer
+--E 24
+
+--S 25
+fibs := curry(shiftfib, fibinit)
+--R 
+--R   Compiling function shiftfib with type List Integer -> Integer 
+--R
+--R   (25)  theMap(MAPPKG2;curry;MAM;2!0,0)
+--R                                                        Type: (() -> Integer)
+--E 25
+
+--S 26
+[fibs() for i in 0..30]
+--R 
+--R
+--R   (26)
+--R   [0, 1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89, 144, 233, 377, 610, 987, 1597,
+--R    2584, 4181, 6765, 10946, 17711, 28657, 46368, 75025, 121393, 196418,
+--R    317811, 514229, 832040]
+--R                                                           Type: List Integer
+--E 26
+)spool
+)lisp (bye)
+@
+<<MappingPackage1.help>>=
+====================================================================
+MappingPackage examples
+====================================================================
+
+Function are objects of type Mapping.  In this section we demonstrate
+some library operations from the packages MappingPackage1, MappingPackage2, 
+and MappingPackage3 that manipulate and create functions. Some terminology: 
+a nullary function takes no arguments, a unary function takes one argument, 
+and a binary function takes two arguments.
+
+We begin by creating an example function that raises a rational number
+to an integer exponent.
+
+  power(q: FRAC INT, n: INT): FRAC INT == q**n
+                      Type: Void
+
+  power(2,3)
+    8
+                       Type: Fraction Integer
+
+The twist operation transposes the arguments of a binary function.
+Here rewop(a, b) is power(b, a).
+
+  rewop := twist power
+    theMap(MAPPKG3;twist;MM;5!0)
+                       Type: ((Integer,Fraction Integer) -> Fraction Integer)
+
+This is 2^3.
+
+  rewop(3, 2)
+    8
+                       Type: Fraction Integer
+
+Now we define square in terms of power.
+
+  square: FRAC INT -> FRAC INT
+                       Type: Void
+The curryRight operation creates a unary function from a binary one by
+providing a constant argument on the right.
+
+  square:= curryRight(power, 2)
+    theMap(MAPPKG3;curryRight;MBM;1!0,0)
+                       Type: (Fraction Integer -> Fraction Integer)
+
+Likewise, the curryLeft operation provides a constant argument on the
+left.
+
+  square 4
+    16
+                       Type: Fraction Integer
+
+The constantRight operation creates (in a trivial way) a binary
+function from a unary one: constantRight(f) is the function g such
+that g(a,b)= f(a).
+
+  squirrel:= constantRight(square)$MAPPKG3(FRAC INT,FRAC INT,FRAC INT)
+    theMap(MAPPKG3;constantRight;MM;3!0)
+              Type: ((Fraction Integer,Fraction Integer) -> Fraction Integer)
+
+Likewise, constantLeft(f) is the function g such that g(a,b)= f(b).
+
+  squirrel(1/2, 1/3)
+    1
+    -
+    4
+                       Type: Fraction Integer
+
+The curry operation makes a unary function nullary.
+
+  sixteen := curry(square, 4/1)
+    theMap(MAPPKG2;curry;MAM;2!0,0)
+                       Type: (() -> Fraction Integer)
+
+  sixteen()
+    16
+                       Type: Fraction Integer
+
+The * operation constructs composed functions.
+
+  square2:=square*square
+    theMap(MAPPKG3;*;MMM;6!0,0)
+                       Type: (Fraction Integer -> Fraction Integer)
+
+  square2 3
+    81
+                       Type: Fraction Integer
+
+Use the ** operation to create functions that are n-fold iterations of
+other functions.
+
+  sc(x: FRAC INT): FRAC INT == x + 1
+                       Type: Void
+
+This is a list of Mapping objects.
+
+  incfns := [sc**i for i in 0..10]
+   [theMap(MAPPKG1;**;MNniM;6!0,0), theMap(MAPPKG1;**;MNniM;6!0,0),
+    theMap(MAPPKG1;**;MNniM;6!0,0), theMap(MAPPKG1;**;MNniM;6!0,0),
+    theMap(MAPPKG1;**;MNniM;6!0,0), theMap(MAPPKG1;**;MNniM;6!0,0),
+    theMap(MAPPKG1;**;MNniM;6!0,0), theMap(MAPPKG1;**;MNniM;6!0,0),
+    theMap(MAPPKG1;**;MNniM;6!0,0), theMap(MAPPKG1;**;MNniM;6!0,0),
+    theMap(MAPPKG1;**;MNniM;6!0,0)]
+                       Type: List (Fraction Integer -> Fraction Integer)
+
+This is a list of applications of those functions.
+
+  [f 4 for f in incfns]
+    [4,5,6,7,8,9,10,11,12,13,14]
+                       Type: List Fraction Integer
+
+Use the recur operation for recursion:
+
+  g := recur f means g(n,x) == f(n,f(n-1,...f(1,x))).
+
+  times(n:NNI, i:INT):INT == n*i
+                       Type: Void
+
+  r := recur(times)
+    theMap(MAPPKG1;recur;2M;7!0,0)
+                       Type: ((NonNegativeInteger,Integer) -> Integer)
+
+This is a factorial function.
+
+  fact := curryRight(r, 1)
+    theMap(MAPPKG3;curryRight;MBM;1!0,0)
+                       Type: (NonNegativeInteger -> Integer)
+
+  fact 4
+    24
+                       Type: PositiveInteger
+
+Constructed functions can be used within other functions.
+
+  mto2ton(m, n) ==
+    raiser := square^n
+    raiser m
+                       Type: Void
+
+This is 3^(2^3).
+
+  mto2ton(3, 3)
+    6561
+                       Type: Fraction Integer
+
+Here shiftfib is a unary function that modifies its argument.
+
+  shiftfib(r: List INT) : INT ==
+    t := r.1
+    r.1 := r.2
+    r.2 := r.2 + t
+    t
+                       Type: Void
+
+By currying over the argument we get a function with private state.
+
+  fibinit: List INT := [0, 1]
+    [0,1]
+                       Type: List Integer
+
+  fibs := curry(shiftfib, fibinit)
+    theMap(MAPPKG2;curry;MAM;2!0,0)
+                       Type: (() -> Integer)
+
+  [fibs() for i in 0..30]
+   [0, 1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89, 144, 233, 377, 610, 987, 1597,
+    2584, 4181, 6765, 10946, 17711, 28657, 46368, 75025, 121393, 196418,
+    317811, 514229, 832040]
+                       Type: List Integer
+
+See Also:
+o )help MappingPackage2
+o )help MappingPackage3
+o )show MappingPackage1
+o $AXIOM/doc/src/algebra/mappkg.spad.dvi
+
+@
 <<package MAPPKG1 MappingPackage1>>=
 )abbrev package MAPPKG1 MappingPackage1
 ++ Author: S.M.Watt and W.H.Burge
@@ -152,6 +567,421 @@ MappingPackage1(A:SetCategory): MPcat == MPdef where
 
 @
 \section{package MAPPKG2 MappingPackage2}
+<<MappingPackage2.input>>=
+-- mappkg.spad.pamphlet MappingPackage2.input
+)spool MappingPackage2.output
+)set message test on
+)set message auto off
+)clear all
+--S 1
+power(q: FRAC INT, n: INT): FRAC INT == q**n
+--R 
+--R   Function declaration power : (Fraction Integer,Integer) -> Fraction 
+--R      Integer has been added to workspace.
+--R                                                                   Type: Void
+--E 1
+
+--S 2
+power(2,3)
+--R 
+--R   Compiling function power with type (Fraction Integer,Integer) -> 
+--R      Fraction Integer 
+--R
+--R   (2)  8
+--R                                                       Type: Fraction Integer
+--E 2
+
+--S 3
+rewop := twist power
+--R 
+--R
+--R   (3)  theMap(MAPPKG3;twist;MM;5!0)
+--R                       Type: ((Integer,Fraction Integer) -> Fraction Integer)
+--E 3
+
+--S 4
+rewop(3, 2)
+--R 
+--R
+--R   (4)  8
+--R                                                       Type: Fraction Integer
+--E 4
+
+--S 5
+square: FRAC INT -> FRAC INT
+--R 
+--R                                                                   Type: Void
+--E 5
+
+--S 6
+square:= curryRight(power, 2)
+--R 
+--R
+--R   (6)  theMap(MAPPKG3;curryRight;MBM;1!0,0)
+--R                                 Type: (Fraction Integer -> Fraction Integer)
+--E 6
+
+--S 7
+square 4
+--R 
+--R
+--R   (7)  16
+--R                                                       Type: Fraction Integer
+--E 7
+
+--S 8
+squirrel:= constantRight(square)$MAPPKG3(FRAC INT,FRAC INT,FRAC INT)
+--R 
+--R
+--R   (8)  theMap(MAPPKG3;constantRight;MM;3!0)
+--R              Type: ((Fraction Integer,Fraction Integer) -> Fraction Integer)
+--E 8
+
+--S 9
+squirrel(1/2, 1/3)
+--R 
+--R
+--R        1
+--R   (9)  -
+--R        4
+--R                                                       Type: Fraction Integer
+--E 9
+
+--S 10
+sixteen := curry(square, 4/1)
+--R 
+--R
+--R   (10)  theMap(MAPPKG2;curry;MAM;2!0,0)
+--R                                               Type: (() -> Fraction Integer)
+--E 10
+
+--S 11
+sixteen()
+--R 
+--R
+--R   (11)  16
+--R                                                       Type: Fraction Integer
+--E 11
+
+--S 12
+square2:=square*square
+--R 
+--R
+--R   (12)  theMap(MAPPKG3;*;MMM;6!0,0)
+--R                                 Type: (Fraction Integer -> Fraction Integer)
+--E 12
+
+--S 13
+square2 3
+--R 
+--R
+--R   (13)  81
+--R                                                       Type: Fraction Integer
+--E 13
+
+--S 14
+sc(x: FRAC INT): FRAC INT == x + 1
+--R 
+--R   Function declaration sc : Fraction Integer -> Fraction Integer has 
+--R      been added to workspace.
+--R                                                                   Type: Void
+--E 14
+
+--S 15
+incfns := [sc**i for i in 0..10]
+--R 
+--R   Compiling function sc with type Fraction Integer -> Fraction Integer
+--R      
+--R
+--R   (15)
+--R   [theMap(MAPPKG1;**;MNniM;6!0,0), theMap(MAPPKG1;**;MNniM;6!0,0),
+--R    theMap(MAPPKG1;**;MNniM;6!0,0), theMap(MAPPKG1;**;MNniM;6!0,0),
+--R    theMap(MAPPKG1;**;MNniM;6!0,0), theMap(MAPPKG1;**;MNniM;6!0,0),
+--R    theMap(MAPPKG1;**;MNniM;6!0,0), theMap(MAPPKG1;**;MNniM;6!0,0),
+--R    theMap(MAPPKG1;**;MNniM;6!0,0), theMap(MAPPKG1;**;MNniM;6!0,0),
+--R    theMap(MAPPKG1;**;MNniM;6!0,0)]
+--R                            Type: List (Fraction Integer -> Fraction Integer)
+--E 15
+
+--S 16
+[f 4 for f in incfns]
+--R 
+--R
+--R   (16)  [4,5,6,7,8,9,10,11,12,13,14]
+--R                                                  Type: List Fraction Integer
+--E 16
+
+--S 17
+times(n:NNI, i:INT):INT == n*i
+--R 
+--R   Function declaration times : (NonNegativeInteger,Integer) -> Integer
+--R      has been added to workspace.
+--R                                                                   Type: Void
+--E 17
+
+--S 18
+r := recur(times)
+--R 
+--R   Compiling function times with type (NonNegativeInteger,Integer) -> 
+--R      Integer 
+--R
+--R   (18)  theMap(MAPPKG1;recur;2M;7!0,0)
+--R                              Type: ((NonNegativeInteger,Integer) -> Integer)
+--E 18
+
+--S 19
+fact := curryRight(r, 1)
+--R 
+--R
+--R   (19)  theMap(MAPPKG3;curryRight;MBM;1!0,0)
+--R                                        Type: (NonNegativeInteger -> Integer)
+--E 19
+
+--S 20
+fact 4
+--R 
+--R
+--R   (20)  24
+--R                                                        Type: PositiveInteger
+--E 20
+
+--S 21
+mto2ton(m, n) ==
+  raiser := square^n
+  raiser m
+--R 
+--R                                                                   Type: Void
+--E 21
+
+--S 22
+mto2ton(3, 3)
+--R 
+--R   Compiling function mto2ton with type (PositiveInteger,
+--R      PositiveInteger) -> Fraction Integer 
+--R
+--R   (22)  6561
+--R                                                       Type: Fraction Integer
+--E 22
+
+--S 23
+shiftfib(r: List INT) : INT ==
+  t := r.1
+  r.1 := r.2
+  r.2 := r.2 + t
+  t
+--R 
+--R   Function declaration shiftfib : List Integer -> Integer has been 
+--R      added to workspace.
+--R                                                                   Type: Void
+--E 23
+
+--S 24
+fibinit: List INT := [0, 1]
+--R 
+--R
+--R   (24)  [0,1]
+--R                                                           Type: List Integer
+--E 24
+
+--S 25
+fibs := curry(shiftfib, fibinit)
+--R 
+--R   Compiling function shiftfib with type List Integer -> Integer 
+--R
+--R   (25)  theMap(MAPPKG2;curry;MAM;2!0,0)
+--R                                                        Type: (() -> Integer)
+--E 25
+
+--S 26
+[fibs() for i in 0..30]
+--R 
+--R
+--R   (26)
+--R   [0, 1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89, 144, 233, 377, 610, 987, 1597,
+--R    2584, 4181, 6765, 10946, 17711, 28657, 46368, 75025, 121393, 196418,
+--R    317811, 514229, 832040]
+--R                                                           Type: List Integer
+--E 26
+)spool
+)lisp (bye)
+@
+<<MappingPackage2.help>>=
+====================================================================
+MappingPackage examples
+====================================================================
+
+Function are objects of type Mapping.  In this section we demonstrate
+some library operations from the packages MappingPackage1, MappingPackage2, 
+and MappingPackage3 that manipulate and create functions. Some terminology: 
+a nullary function takes no arguments, a unary function takes one argument, 
+and a binary function takes two arguments.
+
+We begin by creating an example function that raises a rational number
+to an integer exponent.
+
+  power(q: FRAC INT, n: INT): FRAC INT == q**n
+                      Type: Void
+
+  power(2,3)
+    8
+                       Type: Fraction Integer
+
+The twist operation transposes the arguments of a binary function.
+Here rewop(a, b) is power(b, a).
+
+  rewop := twist power
+    theMap(MAPPKG3;twist;MM;5!0)
+                       Type: ((Integer,Fraction Integer) -> Fraction Integer)
+
+This is 2^3.
+
+  rewop(3, 2)
+    8
+                       Type: Fraction Integer
+
+Now we define square in terms of power.
+
+  square: FRAC INT -> FRAC INT
+                       Type: Void
+The curryRight operation creates a unary function from a binary one by
+providing a constant argument on the right.
+
+  square:= curryRight(power, 2)
+    theMap(MAPPKG3;curryRight;MBM;1!0,0)
+                       Type: (Fraction Integer -> Fraction Integer)
+
+Likewise, the curryLeft operation provides a constant argument on the
+left.
+
+  square 4
+    16
+                       Type: Fraction Integer
+
+The constantRight operation creates (in a trivial way) a binary
+function from a unary one: constantRight(f) is the function g such
+that g(a,b)= f(a).
+
+  squirrel:= constantRight(square)$MAPPKG3(FRAC INT,FRAC INT,FRAC INT)
+    theMap(MAPPKG3;constantRight;MM;3!0)
+              Type: ((Fraction Integer,Fraction Integer) -> Fraction Integer)
+
+Likewise, constantLeft(f) is the function g such that g(a,b)= f(b).
+
+  squirrel(1/2, 1/3)
+    1
+    -
+    4
+                       Type: Fraction Integer
+
+The curry operation makes a unary function nullary.
+
+  sixteen := curry(square, 4/1)
+    theMap(MAPPKG2;curry;MAM;2!0,0)
+                       Type: (() -> Fraction Integer)
+
+  sixteen()
+    16
+                       Type: Fraction Integer
+
+The * operation constructs composed functions.
+
+  square2:=square*square
+    theMap(MAPPKG3;*;MMM;6!0,0)
+                       Type: (Fraction Integer -> Fraction Integer)
+
+  square2 3
+    81
+                       Type: Fraction Integer
+
+Use the ** operation to create functions that are n-fold iterations of
+other functions.
+
+  sc(x: FRAC INT): FRAC INT == x + 1
+                       Type: Void
+
+This is a list of Mapping objects.
+
+  incfns := [sc**i for i in 0..10]
+   [theMap(MAPPKG1;**;MNniM;6!0,0), theMap(MAPPKG1;**;MNniM;6!0,0),
+    theMap(MAPPKG1;**;MNniM;6!0,0), theMap(MAPPKG1;**;MNniM;6!0,0),
+    theMap(MAPPKG1;**;MNniM;6!0,0), theMap(MAPPKG1;**;MNniM;6!0,0),
+    theMap(MAPPKG1;**;MNniM;6!0,0), theMap(MAPPKG1;**;MNniM;6!0,0),
+    theMap(MAPPKG1;**;MNniM;6!0,0), theMap(MAPPKG1;**;MNniM;6!0,0),
+    theMap(MAPPKG1;**;MNniM;6!0,0)]
+                       Type: List (Fraction Integer -> Fraction Integer)
+
+This is a list of applications of those functions.
+
+  [f 4 for f in incfns]
+    [4,5,6,7,8,9,10,11,12,13,14]
+                       Type: List Fraction Integer
+
+Use the recur operation for recursion:
+
+  g := recur f means g(n,x) == f(n,f(n-1,...f(1,x))).
+
+  times(n:NNI, i:INT):INT == n*i
+                       Type: Void
+
+  r := recur(times)
+    theMap(MAPPKG1;recur;2M;7!0,0)
+                       Type: ((NonNegativeInteger,Integer) -> Integer)
+
+This is a factorial function.
+
+  fact := curryRight(r, 1)
+    theMap(MAPPKG3;curryRight;MBM;1!0,0)
+                       Type: (NonNegativeInteger -> Integer)
+
+  fact 4
+    24
+                       Type: PositiveInteger
+
+Constructed functions can be used within other functions.
+
+  mto2ton(m, n) ==
+    raiser := square^n
+    raiser m
+                       Type: Void
+
+This is 3^(2^3).
+
+  mto2ton(3, 3)
+    6561
+                       Type: Fraction Integer
+
+Here shiftfib is a unary function that modifies its argument.
+
+  shiftfib(r: List INT) : INT ==
+    t := r.1
+    r.1 := r.2
+    r.2 := r.2 + t
+    t
+                       Type: Void
+
+By currying over the argument we get a function with private state.
+
+  fibinit: List INT := [0, 1]
+    [0,1]
+                       Type: List Integer
+
+  fibs := curry(shiftfib, fibinit)
+    theMap(MAPPKG2;curry;MAM;2!0,0)
+                       Type: (() -> Integer)
+
+  [fibs() for i in 0..30]
+   [0, 1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89, 144, 233, 377, 610, 987, 1597,
+    2584, 4181, 6765, 10946, 17711, 28657, 46368, 75025, 121393, 196418,
+    317811, 514229, 832040]
+                       Type: List Integer
+
+See Also:
+o )help MappingPackage1
+o )help MappingPackage3
+o )show MappingPackage2
+o $AXIOM/doc/src/algebra/mappkg.spad.dvi
+
+@
 <<package MAPPKG2 MappingPackage2>>=
 )abbrev package MAPPKG2 MappingPackage2
 ++ Description: various Currying operations.
@@ -194,6 +1024,421 @@ MappingPackage2(A:SetCategory, C:SetCategory): MPcat == MPdef where
 
 @
 \section{package MAPPKG3 MappingPackage3}
+<<MappingPackage3.input>>=
+-- mappkg.spad.pamphlet MappingPackage3.input
+)spool MappingPackage3.output
+)set message test on
+)set message auto off
+)clear all
+--S 1
+power(q: FRAC INT, n: INT): FRAC INT == q**n
+--R 
+--R   Function declaration power : (Fraction Integer,Integer) -> Fraction 
+--R      Integer has been added to workspace.
+--R                                                                   Type: Void
+--E 1
+
+--S 2
+power(2,3)
+--R 
+--R   Compiling function power with type (Fraction Integer,Integer) -> 
+--R      Fraction Integer 
+--R
+--R   (2)  8
+--R                                                       Type: Fraction Integer
+--E 2
+
+--S 3
+rewop := twist power
+--R 
+--R
+--R   (3)  theMap(MAPPKG3;twist;MM;5!0)
+--R                       Type: ((Integer,Fraction Integer) -> Fraction Integer)
+--E 3
+
+--S 4
+rewop(3, 2)
+--R 
+--R
+--R   (4)  8
+--R                                                       Type: Fraction Integer
+--E 4
+
+--S 5
+square: FRAC INT -> FRAC INT
+--R 
+--R                                                                   Type: Void
+--E 5
+
+--S 6
+square:= curryRight(power, 2)
+--R 
+--R
+--R   (6)  theMap(MAPPKG3;curryRight;MBM;1!0,0)
+--R                                 Type: (Fraction Integer -> Fraction Integer)
+--E 6
+
+--S 7
+square 4
+--R 
+--R
+--R   (7)  16
+--R                                                       Type: Fraction Integer
+--E 7
+
+--S 8
+squirrel:= constantRight(square)$MAPPKG3(FRAC INT,FRAC INT,FRAC INT)
+--R 
+--R
+--R   (8)  theMap(MAPPKG3;constantRight;MM;3!0)
+--R              Type: ((Fraction Integer,Fraction Integer) -> Fraction Integer)
+--E 8
+
+--S 9
+squirrel(1/2, 1/3)
+--R 
+--R
+--R        1
+--R   (9)  -
+--R        4
+--R                                                       Type: Fraction Integer
+--E 9
+
+--S 10
+sixteen := curry(square, 4/1)
+--R 
+--R
+--R   (10)  theMap(MAPPKG2;curry;MAM;2!0,0)
+--R                                               Type: (() -> Fraction Integer)
+--E 10
+
+--S 11
+sixteen()
+--R 
+--R
+--R   (11)  16
+--R                                                       Type: Fraction Integer
+--E 11
+
+--S 12
+square2:=square*square
+--R 
+--R
+--R   (12)  theMap(MAPPKG3;*;MMM;6!0,0)
+--R                                 Type: (Fraction Integer -> Fraction Integer)
+--E 12
+
+--S 13
+square2 3
+--R 
+--R
+--R   (13)  81
+--R                                                       Type: Fraction Integer
+--E 13
+
+--S 14
+sc(x: FRAC INT): FRAC INT == x + 1
+--R 
+--R   Function declaration sc : Fraction Integer -> Fraction Integer has 
+--R      been added to workspace.
+--R                                                                   Type: Void
+--E 14
+
+--S 15
+incfns := [sc**i for i in 0..10]
+--R 
+--R   Compiling function sc with type Fraction Integer -> Fraction Integer
+--R      
+--R
+--R   (15)
+--R   [theMap(MAPPKG1;**;MNniM;6!0,0), theMap(MAPPKG1;**;MNniM;6!0,0),
+--R    theMap(MAPPKG1;**;MNniM;6!0,0), theMap(MAPPKG1;**;MNniM;6!0,0),
+--R    theMap(MAPPKG1;**;MNniM;6!0,0), theMap(MAPPKG1;**;MNniM;6!0,0),
+--R    theMap(MAPPKG1;**;MNniM;6!0,0), theMap(MAPPKG1;**;MNniM;6!0,0),
+--R    theMap(MAPPKG1;**;MNniM;6!0,0), theMap(MAPPKG1;**;MNniM;6!0,0),
+--R    theMap(MAPPKG1;**;MNniM;6!0,0)]
+--R                            Type: List (Fraction Integer -> Fraction Integer)
+--E 15
+
+--S 16
+[f 4 for f in incfns]
+--R 
+--R
+--R   (16)  [4,5,6,7,8,9,10,11,12,13,14]
+--R                                                  Type: List Fraction Integer
+--E 16
+
+--S 17
+times(n:NNI, i:INT):INT == n*i
+--R 
+--R   Function declaration times : (NonNegativeInteger,Integer) -> Integer
+--R      has been added to workspace.
+--R                                                                   Type: Void
+--E 17
+
+--S 18
+r := recur(times)
+--R 
+--R   Compiling function times with type (NonNegativeInteger,Integer) -> 
+--R      Integer 
+--R
+--R   (18)  theMap(MAPPKG1;recur;2M;7!0,0)
+--R                              Type: ((NonNegativeInteger,Integer) -> Integer)
+--E 18
+
+--S 19
+fact := curryRight(r, 1)
+--R 
+--R
+--R   (19)  theMap(MAPPKG3;curryRight;MBM;1!0,0)
+--R                                        Type: (NonNegativeInteger -> Integer)
+--E 19
+
+--S 20
+fact 4
+--R 
+--R
+--R   (20)  24
+--R                                                        Type: PositiveInteger
+--E 20
+
+--S 21
+mto2ton(m, n) ==
+  raiser := square^n
+  raiser m
+--R 
+--R                                                                   Type: Void
+--E 21
+
+--S 22
+mto2ton(3, 3)
+--R 
+--R   Compiling function mto2ton with type (PositiveInteger,
+--R      PositiveInteger) -> Fraction Integer 
+--R
+--R   (22)  6561
+--R                                                       Type: Fraction Integer
+--E 22
+
+--S 23
+shiftfib(r: List INT) : INT ==
+  t := r.1
+  r.1 := r.2
+  r.2 := r.2 + t
+  t
+--R 
+--R   Function declaration shiftfib : List Integer -> Integer has been 
+--R      added to workspace.
+--R                                                                   Type: Void
+--E 23
+
+--S 24
+fibinit: List INT := [0, 1]
+--R 
+--R
+--R   (24)  [0,1]
+--R                                                           Type: List Integer
+--E 24
+
+--S 25
+fibs := curry(shiftfib, fibinit)
+--R 
+--R   Compiling function shiftfib with type List Integer -> Integer 
+--R
+--R   (25)  theMap(MAPPKG2;curry;MAM;2!0,0)
+--R                                                        Type: (() -> Integer)
+--E 25
+
+--S 26
+[fibs() for i in 0..30]
+--R 
+--R
+--R   (26)
+--R   [0, 1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89, 144, 233, 377, 610, 987, 1597,
+--R    2584, 4181, 6765, 10946, 17711, 28657, 46368, 75025, 121393, 196418,
+--R    317811, 514229, 832040]
+--R                                                           Type: List Integer
+--E 26
+)spool
+)lisp (bye)
+@
+<<MappingPackage3.help>>=
+====================================================================
+MappingPackage examples
+====================================================================
+
+Function are objects of type Mapping.  In this section we demonstrate
+some library operations from the packages MappingPackage1, MappingPackage2, 
+and MappingPackage3 that manipulate and create functions. Some terminology: 
+a nullary function takes no arguments, a unary function takes one argument, 
+and a binary function takes two arguments.
+
+We begin by creating an example function that raises a rational number
+to an integer exponent.
+
+  power(q: FRAC INT, n: INT): FRAC INT == q**n
+                      Type: Void
+
+  power(2,3)
+    8
+                       Type: Fraction Integer
+
+The twist operation transposes the arguments of a binary function.
+Here rewop(a, b) is power(b, a).
+
+  rewop := twist power
+    theMap(MAPPKG3;twist;MM;5!0)
+                       Type: ((Integer,Fraction Integer) -> Fraction Integer)
+
+This is 2^3.
+
+  rewop(3, 2)
+    8
+                       Type: Fraction Integer
+
+Now we define square in terms of power.
+
+  square: FRAC INT -> FRAC INT
+                       Type: Void
+The curryRight operation creates a unary function from a binary one by
+providing a constant argument on the right.
+
+  square:= curryRight(power, 2)
+    theMap(MAPPKG3;curryRight;MBM;1!0,0)
+                       Type: (Fraction Integer -> Fraction Integer)
+
+Likewise, the curryLeft operation provides a constant argument on the
+left.
+
+  square 4
+    16
+                       Type: Fraction Integer
+
+The constantRight operation creates (in a trivial way) a binary
+function from a unary one: constantRight(f) is the function g such
+that g(a,b)= f(a).
+
+  squirrel:= constantRight(square)$MAPPKG3(FRAC INT,FRAC INT,FRAC INT)
+    theMap(MAPPKG3;constantRight;MM;3!0)
+              Type: ((Fraction Integer,Fraction Integer) -> Fraction Integer)
+
+Likewise, constantLeft(f) is the function g such that g(a,b)= f(b).
+
+  squirrel(1/2, 1/3)
+    1
+    -
+    4
+                       Type: Fraction Integer
+
+The curry operation makes a unary function nullary.
+
+  sixteen := curry(square, 4/1)
+    theMap(MAPPKG2;curry;MAM;2!0,0)
+                       Type: (() -> Fraction Integer)
+
+  sixteen()
+    16
+                       Type: Fraction Integer
+
+The * operation constructs composed functions.
+
+  square2:=square*square
+    theMap(MAPPKG3;*;MMM;6!0,0)
+                       Type: (Fraction Integer -> Fraction Integer)
+
+  square2 3
+    81
+                       Type: Fraction Integer
+
+Use the ** operation to create functions that are n-fold iterations of
+other functions.
+
+  sc(x: FRAC INT): FRAC INT == x + 1
+                       Type: Void
+
+This is a list of Mapping objects.
+
+  incfns := [sc**i for i in 0..10]
+   [theMap(MAPPKG1;**;MNniM;6!0,0), theMap(MAPPKG1;**;MNniM;6!0,0),
+    theMap(MAPPKG1;**;MNniM;6!0,0), theMap(MAPPKG1;**;MNniM;6!0,0),
+    theMap(MAPPKG1;**;MNniM;6!0,0), theMap(MAPPKG1;**;MNniM;6!0,0),
+    theMap(MAPPKG1;**;MNniM;6!0,0), theMap(MAPPKG1;**;MNniM;6!0,0),
+    theMap(MAPPKG1;**;MNniM;6!0,0), theMap(MAPPKG1;**;MNniM;6!0,0),
+    theMap(MAPPKG1;**;MNniM;6!0,0)]
+                       Type: List (Fraction Integer -> Fraction Integer)
+
+This is a list of applications of those functions.
+
+  [f 4 for f in incfns]
+    [4,5,6,7,8,9,10,11,12,13,14]
+                       Type: List Fraction Integer
+
+Use the recur operation for recursion:
+
+  g := recur f means g(n,x) == f(n,f(n-1,...f(1,x))).
+
+  times(n:NNI, i:INT):INT == n*i
+                       Type: Void
+
+  r := recur(times)
+    theMap(MAPPKG1;recur;2M;7!0,0)
+                       Type: ((NonNegativeInteger,Integer) -> Integer)
+
+This is a factorial function.
+
+  fact := curryRight(r, 1)
+    theMap(MAPPKG3;curryRight;MBM;1!0,0)
+                       Type: (NonNegativeInteger -> Integer)
+
+  fact 4
+    24
+                       Type: PositiveInteger
+
+Constructed functions can be used within other functions.
+
+  mto2ton(m, n) ==
+    raiser := square^n
+    raiser m
+                       Type: Void
+
+This is 3^(2^3).
+
+  mto2ton(3, 3)
+    6561
+                       Type: Fraction Integer
+
+Here shiftfib is a unary function that modifies its argument.
+
+  shiftfib(r: List INT) : INT ==
+    t := r.1
+    r.1 := r.2
+    r.2 := r.2 + t
+    t
+                       Type: Void
+
+By currying over the argument we get a function with private state.
+
+  fibinit: List INT := [0, 1]
+    [0,1]
+                       Type: List Integer
+
+  fibs := curry(shiftfib, fibinit)
+    theMap(MAPPKG2;curry;MAM;2!0,0)
+                       Type: (() -> Integer)
+
+  [fibs() for i in 0..30]
+   [0, 1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89, 144, 233, 377, 610, 987, 1597,
+    2584, 4181, 6765, 10946, 17711, 28657, 46368, 75025, 121393, 196418,
+    317811, 514229, 832040]
+                       Type: List Integer
+
+See Also:
+o )help MappingPackage1
+o )help MappingPackage2
+o )show MappingPackage3
+o $AXIOM/doc/src/algebra/mappkg.spad.dvi
+
+@
 <<package MAPPKG3 MappingPackage3>>=
 )abbrev package MAPPKG3 MappingPackage3
 ++ Description: various Currying operations.
diff --git a/src/algebra/matrix.spad.pamphlet b/src/algebra/matrix.spad.pamphlet
index 3704e00..7b7a10f 100644
--- a/src/algebra/matrix.spad.pamphlet
+++ b/src/algebra/matrix.spad.pamphlet
@@ -78,6 +78,918 @@ IndexedMatrix(R,mnRow,mnCol): Exports == Implementation where
 
 @
 \section{domain MATRIX Matrix}
+<<Matrix.input>>=
+-- matrix.spad.pamphlet Matrix.input
+)spool Matrix.output
+)set message test on
+)set message auto off
+)clear all
+--S 1 of 38
+m : Matrix(Integer) := new(3,3,0)
+--R 
+--R
+--R        +0  0  0+
+--R        |       |
+--R   (1)  |0  0  0|
+--R        |       |
+--R        +0  0  0+
+--R                                                         Type: Matrix Integer
+--E 1
+
+--S 2 of 38
+setelt(m,2,3,5)
+--R 
+--R
+--R   (2)  5
+--R                                                        Type: PositiveInteger
+--E 2
+
+--S 3 of 38
+m(1,2) := 10
+--R 
+--R
+--R   (3)  10
+--R                                                        Type: PositiveInteger
+--E 3
+
+--S 4 of 38
+m
+--R 
+--R
+--R        +0  10  0+
+--R        |        |
+--R   (4)  |0  0   5|
+--R        |        |
+--R        +0  0   0+
+--R                                                         Type: Matrix Integer
+--E 4
+
+--S 5 of 38
+matrix [ [1,2,3,4],[0,9,8,7] ]
+--R 
+--R
+--R        +1  2  3  4+
+--R   (5)  |          |
+--R        +0  9  8  7+
+--R                                                         Type: Matrix Integer
+--E 5
+
+--S 6 of 38
+dm := diagonalMatrix [1,x**2,x**3,x**4,x**5]
+--R 
+--R
+--R        +1  0   0   0   0 +
+--R        |                 |
+--R        |    2            |
+--R        |0  x   0   0   0 |
+--R        |                 |
+--R        |        3        |
+--R   (6)  |0  0   x   0   0 |
+--R        |                 |
+--R        |            4    |
+--R        |0  0   0   x   0 |
+--R        |                 |
+--R        |                5|
+--R        +0  0   0   0   x +
+--R                                              Type: Matrix Polynomial Integer
+--E 6
+
+--S 7 of 38
+setRow!(dm,5,vector [1,1,1,1,1])
+--R 
+--R
+--R        +1  0   0   0   0+
+--R        |                |
+--R        |    2           |
+--R        |0  x   0   0   0|
+--R        |                |
+--R   (7)  |        3       |
+--R        |0  0   x   0   0|
+--R        |                |
+--R        |            4   |
+--R        |0  0   0   x   0|
+--R        |                |
+--R        +1  1   1   1   1+
+--R                                              Type: Matrix Polynomial Integer
+--E 7
+
+--S 8 of 38
+setColumn!(dm,2,vector [y,y,y,y,y])
+--R 
+--R
+--R        +1  y  0   0   0+
+--R        |               |
+--R        |0  y  0   0   0|
+--R        |               |
+--R        |       3       |
+--R   (8)  |0  y  x   0   0|
+--R        |               |
+--R        |           4   |
+--R        |0  y  0   x   0|
+--R        |               |
+--R        +1  y  1   1   1+
+--R                                              Type: Matrix Polynomial Integer
+--E 8
+
+--S 9 of 38
+cdm := copy(dm)
+--R 
+--R
+--R        +1  y  0   0   0+
+--R        |               |
+--R        |0  y  0   0   0|
+--R        |               |
+--R        |       3       |
+--R   (9)  |0  y  x   0   0|
+--R        |               |
+--R        |           4   |
+--R        |0  y  0   x   0|
+--R        |               |
+--R        +1  y  1   1   1+
+--R                                              Type: Matrix Polynomial Integer
+--E 9
+
+--S 10 of 38
+setelt(dm,4,1,1-x**7)
+--R 
+--R
+--R            7
+--R   (10)  - x  + 1
+--R                                                     Type: Polynomial Integer
+--E 10
+
+--S 11 of 38
+[dm,cdm]
+--R 
+--R
+--R          +   1      y  0   0   0+ +1  y  0   0   0+
+--R          |                      | |               |
+--R          |   0      y  0   0   0| |0  y  0   0   0|
+--R          |                      | |               |
+--R          |              3       | |       3       |
+--R   (11)  [|   0      y  x   0   0|,|0  y  x   0   0|]
+--R          |                      | |               |
+--R          |   7              4   | |           4   |
+--R          |- x  + 1  y  0   x   0| |0  y  0   x   0|
+--R          |                      | |               |
+--R          +   1      y  1   1   1+ +1  y  1   1   1+
+--R                                         Type: List Matrix Polynomial Integer
+--E 11
+
+--S 12 of 38
+subMatrix(dm,2,3,2,4)
+--R 
+--R
+--R         +y  0   0+
+--R   (12)  |        |
+--R         |    3   |
+--R         +y  x   0+
+--R                                              Type: Matrix Polynomial Integer
+--E 12
+
+--S 13 of 38
+d := diagonalMatrix [1.2,-1.3,1.4,-1.5]
+--R 
+--R
+--R         +1.2   0.0   0.0   0.0 +
+--R         |                      |
+--R         |0.0  - 1.3  0.0   0.0 |
+--R   (13)  |                      |
+--R         |0.0   0.0   1.4   0.0 |
+--R         |                      |
+--R         +0.0   0.0   0.0  - 1.5+
+--R                                                           Type: Matrix Float
+--E 13
+
+--S 14 of 38
+e := matrix [ [6.7,9.11],[-31.33,67.19] ]
+--R 
+--R
+--R         +  6.7    9.11 +
+--R   (14)  |              |
+--R         +- 31.33  67.19+
+--R                                                           Type: Matrix Float
+--E 14
+
+--S 15 of 38
+setsubMatrix!(d,1,2,e)
+--R 
+--R
+--R         +1.2    6.7    9.11    0.0 +
+--R         |                          |
+--R         |0.0  - 31.33  67.19   0.0 |
+--R   (15)  |                          |
+--R         |0.0    0.0     1.4    0.0 |
+--R         |                          |
+--R         +0.0    0.0     0.0   - 1.5+
+--R                                                           Type: Matrix Float
+--E 15
+
+--S 16 of 38
+d
+--R 
+--R
+--R         +1.2    6.7    9.11    0.0 +
+--R         |                          |
+--R         |0.0  - 31.33  67.19   0.0 |
+--R   (16)  |                          |
+--R         |0.0    0.0     1.4    0.0 |
+--R         |                          |
+--R         +0.0    0.0     0.0   - 1.5+
+--R                                                           Type: Matrix Float
+--E 16
+
+--S 17 of 38
+a := matrix [ [1/2,1/3,1/4],[1/5,1/6,1/7] ]
+--R 
+--R
+--R         +1  1  1+
+--R         |-  -  -|
+--R         |2  3  4|
+--R   (17)  |       |
+--R         |1  1  1|
+--R         |-  -  -|
+--R         +5  6  7+
+--R                                                Type: Matrix Fraction Integer
+--E 17
+
+--S 18 of 38
+b := matrix [ [3/5,3/7,3/11],[3/13,3/17,3/19] ] 
+--R 
+--R
+--R         +3   3    3+
+--R         |-   -   --|
+--R         |5   7   11|
+--R   (18)  |          |
+--R         | 3   3   3|
+--R         |--  --  --|
+--R         +13  17  19+
+--R                                                Type: Matrix Fraction Integer
+--E 18
+
+--S 19 of 38
+horizConcat(a,b)
+--R 
+--R
+--R         +1  1  1  3   3    3+
+--R         |-  -  -  -   -   --|
+--R         |2  3  4  5   7   11|
+--R   (19)  |                   |
+--R         |1  1  1   3   3   3|
+--R         |-  -  -  --  --  --|
+--R         +5  6  7  13  17  19+
+--R                                                Type: Matrix Fraction Integer
+--E 19
+
+--S 20 of 38
+vab := vertConcat(a,b)
+--R 
+--R
+--R         +1   1   1 +
+--R         |-   -   - |
+--R         |2   3   4 |
+--R         |          |
+--R         |1   1   1 |
+--R         |-   -   - |
+--R         |5   6   7 |
+--R   (20)  |          |
+--R         |3   3    3|
+--R         |-   -   --|
+--R         |5   7   11|
+--R         |          |
+--R         | 3   3   3|
+--R         |--  --  --|
+--R         +13  17  19+
+--R                                                Type: Matrix Fraction Integer
+--E 20
+
+--S 21 of 38
+transpose vab
+--R 
+--R
+--R         +1  1  3    3+
+--R         |-  -  -   --|
+--R         |2  5  5   13|
+--R         |            |
+--R         |1  1  3    3|
+--R   (21)  |-  -  -   --|
+--R         |3  6  7   17|
+--R         |            |
+--R         |1  1   3   3|
+--R         |-  -  --  --|
+--R         +4  7  11  19+
+--R                                                Type: Matrix Fraction Integer
+--E 21
+
+--S 22 of 38
+m := matrix [ [1,2],[3,4] ]
+--R 
+--R
+--R         +1  2+
+--R   (22)  |    |
+--R         +3  4+
+--R                                                         Type: Matrix Integer
+--E 22
+
+--S 23 of 38
+4 * m * (-5)
+--R 
+--R
+--R         +- 20  - 40+
+--R   (23)  |          |
+--R         +- 60  - 80+
+--R                                                         Type: Matrix Integer
+--E 23
+
+--S 24 of 38
+n := matrix([ [1,0,-2],[-3,5,1] ])
+--R 
+--R
+--R         + 1   0  - 2+
+--R   (24)  |           |
+--R         +- 3  5   1 +
+--R                                                         Type: Matrix Integer
+--E 24
+
+--S 25 of 38
+m * n
+--R 
+--R
+--R         +- 5  10   0 +
+--R   (25)  |            |
+--R         +- 9  20  - 2+
+--R                                                         Type: Matrix Integer
+--E 25
+
+--S 26 of 38
+vec := column(n,3)
+--R 
+--R
+--R   (26)  [- 2,1]
+--R                                                         Type: Vector Integer
+--E 26
+
+--S 27 of 38
+vec * m
+--R 
+--R
+--R   (27)  [1,0]
+--R                                                         Type: Vector Integer
+--E 27
+
+--S 28 of 38
+m * vec
+--R 
+--R
+--R   (28)  [0,- 2]
+--R                                                         Type: Vector Integer
+--E 28
+
+--S 29 of 38
+hilb := matrix([ [1/(i + j) for i in 1..3] for j in 1..3])
+--R 
+--R
+--R         +1  1  1+
+--R         |-  -  -|
+--R         |2  3  4|
+--R         |       |
+--R         |1  1  1|
+--R   (29)  |-  -  -|
+--R         |3  4  5|
+--R         |       |
+--R         |1  1  1|
+--R         |-  -  -|
+--R         +4  5  6+
+--R                                                Type: Matrix Fraction Integer
+--E 29
+
+--S 30 of 38
+inverse(hilb)
+--R 
+--R
+--R         + 72    - 240   180 +
+--R         |                   |
+--R   (30)  |- 240   900   - 720|
+--R         |                   |
+--R         + 180   - 720   600 +
+--R                                     Type: Union(Matrix Fraction Integer,...)
+--E 30
+
+--S 31 of 38
+mm := matrix([ [1,2,3,4], [5,6,7,8], [9,10,11,12], [13,14,15,16] ])
+--R 
+--R
+--R         +1   2   3   4 +
+--R         |              |
+--R         |5   6   7   8 |
+--R   (31)  |              |
+--R         |9   10  11  12|
+--R         |              |
+--R         +13  14  15  16+
+--R                                                         Type: Matrix Integer
+--E 31
+
+--S 32 of 38
+inverse(mm)
+--R 
+--R
+--R   (32)  "failed"
+--R                                                    Type: Union("failed",...)
+--E 32
+
+--S 33 of 38
+determinant(mm)
+--R 
+--R
+--R   (33)  0
+--R                                                     Type: NonNegativeInteger
+--E 33
+
+--S 34 of 38
+trace(mm)
+--R 
+--R
+--R   (34)  34
+--R                                                        Type: PositiveInteger
+--E 34
+
+--S 35 of 38
+rank(mm)
+--R 
+--R
+--R   (35)  2
+--R                                                        Type: PositiveInteger
+--E 35
+
+--S 36 of 38
+nullity(mm)
+--R 
+--R
+--R   (36)  2
+--R                                                        Type: PositiveInteger
+--E 36
+
+--S 37 of 38
+nullSpace(mm)
+--R 
+--R
+--R   (37)  [[1,- 2,1,0],[2,- 3,0,1]]
+--R                                                    Type: List Vector Integer
+--E 37
+
+--S 38 of 38
+rowEchelon(mm)
+--R 
+--R
+--R         +1  2  3  4 +
+--R         |           |
+--R         |0  4  8  12|
+--R   (38)  |           |
+--R         |0  0  0  0 |
+--R         |           |
+--R         +0  0  0  0 +
+--R                                                         Type: Matrix Integer
+--E 38
+)spool
+)lisp (bye)
+@
+<<Matrix.help>>=
+====================================================================
+Matrix examples
+====================================================================
+
+The Matrix domain provides arithmetic operations on matrices
+and standard functions from linear algebra.
+This domain is similar to the TwoDimensionalArray domain, except
+that the entries for Matrix must belong to a  Ring.
+
+====================================================================
+Creating Matrices
+====================================================================
+
+There are many ways to create a matrix from a collection of values or
+from existing matrices.
+
+If the matrix has almost all items equal to the same value, use new to
+create a matrix filled with that value and then reset the entries that
+are different.
+
+  m : Matrix(Integer) := new(3,3,0)
+    +0  0  0+
+    |       |
+    |0  0  0|
+    |       |
+    +0  0  0+
+                      Type: Matrix Integer
+
+To change the entry in the second row, third column to 5, use setelt.
+
+  setelt(m,2,3,5)
+    5
+                      Type: PositiveInteger
+
+An alternative syntax is to use assignment.
+
+  m(1,2) := 10
+    10
+                      Type: PositiveInteger
+
+The matrix was destructively modified.
+
+  m
+    +0  10  0+
+    |        |
+    |0  0   5|
+    |        |
+    +0  0   0+
+                      Type: Matrix Integer
+
+If you already have the matrix entries as a list of lists, use matrix.
+
+  matrix [ [1,2,3,4],[0,9,8,7] ]
+    +1  2  3  4+
+    |          |
+    +0  9  8  7+
+                      Type: Matrix Integer
+
+If the matrix is diagonal, use diagonalMatrix.
+
+  dm := diagonalMatrix [1,x**2,x**3,x**4,x**5]
+        +1  0   0   0   0 +
+        |                 |
+        |    2            |
+        |0  x   0   0   0 |
+        |                 |
+        |        3        |
+        |0  0   x   0   0 |
+        |                 |
+        |            4    |
+        |0  0   0   x   0 |
+        |                 |
+        |                5|
+        +0  0   0   0   x +
+                     Type: Matrix Polynomial Integer
+
+Use setRow and setColumn to change a row or column of a matrix.
+
+  setRow!(dm,5,vector [1,1,1,1,1])
+        +1  0   0   0   0+
+        |                |
+        |    2           |
+        |0  x   0   0   0|
+        |                |
+        |        3       |
+        |0  0   x   0   0|
+        |                |
+        |            4   |
+        |0  0   0   x   0|
+        |                |
+        +1  1   1   1   1+
+                    Type: Matrix Polynomial Integer
+
+  setColumn!(dm,2,vector [y,y,y,y,y])
+        +1  y  0   0   0+
+        |               |
+        |0  y  0   0   0|
+        |               |
+        |       3       |
+        |0  y  x   0   0|
+        |               |
+        |           4   |
+        |0  y  0   x   0|
+        |               |
+        +1  y  1   1   1+
+                    Type: Matrix Polynomial Integer
+
+Use copy to make a copy of a matrix.
+
+  cdm := copy(dm)
+        +1  y  0   0   0+
+        |               |
+        |0  y  0   0   0|
+        |               |
+        |       3       |
+        |0  y  x   0   0|
+        |               |
+        |           4   |
+        |0  y  0   x   0|
+        |               |
+        +1  y  1   1   1+
+                    Type: Matrix Polynomial Integer
+
+This is useful if you intend to modify a matrix destructively but
+want a copy of the original.
+
+  setelt(dm,4,1,1-x**7)
+        7
+     - x  + 1
+                    Type: Polynomial Integer
+
+  [dm,cdm]
+          +   1      y  0   0   0+ +1  y  0   0   0+
+          |                      | |               |
+          |   0      y  0   0   0| |0  y  0   0   0|
+          |                      | |               |
+          |              3       | |       3       |
+         [|   0      y  x   0   0|,|0  y  x   0   0|]
+          |                      | |               |
+          |   7              4   | |           4   |
+          |- x  + 1  y  0   x   0| |0  y  0   x   0|
+          |                      | |               |
+          +   1      y  1   1   1+ +1  y  1   1   1+
+                     Type: List Matrix Polynomial Integer
+
+Use subMatrix to extract part of an existing matrix.  The syntax is 
+subMatrix(m, firstrow, lastrow, firstcol, lastcol).
+
+  subMatrix(dm,2,3,2,4)
+         +y  0   0+
+         |        |
+         |    3   |
+         +y  x   0+
+                     Type: Matrix Polynomial Integer
+
+To change a submatrix, use setsubMatrix.
+
+  d := diagonalMatrix [1.2,-1.3,1.4,-1.5]
+         +1.2   0.0   0.0   0.0 +
+         |                      |
+         |0.0  - 1.3  0.0   0.0 |
+         |                      |
+         |0.0   0.0   1.4   0.0 |
+         |                      |
+         +0.0   0.0   0.0  - 1.5+
+                     Type: Matrix Float
+
+If e is too big to fit where you specify, an error message is
+displayed.  Use subMatrix to extract part of e, if necessary.
+
+  e := matrix [ [6.7,9.11],[-31.33,67.19] ]
+         +  6.7    9.11 +
+         |              |
+         +- 31.33  67.19+
+                      Type: Matrix Float
+
+This changes the submatrix of d whose upper left corner is at the
+first row and second column and whose size is that of e.
+
+  setsubMatrix!(d,1,2,e)
+         +1.2    6.7    9.11    0.0 +
+         |                          |
+         |0.0  - 31.33  67.19   0.0 |
+         |                          |
+         |0.0    0.0     1.4    0.0 |
+         |                          |
+         +0.0    0.0     0.0   - 1.5+
+                       Type: Matrix Float
+
+  d
+         +1.2    6.7    9.11    0.0 +
+         |                          |
+         |0.0  - 31.33  67.19   0.0 |
+         |                          |
+         |0.0    0.0     1.4    0.0 |
+         |                          |
+         +0.0    0.0     0.0   - 1.5+
+                        Type: Matrix Float
+
+Matrices can be joined either horizontally or vertically to make
+new matrices.
+
+  a := matrix [ [1/2,1/3,1/4],[1/5,1/6,1/7] ]
+         +1  1  1+
+         |-  -  -|
+         |2  3  4|
+         |       |
+         |1  1  1|
+         |-  -  -|
+         +5  6  7+
+                         Type: Matrix Fraction Integer
+
+  b := matrix [ [3/5,3/7,3/11],[3/13,3/17,3/19] ] 
+         +3   3    3+
+         |-   -   --|
+         |5   7   11|
+         |          |
+         | 3   3   3|
+         |--  --  --|
+         +13  17  19+
+                         Type: Matrix Fraction Integer
+
+Use horizConcat to append them side to side.  The two matrices must
+have the same number of rows.
+
+  horizConcat(a,b)
+         +1  1  1  3   3    3+
+         |-  -  -  -   -   --|
+         |2  3  4  5   7   11|
+         |                   |
+         |1  1  1   3   3   3|
+         |-  -  -  --  --  --|
+         +5  6  7  13  17  19+
+                         Type: Matrix Fraction Integer
+
+Use vertConcat to stack one upon the other.  The two matrices must
+have the same number of columns.
+
+  vab := vertConcat(a,b)
+         +1   1   1 +
+         |-   -   - |
+         |2   3   4 |
+         |          |
+         |1   1   1 |
+         |-   -   - |
+         |5   6   7 |
+         |          |
+         |3   3    3|
+         |-   -   --|
+         |5   7   11|
+         |          |
+         | 3   3   3|
+         |--  --  --|
+         +13  17  19+
+                         Type: Matrix Fraction Integer
+
+The operation transpose is used to create a new matrix by reflection
+across the main diagonal.
+
+  transpose vab
+         +1  1  3    3+
+         |-  -  -   --|
+         |2  5  5   13|
+         |            |
+         |1  1  3    3|
+         |-  -  -   --|
+         |3  6  7   17|
+         |            |
+         |1  1   3   3|
+         |-  -  --  --|
+         +4  7  11  19+
+                         Type: Matrix Fraction Integer
+
+====================================================================
+Operations on Matrices
+====================================================================
+
+Axiom provides both left and right scalar multiplication.
+
+  m := matrix [ [1,2],[3,4] ]
+         +1  2+
+         |    |
+         +3  4+
+                          Type: Matrix Integer
+
+  4 * m * (-5)
+         +- 20  - 40+
+         |          |
+         +- 60  - 80+
+                          Type: Matrix Integer
+
+You can add, subtract, and multiply matrices provided, of course, that
+the matrices have compatible dimensions.  If not, an error message is
+displayed.
+
+  n := matrix([ [1,0,-2],[-3,5,1] ])
+         + 1   0  - 2+
+         |           |
+         +- 3  5   1 +
+                          Type: Matrix Integer
+
+This following product is defined but n * m is not.
+
+  m * n
+         +- 5  10   0 +
+         |            |
+         +- 9  20  - 2+
+                          Type: Matrix Integer
+
+The operations nrows and ncols return the number of rows and columns
+of a matrix.  You can extract a row or a column of a matrix using the
+operations row and column.  The object returned is a Vector.
+
+Here is the third column of the matrix n.
+
+  vec := column(n,3)
+     [- 2,1]
+                          Type: Vector Integer
+
+You can multiply a matrix on the left by a "row vector" and on the right
+by a "column vector".
+
+  vec * m
+     [1,0]
+                          Type: Vector Integer
+
+Of course, the dimensions of the vector and the matrix must be compatible
+or an error message is returned.
+
+  m * vec
+    [0,- 2]
+                          Type: Vector Integer
+
+The operation inverse computes the inverse of a matrix if the matrix
+is invertible, and returns "failed" if not.
+
+This Hilbert matrix is invertible.
+
+  hilb := matrix([ [1/(i + j) for i in 1..3] for j in 1..3])
+         +1  1  1+
+         |-  -  -|
+         |2  3  4|
+         |       |
+         |1  1  1|
+         |-  -  -|
+         |3  4  5|
+         |       |
+         |1  1  1|
+         |-  -  -|
+         +4  5  6+
+                          Type: Matrix Fraction Integer
+
+  inverse(hilb)
+         + 72    - 240   180 +
+         |                   |
+         |- 240   900   - 720|
+         |                   |
+         + 180   - 720   600 +
+                          Type: Union(Matrix Fraction Integer,...)
+
+This matrix is not invertible.
+
+  mm := matrix([ [1,2,3,4], [5,6,7,8], [9,10,11,12], [13,14,15,16] ])
+         +1   2   3   4 +
+         |              |
+         |5   6   7   8 |
+         |              |
+         |9   10  11  12|
+         |              |
+         +13  14  15  16+
+                           Type: Matrix Integer
+
+  inverse(mm)
+     "failed"
+                           Type: Union("failed",...)
+
+The operation determinant computes the determinant of a matrix
+provided that the entries of the matrix belong to a CommutativeRing.
+
+The above matrix mm is not invertible and, hence, must have determinant 0.
+
+  determinant(mm)
+    0
+                           Type: NonNegativeInteger
+
+The operation trace computes the trace of a square matrix.
+
+  trace(mm)
+    34
+                           Type: PositiveInteger
+
+The operation rank computes the rank of a matrix: the maximal number
+of linearly independent rows or columns.
+
+  rank(mm)
+    2
+                           Type: PositiveInteger
+
+The operation nullity computes the nullity of a matrix: the dimension
+of its null space.
+
+  nullity(mm)
+    2
+                           Type: PositiveInteger
+
+The operation nullSpace 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.
+
+  nullSpace(mm)
+    [[1,- 2,1,0],[2,- 3,0,1]]
+                           Type: List Vector Integer
+
+The operation rowEchelon returns the row echelon form of a matrix.  It
+is easy to see that the rank of this matrix is two and that its
+nullity is also two.
+
+  rowEchelon(mm)
+         +1  2  3  4 +
+         |           |
+         |0  4  8  12|
+         |           |
+         |0  0  0  0 |
+         |           |
+         +0  0  0  0 +
+                           Type: Matrix Integer
+
+See Also
+o )help OneDimensionalArray
+o )help TwoDimensionalArray
+o )help Vector
+o )help Permanent
+o )show Matrix
+o $AXIOM/doc/src/algebra/matrix.spad.dvi
+
+@
 <<domain MATRIX Matrix>>=
 )abbrev domain MATRIX Matrix
 ++ Author: Grabmeier, Gschnitzer, Williamson
diff --git a/src/algebra/mkfunc.spad.pamphlet b/src/algebra/mkfunc.spad.pamphlet
index 7b1ad3e..e6db6f4 100644
--- a/src/algebra/mkfunc.spad.pamphlet
+++ b/src/algebra/mkfunc.spad.pamphlet
@@ -219,6 +219,213 @@ InputFormFunctions1(R:Type):with
 
 @
 \section{package MKFUNC MakeFunction}
+<<MakeFunction.input>>=
+-- mkfunc.spad.pamphlet MakeFunction.input
+)spool MakeFunction.output
+)set message test on
+)set message auto off
+)clear all
+--S 1 of 9
+expr := (x - exp x + 1)^2 * (sin(x^2) * x + 1)^3
+--R 
+--R
+--R   (1)
+--R       3   x 2        4     3   x    5     4    3      2 3
+--R     (x (%e )  + (- 2x  - 2x )%e  + x  + 2x  + x )sin(x )
+--R   + 
+--R        2   x 2        3     2   x     4     3     2      2 2
+--R     (3x (%e )  + (- 6x  - 6x )%e  + 3x  + 6x  + 3x )sin(x )
+--R   + 
+--R            x 2        2        x     3     2           2       x 2
+--R     (3x (%e )  + (- 6x  - 6x)%e  + 3x  + 6x  + 3x)sin(x ) + (%e )
+--R   + 
+--R                 x    2
+--R     (- 2x - 2)%e  + x  + 2x + 1
+--R                                                     Type: Expression Integer
+--E 1
+
+--S 2 of 9
+function(expr, f, x)
+--R 
+--R
+--R   (2)  f
+--R                                                                 Type: Symbol
+--E 2
+
+--S 3 of 9
+tbl := [f(0.1 * i - 1) for i in 0..20]
+--R 
+--R   Compiling function f with type Float -> Float 
+--R
+--R   (3)
+--R   [0.0005391844 0362701574, 0.0039657551 1844206653,
+--R    0.0088545187 4833983689 2, 0.0116524883 0907069695,
+--R    0.0108618220 9245751364 5, 0.0076366823 2120869965 06,
+--R    0.0040584985 7597822062 55, 0.0015349542 8910500836 48,
+--R    0.0003424903 1549879905 716, 0.0000233304 8276098819 6001, 0.0,
+--R    0.0000268186 8782862599 4229, 0.0004691571 3720051642 621,
+--R    0.0026924576 5968519586 08, 0.0101486881 7369135148 8,
+--R    0.0313833725 8543810564 3, 0.0876991144 5154615297 9,
+--R    0.2313019789 3439968362, 0.5843743955 958098772, 1.4114930171 992819197,
+--R    3.2216948276 75164252]
+--R                                                             Type: List Float
+--E 3
+
+--S 4 of 9
+e := (x - y + 1)^2 * (x^2 * y + 1)^2 
+--R 
+--R
+--R   (4)
+--R      4 4        5     4     2  3     6     5    4     3     2      2
+--R     x y  + (- 2x  - 2x  + 2x )y  + (x  + 2x  + x  - 4x  - 4x  + 1)y
+--R   + 
+--R        4     3     2               2
+--R     (2x  + 4x  + 2x  - 2x - 2)y + x  + 2x + 1
+--R                                                     Type: Polynomial Integer
+--E 4
+
+--S 5 of 9
+function(e, g, [x, y])
+--R 
+--R
+--R   (5)  g
+--R                                                                 Type: Symbol
+--E 5
+
+--S 6 of 9
+function(e, h, x, y)
+--R 
+--R
+--R   (6)  h
+--R                                                                 Type: Symbol
+--E 6
+
+--S 7 of 9
+m1 := squareMatrix [ [1, 2], [3, 4] ]
+--R 
+--R
+--R        +1  2+
+--R   (7)  |    |
+--R        +3  4+
+--R                                                Type: SquareMatrix(2,Integer)
+--E 7
+
+--S 8 of 9
+m2 := squareMatrix [ [1, 0], [-1, 1] ]
+--R 
+--R
+--R        + 1   0+
+--R   (8)  |      |
+--R        +- 1  1+
+--R                                                Type: SquareMatrix(2,Integer)
+--E 8
+
+--S 9 of 9
+h(m1, m2)
+--R 
+--R   Compiling function h with type (SquareMatrix(2,Integer),SquareMatrix
+--R      (2,Integer)) -> SquareMatrix(2,Integer) 
+--R
+--R        +- 7836   8960 +
+--R   (9)  |              |
+--R        +- 17132  19588+
+--R                                                Type: SquareMatrix(2,Integer)
+--E 9
+)spool
+)lisp (bye)
+@
+<<MakeFunction.help>>=
+====================================================================
+MakeFunction examples
+====================================================================
+
+It is sometimes useful to be able to define a function given by
+the result of a calculation.
+
+Suppose that you have obtained the following expression after several
+computations and that you now want to tabulate the numerical values of
+f for x between -1 and +1 with increment 0.1.
+
+  expr := (x - exp x + 1)^2 * (sin(x^2) * x + 1)^3
+       3   x 2        4     3   x    5     4    3      2 3
+     (x (%e )  + (- 2x  - 2x )%e  + x  + 2x  + x )sin(x )
+   + 
+        2   x 2        3     2   x     4     3     2      2 2
+     (3x (%e )  + (- 6x  - 6x )%e  + 3x  + 6x  + 3x )sin(x )
+   + 
+            x 2        2        x     3     2           2       x 2
+     (3x (%e )  + (- 6x  - 6x)%e  + 3x  + 6x  + 3x)sin(x ) + (%e )
+   + 
+                 x    2
+     (- 2x - 2)%e  + x  + 2x + 1
+                               Type: Expression Integer
+
+You could, of course, use the function eval within a loop and evaluate
+expr twenty-one times, but this would be quite slow.  A better way is
+to create a numerical function f such that f(x) is defined by the
+expression expr above, but without retyping expr!  The package
+MakeFunction provides the operation function which does exactly this.
+
+Issue this to create the function f(x) given by expr.
+
+  function(expr, f, x)
+    f
+                               Type: Symbol
+
+To tabulate expr, we can now quickly evaluate f 21 times.
+
+  tbl := [f(0.1 * i - 1) for i in 0..20];
+                               Type: List Float
+
+Use the list [x1,...,xn] as the third argument to function to create a
+multivariate function f(x1,...,xn).
+
+  e := (x - y + 1)^2 * (x^2 * y + 1)^2 
+      4 4        5     4     2  3     6     5    4     3     2      2
+     x y  + (- 2x  - 2x  + 2x )y  + (x  + 2x  + x  - 4x  - 4x  + 1)y
+   + 
+        4     3     2               2
+     (2x  + 4x  + 2x  - 2x - 2)y + x  + 2x + 1
+                                Type: Polynomial Integer
+
+  function(e, g, [x, y])
+    g
+                               Type: Symbol
+
+In the case of just two variables, they can be given as arguments
+without making them into a list.
+
+  function(e, h, x, y)
+    h
+                               Type: Symbol
+
+Note that the functions created by function are not limited to
+floating point numbers, but can be applied to any type for which they
+are defined.
+
+  m1 := squareMatrix [ [1, 2], [3, 4] ]
+    +1  2+
+    |    |
+    +3  4+
+                               Type: SquareMatrix(2,Integer)
+
+  m2 := squareMatrix [ [1, 0], [-1, 1] ]
+    + 1   0+
+    |      |
+    +- 1  1+
+                               Type: SquareMatrix(2,Integer)
+
+  h(m1, m2)
+    +- 7836   8960 +
+    |              |
+    +- 17132  19588+
+                               Type: SquareMatrix(2,Integer)
+
+See Also:
+o )show MakeFunction
+o $AXIOM/doc/src/algebra/mkfunc.spad.dvi
+
+@
 <<package MKFUNC MakeFunction>>=
 )abbrev package MKFUNC MakeFunction
 ++ Tools for making interpreter functions from top-level expressions
diff --git a/src/algebra/mset.spad.pamphlet b/src/algebra/mset.spad.pamphlet
index abe5d56..f6a63fd 100644
--- a/src/algebra/mset.spad.pamphlet
+++ b/src/algebra/mset.spad.pamphlet
@@ -10,6 +10,221 @@
 \tableofcontents
 \eject
 \section{domain MSET Multiset}
+<<Multiset.input>>=
+-- mset.spad.pamphlet Multiset.input
+)spool Multiset.output
+)set message test on
+)set message auto off
+)clear all
+--S 1 of 14
+s := multiset [1,2,3,4,5,4,3,2,3,4,5,6,7,4,10]
+--R 
+--R
+--R   (1)  {1,2: 2,3: 3,4: 4,2: 5,6,7,10}
+--R                                               Type: Multiset PositiveInteger
+--E 1
+
+--S 2 of 14
+insert!(3,s)
+--R 
+--R
+--R   (2)  {1,2: 2,4: 3,4: 4,2: 5,6,7,10}
+--R                                               Type: Multiset PositiveInteger
+--E 2
+
+--S 3 of 14
+remove!(3,s,1)
+--R 
+--R
+--R   (3)  {1,2: 2,3: 3,4: 4,2: 5,6,7,10}
+--R                                               Type: Multiset PositiveInteger
+--E 3
+
+--S 4 of 14
+s
+--R 
+--R
+--R   (4)  {1,2: 2,3: 3,4: 4,2: 5,6,7,10}
+--R                                               Type: Multiset PositiveInteger
+--E 4
+
+--S 5 of 14
+remove!(5,s)
+--R 
+--R
+--R   (5)  {1,2: 2,3: 3,4: 4,6,7,10}
+--R                                               Type: Multiset PositiveInteger
+--E 5
+
+--S 6 of 14
+s
+--R 
+--R
+--R   (6)  {1,2: 2,3: 3,4: 4,6,7,10}
+--R                                               Type: Multiset PositiveInteger
+--E 6
+
+--S 7 of 14
+count(5,s)
+--R 
+--R
+--R   (7)  0
+--R                                                     Type: NonNegativeInteger
+--E 7
+
+--S 8 of 14
+t := multiset [2,2,2,-9]
+--R 
+--R
+--R   (8)  {3: 2,- 9}
+--R                                                       Type: Multiset Integer
+--E 8
+
+--S 9 of 14
+U := union(s,t)
+--R 
+--R
+--R   (9)  {1,5: 2,3: 3,4: 4,6,7,10,- 9}
+--R                                                       Type: Multiset Integer
+--E 9
+
+--S 10 of 14
+I := intersect(s,t)
+--R 
+--R
+--R   (10)  {5: 2}
+--R                                                       Type: Multiset Integer
+--E 10
+
+--S 11 of 14
+difference(s,t)
+--R 
+--R
+--R   (11)  {1,3: 3,4: 4,6,7,10}
+--R                                                       Type: Multiset Integer
+--E 11
+
+--S 12 of 14
+S := symmetricDifference(s,t)
+--R 
+--R
+--R   (12)  {1,3: 3,4: 4,6,7,10,- 9}
+--R                                                       Type: Multiset Integer
+--E 12
+
+--S 13 of 14
+(U = union(S,I))@Boolean
+--R 
+--R
+--R   (13)  true
+--R                                                                Type: Boolean
+--E 13
+
+--S 14 of 14
+t1 := multiset [1,2,2,3]; [t1 < t, t1 < s, t < s, t1 <= s]
+--R 
+--R
+--R   (14)  [false,true,false,true]
+--R                                                           Type: List Boolean
+--E 14
+)spool
+)lisp (bye)
+@
+<<Multiset.help>>=
+====================================================================
+Multiset examples
+====================================================================
+
+The domain Multiset(R) is similar to Set(R) except that multiplicities
+(counts of duplications) are maintained and displayed.  Use the
+operation multiset to create multisets from lists.  All the standard
+operations from sets are available for multisets.  An element with
+multiplicity greater than one has the multiplicity displayed first,
+then a colon, and then the element.
+
+Create a multiset of integers.
+
+  s := multiset [1,2,3,4,5,4,3,2,3,4,5,6,7,4,10]
+    {1,2: 2,3: 3,4: 4,2: 5,6,7,10}
+                          Type: Multiset PositiveInteger
+
+The operation insert! adds an element to a multiset.
+
+  insert!(3,s)
+    {1,2: 2,4: 3,4: 4,2: 5,6,7,10}
+                          Type: Multiset PositiveInteger
+
+Use remove! to remove an element.  If a third argument is present, it
+specifies how many instances to remove. Otherwise all instances of the
+element are removed.  Display the resulting multiset.
+
+  remove!(3,s,1); s
+
+    {1,2: 2,3: 3,4: 4,2: 5,6,7,10}
+                          Type: Multiset PositiveInteger
+
+  remove!(5,s); s
+    {1,2: 2,3: 3,4: 4,6,7,10}
+                          Type: Multiset PositiveInteger
+
+The operation count returns the number of copies of a given value.
+
+  count(5,s)
+    0
+                          Type: NonNegativeInteger
+
+A second multiset.
+
+  t := multiset [2,2,2,-9]
+    {3: 2,- 9}
+                          Type: Multiset Integer
+
+The union of two multisets is additive.
+
+  U := union(s,t)
+    {1,5: 2,3: 3,4: 4,6,7,10,- 9}
+                          Type: Multiset Integer
+
+The intersect operation gives the elements that are in common, with
+additive multiplicity.
+
+  I := intersect(s,t)
+    {5: 2}
+                          Type: Multiset Integer
+
+The difference of s and t consists of the elements that s has but t
+does not.  Elements are regarded as indistinguishable, so that if s
+and t have any element in common, the difference does not contain that
+element.
+
+  difference(s,t)
+    {1,3: 3,4: 4,6,7,10}
+                          Type: Multiset Integer
+
+The symmetricDifference is the union of difference(s, t) and difference(t, s).
+
+  S := symmetricDifference(s,t)
+    {1,3: 3,4: 4,6,7,10,- 9}
+                          Type: Multiset Integer
+
+Check that the union of the symmetricDifference and the intersect
+equals the union of the elements.
+
+  (U = union(S,I))@Boolean
+    true
+                          Type: Boolean
+
+Check some inclusion relations.
+
+  t1 := multiset [1,2,2,3]; [t1 < t, t1 < s, t < s, t1 <= s]
+    [false,true,false,true]
+                          Type: List Boolean
+
+See Also:
+o )show Multiset
+o $AXIOM/doc/src/algebra/mset.spad.dvi
+
+@
 <<domain MSET Multiset>>=
 )abbrev domain MSET Multiset
 ++ Author:Stephen M. Watt, William H. Burge, Richard D. Jenks, Frederic Lehobey
diff --git a/src/algebra/multpoly.spad.pamphlet b/src/algebra/multpoly.spad.pamphlet
index 86e5548..76a5624 100644
--- a/src/algebra/multpoly.spad.pamphlet
+++ b/src/algebra/multpoly.spad.pamphlet
@@ -78,6 +78,205 @@ PolynomialFunctions2(R:Ring, S:Ring): with
 
 @
 \section{domain MPOLY MultivariatePolynomial}
+<<MultivariatePolynomial.input>>=
+-- multpoly.spad.pamphlet MultivariatePolynomial.input
+)spool MultivariatePolynomial.output
+)set message test on
+)set message auto off
+)clear all
+--S 1 of 9
+m : MPOLY([x,y],INT) := (x^2 - x*y^3 +3*y)^2
+--R 
+--R
+--R         4     3 3     6       2     4      2
+--R   (1)  x  - 2y x  + (y  + 6y)x  - 6y x + 9y
+--R                                  Type: MultivariatePolynomial([x,y],Integer)
+--E 1
+
+--S 2 of 9
+m :: MPOLY([y,x],INT)
+--R 
+--R
+--R         2 6       4     3 3     2     2     4
+--R   (2)  x y  - 6x y  - 2x y  + 9y  + 6x y + x
+--R                                  Type: MultivariatePolynomial([y,x],Integer)
+--E 2
+
+--S 3 of 9
+p : MPOLY([x,y],POLY INT)
+--R 
+--R                                                                   Type: Void
+--E 3
+
+--S 4 of 9
+p :: POLY INT
+--R 
+--R
+--R   (4)  p
+--R                                                     Type: Polynomial Integer
+--E 4
+
+--S 5 of 9
+% :: MPOLY([a,b],POLY INT)
+--R 
+--R
+--R   (5)  p
+--R                       Type: MultivariatePolynomial([a,b],Polynomial Integer)
+--E 5
+
+--S 6 of 9
+q : UP(x, FRAC MPOLY([y,z],INT))
+--R 
+--R                                                                   Type: Void
+--E 6
+
+--S 7 of 9
+q := (x^2 - x*(z+1)/y +2)^2 
+--R 
+--R
+--R                             2    2
+--R         4   - 2z - 2  3   4y  + z  + 2z + 1  2   - 4z - 4
+--R   (7)  x  + -------- x  + ----------------- x  + -------- x + 4
+--R                 y                  2                 y
+--R                                   y
+--R Type: UnivariatePolynomial(x,Fraction MultivariatePolynomial([y,z],Integer))
+--E 7
+
+--S 8 of 9
+q :: UP(z, FRAC MPOLY([x,y],INT))
+--R 
+--R
+--R   (8)
+--R    2            3     2             2 4       3      2      2            2
+--R   x   2   - 2y x  + 2x  - 4y x     y x  - 2y x  + (4y  + 1)x  - 4y x + 4y
+--R   -- z  + -------------------- z + ---------------------------------------
+--R    2                2                                  2
+--R   y                y                                  y
+--R Type: UnivariatePolynomial(z,Fraction MultivariatePolynomial([x,y],Integer))
+--E 8
+
+--S 9 of 9
+q :: MPOLY([x,z], FRAC UP(y,INT))
+--R 
+--R
+--R                                               2
+--R         4      2     2  3     1  2    2     4y  + 1  2      4     4
+--R   (9)  x  + (- - z - -)x  + (-- z  + -- z + -------)x  + (- - z - -)x + 4
+--R                y     y        2       2         2           y     y
+--R                              y       y         y
+--R Type: MultivariatePolynomial([x,z],Fraction UnivariatePolynomial(y,Integer))
+--E 9
+)spool
+)lisp (bye)
+@
+<<MultivariatePolynomial.help>>=
+====================================================================
+MultivariatePolynomial examples
+====================================================================
+
+The domain constructor MultivariatePolynomial is similar to Polynomial
+except that it specifies the variables to be used.  Polynomial are
+available for MultivariatePolynomial.  The abbreviation for
+MultivariatePolynomial is MPOLY.  The type expressions
+
+  MultivariatePolynomial([x,y],Integer)
+  MPOLY([x,y],INT) 
+
+refer to the domain of multivariate polynomials in the variables x and
+y where the coefficients are restricted to be integers.  The first
+variable specified is the main variable and the display of the polynomial
+reflects this.
+
+This polynomial appears with terms in descending powers of the variable x.
+
+  m : MPOLY([x,y],INT) := (x^2 - x*y^3 +3*y)^2
+     4     3 3     6       2     4      2
+    x  - 2y x  + (y  + 6y)x  - 6y x + 9y
+                     Type: MultivariatePolynomial([x,y],Integer)
+
+It is easy to see a different variable ordering by doing a conversion.
+
+  m :: MPOLY([y,x],INT)
+     2 6       4     3 3     2     2     4
+    x y  - 6x y  - 2x y  + 9y  + 6x y + x
+                     Type: MultivariatePolynomial([y,x],Integer)
+
+You can use other, unspecified variables, by using Polynomial in the
+coefficient type of MPOLY.
+
+  p : MPOLY([x,y],POLY INT)
+                     Type: Void
+
+Conversions can be used to re-express such polynomials in terms of
+the other variables.  For example, you can first push all the
+variables into a polynomial with integer coefficients.
+
+  p :: POLY INT
+    p
+                     Type: Polynomial Integer
+
+Now pull out the variables of interest.
+
+  % :: MPOLY([a,b],POLY INT)
+    p
+                     Type: MultivariatePolynomial([a,b],Polynomial Integer)
+
+Restriction:
+  Axiom does not allow you to create types where MultivariatePolynomial
+  is contained in the coefficient type of Polynomial. Therefore,
+  MPOLY([x,y],POLY INT) is legal but POLY MPOLY([x,y],INT) is not.
+
+Multivariate polynomials may be combined with univariate polynomials
+to create types with special structures.
+
+  q : UP(x, FRAC MPOLY([y,z],INT))
+                          Type: Void
+
+This is a polynomial in x whose coefficients are quotients of polynomials 
+in y and z.
+
+  q := (x^2 - x*(z+1)/y +2)^2 
+                             2    2
+         4   - 2z - 2  3   4y  + z  + 2z + 1  2   - 4z - 4
+   (7)  x  + -------- x  + ----------------- x  + -------- x + 4
+                 y                  2                 y
+                                   y
+ Type: UnivariatePolynomial(x,Fraction MultivariatePolynomial([y,z],Integer))
+
+Use conversions for structural rearrangements. z does not appear in a
+denominator and so it can be made the main variable.
+
+  q :: UP(z, FRAC MPOLY([x,y],INT))
+    2            3     2             2 4       3      2      2            2
+   x   2   - 2y x  + 2x  - 4y x     y x  - 2y x  + (4y  + 1)x  - 4y x + 4y
+   -- z  + -------------------- z + ---------------------------------------
+    2                2                                  2
+   y                y                                  y
+ Type: UnivariatePolynomial(z,Fraction MultivariatePolynomial([x,y],Integer))
+
+Or you can make a multivariate polynomial in x and z whose
+coefficients are fractions in polynomials in y.
+
+  q :: MPOLY([x,z], FRAC UP(y,INT))
+     4      2     2  3     1  2    2     4y  + 1  2      4     4
+    x  + (- - z - -)x  + (-- z  + -- z + -------)x  + (- - z - -)x + 4
+            y     y        2       2         2           y     y
+                          y       y         y
+ Type: MultivariatePolynomial([x,z],Fraction UnivariatePolynomial(y,Integer))
+
+A conversion like q :: MPOLY([x,y], FRAC UP(z,INT)) is not possible in
+this example because y appears in the denominator of a fraction.  As
+you can see, Axiom provides extraordinary flexibility in the
+manipulation and display of expressions via its conversion facility.
+
+See Also:
+o )help DistributedMultivariatePolynomial
+o )help UnivariatePolynomial
+o )help Polynomial
+o )show MultivariatePolynomial
+o $AXIOM/doc/src/algebra/multpoly.spad.dvi
+
+@
 <<domain MPOLY MultivariatePolynomial>>=
 )abbrev domain MPOLY MultivariatePolynomial
 ++ Author: Dave Barton, Barry Trager
diff --git a/src/algebra/oct.spad.pamphlet b/src/algebra/oct.spad.pamphlet
index d515045..c5b85b6 100644
--- a/src/algebra/oct.spad.pamphlet
+++ b/src/algebra/oct.spad.pamphlet
@@ -338,7 +338,243 @@ associative, since $I*(J*K) \ne (I*J)*K$.
 \ncarc{->}{e4}{e1}
 \ncarc{->}{e1}{e2}
 \end{pspicture}
+<<Octonion.input>>=
+-- oct.spad.pamphlet Octonion.input
+)spool Octonion.output
+)set message test on
+)set message auto off
+)clear all
+--S 1
+oci1 := octon(1,2,3,4,5,6,7,8)
+--R 
+--R
+--R   (1)  1 + 2i + 3j + 4k + 5E + 6I + 7J + 8K
+--R                                                       Type: Octonion Integer
+--E 1
 
+--S 2
+oci2 := octon(7,2,3,-4,5,6,-7,0)
+--R 
+--R
+--R   (2)  7 + 2i + 3j - 4k + 5E + 6I - 7J
+--R                                                       Type: Octonion Integer
+--E 2
+
+--S 3
+oci3 := octon(quatern(-7,-12,3,-10), quatern(5,6,9,0))
+--R 
+--R
+--R   (3)  - 7 - 12i + 3j - 10k + 5E + 6I + 9J
+--R                                                       Type: Octonion Integer
+--E 3
+
+--S 4
+(oci1 * oci2) * oci3 - oci1 * (oci2 * oci3)
+--R 
+--R
+--R   (4)  2696i - 2928j - 4072k + 16E - 1192I + 832J + 2616K
+--R                                                       Type: Octonion Integer
+--E 4
+
+--S 5
+[real oci1, imagi oci1, imagj oci1, imagk oci1, _
+ imagE oci1, imagI oci1, imagJ oci1, imagK oci1]
+--R 
+--R
+--R   (5)  [1,2,3,4,5,6,7,8]
+--R                                                   Type: List PositiveInteger
+--E 5
+
+--S 6
+q : Quaternion Polynomial Integer := quatern(q1, qi, qj, qk)
+--R 
+--R
+--R   (6)  q1 + qi i + qj j + qk k
+--R                                          Type: Quaternion Polynomial Integer
+--E 6
+
+--S 7
+E : Octonion Polynomial Integer:= octon(0,0,0,0,1,0,0,0)
+--R 
+--R
+--R   (7)  E
+--R                                            Type: Octonion Polynomial Integer
+--E 7
+
+--S 8
+q * E
+--R 
+--R
+--R   (8)  q1 E + qi I + qj J + qk K
+--R                                            Type: Octonion Polynomial Integer
+--E 8
+
+--S 9
+E * q
+--R 
+--R
+--R   (9)  q1 E - qi I - qj J - qk K
+--R                                            Type: Octonion Polynomial Integer
+--E 9
+
+--S 10
+q * 1$(Octonion Polynomial Integer)
+--R 
+--R
+--R   (10)  q1 + qi i + qj j + qk k
+--R                                            Type: Octonion Polynomial Integer
+--E 10
+
+--S 11
+1$(Octonion Polynomial Integer) * q
+--R 
+--R
+--R   (11)  q1 + qi i + qj j + qk k
+--R                                            Type: Octonion Polynomial Integer
+--E 11
+
+--S 12
+o : Octonion Polynomial Integer := octon(o1, oi, oj, ok, oE, oI, oJ, oK)
+--R 
+--R
+--R   (12)  o1 + oi i + oj j + ok k + oE E + oI I + oJ J + oK K
+--R                                            Type: Octonion Polynomial Integer
+--E 12
+
+--S 13
+norm o
+--R 
+--R
+--R           2     2     2     2     2     2     2     2
+--R   (13)  ok  + oj  + oi  + oK  + oJ  + oI  + oE  + o1
+--R                                                     Type: Polynomial Integer
+--E 13
+
+--S 14
+p : Octonion Polynomial Integer := octon(p1, pi, pj, pk, pE, pI, pJ, pK)
+--R 
+--R
+--R   (14)  p1 + pi i + pj j + pk k + pE E + pI I + pJ J + pK K
+--R                                            Type: Octonion Polynomial Integer
+--E 14
+
+--S 15
+norm(o*p)-norm(p)*norm(o)
+--R 
+--R
+--R   (15)  0
+--R                                                     Type: Polynomial Integer
+--E 15
+)spool
+)lisp (bye)
+@
+<<Octonion.help>>=
+====================================================================
+Octonion examples
+====================================================================
+
+The Octonions, also called the Cayley-Dixon algebra, defined over a
+commutative ring are an eight-dimensional non-associative algebra.
+Their construction from quaternions is similar to the construction
+of quaternions from complex numbers.
+
+As Octonion creates an eight-dimensional algebra, you have to give
+eight components to construct an octonion.
+
+  oci1 := octon(1,2,3,4,5,6,7,8)
+    1 + 2i + 3j + 4k + 5E + 6I + 7J + 8K
+                              Type: Octonion Integer
+
+  oci2 := octon(7,2,3,-4,5,6,-7,0)
+    7 + 2i + 3j - 4k + 5E + 6I - 7J
+                              Type: Octonion Integer
+
+Or you can use two quaternions to create an octonion.
+
+  oci3 := octon(quatern(-7,-12,3,-10), quatern(5,6,9,0))
+    - 7 - 12i + 3j - 10k + 5E + 6I + 9J
+                              Type: Octonion Integer
+
+You can easily demonstrate the non-associativity of multiplication.
+
+  (oci1 * oci2) * oci3 - oci1 * (oci2 * oci3)
+    2696i - 2928j - 4072k + 16E - 1192I + 832J + 2616K
+                              Type: Octonion Integer
+
+As with the quaternions, we have a real part, the imaginary parts 
+i, j, k, and four additional imaginary parts E, I, J and K. These 
+parts correspond to the canonical basis (1,i,j,k,E,I,J,K).
+
+For each basis element there is a component operation to extract the
+coefficient of the basis element for a given octonion.
+
+  [real oci1, imagi oci1, imagj oci1, imagk oci1, _
+   imagE oci1, imagI oci1, imagJ oci1, imagK oci1]
+    [1,2,3,4,5,6,7,8]
+                              Type: List PositiveInteger
+
+A basis with respect to the quaternions is given by (1,E).  However,
+you might ask, what then are the commuting rules?  To answer this, we
+create some generic elements.
+
+We do this in Axiom by simply changing the ground ring from Integer to
+Polynomial Integer.
+
+  q : Quaternion Polynomial Integer := quatern(q1, qi, qj, qk)
+    q1 + qi i + qj j + qk k
+                             Type: Quaternion Polynomial Integer
+
+  E : Octonion Polynomial Integer:= octon(0,0,0,0,1,0,0,0)
+    E
+                             Type: Octonion Polynomial Integer
+
+Note that quaternions are automatically converted to octonions in the
+obvious way.
+
+  q * E
+    q1 E + qi I + qj J + qk K
+                             Type: Octonion Polynomial Integer
+
+  E * q
+    q1 E - qi I - qj J - qk K
+                             Type: Octonion Polynomial Integer
+
+  q * 1$(Octonion Polynomial Integer)
+    q1 + qi i + qj j + qk k
+                             Type: Octonion Polynomial Integer
+
+  1$(Octonion Polynomial Integer) * q
+    q1 + qi i + qj j + qk k
+                             Type: Octonion Polynomial Integer
+
+Finally, we check that the norm, defined as the sum of the squares of
+the coefficients, is a multiplicative map.
+
+  o : Octonion Polynomial Integer := octon(o1, oi, oj, ok, oE, oI, oJ, oK)
+    o1 + oi i + oj j + ok k + oE E + oI I + oJ J + oK K
+                             Type: Octonion Polynomial Integer
+
+  norm o
+      2     2     2     2     2     2     2     2
+    ok  + oj  + oi  + oK  + oJ  + oI  + oE  + o1
+                             Type: Polynomial Integer
+
+  p : Octonion Polynomial Integer := octon(p1, pi, pj, pk, pE, pI, pJ, pK)
+    p1 + pi i + pj j + pk k + pE E + pI I + pJ J + pK K
+                             Type: Octonion Polynomial Integer
+
+Since the result is 0, the norm is multiplicative.
+
+  norm(o*p)-norm(p)*norm(o)
+    0
+                             Type: Polynomial Integer
+
+See Also:
+o )help Quaternion
+o )show Octonion
+o $AXIOM/doc/src/algebra/oct.spad.dvi
+
+@
 <<domain OCT Octonion>>=
 )abbrev domain OCT Octonion
 ++ Author: R. Wisbauer, J. Grabmeier
diff --git a/src/algebra/perm.spad.pamphlet b/src/algebra/perm.spad.pamphlet
index 537ca1c..481ba70 100644
--- a/src/algebra/perm.spad.pamphlet
+++ b/src/algebra/perm.spad.pamphlet
@@ -176,6 +176,119 @@ points easily.
 Note that this was not respected in versions before [[patch--50]] of this
 domain.
 
+<<Permutation.input>>=
+-- perm.spad.pamphlet Permutation.input
+)spool Permutation.output
+)set message test on
+)set message auto off
+)clear all
+--S 1 of 8
+p := coercePreimagesImages([[1,2,3],[1,2,3]])
+--R 
+--R
+--R   (1)  1
+--R                                            Type: Permutation PositiveInteger
+--E 1
+
+--S 2 of 8
+movedPoints p    -- should return {}
+--R 
+--R
+--R   (2)  {}
+--R                                                    Type: Set PositiveInteger
+--E 2
+
+--S 3 of 8
+even? p          -- should return true
+--R 
+--R
+--R   (3)  true
+--R                                                                Type: Boolean
+--E 3
+
+--S 4 of 8
+p := coercePreimagesImages([[0,1,2,3],[3,0,2,1]])$PERM ZMOD 4
+--R 
+--R
+--R   (4)  (1 0 3)
+--R                                               Type: Permutation IntegerMod 4
+--E 4
+
+--S 5 of 8
+fixedPoints p    -- should return {2}
+--R 
+--R
+--R   (5)  {2}
+--R                                                       Type: Set IntegerMod 4
+--E 5
+
+--S 6 of 8
+q := coercePreimagesImages([[0,1,2,3],[1,0]])$PERM ZMOD 4
+--R 
+--R
+--R   (6)  (1 0)
+--R                                               Type: Permutation IntegerMod 4
+--E 6
+
+--S 7 of 8
+fixedPoints(p*q) -- should return {2,0}
+--R 
+--R
+--R   (7)  {2,0}
+--R                                                       Type: Set IntegerMod 4
+--E 7
+
+--S 8 of 8
+even?(p*q)       -- should return false
+--R 
+--R
+--R   (8)  false
+--R                                                                Type: Boolean
+--E 8
+)spool
+)lisp (bye)
+@
+<<Permutation.help>>=
+====================================================================
+Permutation Examples
+====================================================================
+
+  p := coercePreimagesImages([[1,2,3],[1,2,3]])
+    1
+                      Type: Permutation PositiveInteger
+
+  movedPoints p
+    {}
+                      Type: Set PositiveInteger
+
+  even? p
+    true
+                       Type: Boolean
+
+  p := coercePreimagesImages([[0,1,2,3],[3,0,2,1]])$PERM ZMOD 4
+    (1 0 3)
+                       Type: Permutation IntegerMod 4
+
+  fixedPoints p
+    {2}
+                       Type: Set IntegerMod 4
+
+  q := coercePreimagesImages([[0,1,2,3],[1,0]])$PERM ZMOD 4
+    (1 0)
+                       Type: Permutation IntegerMod 4
+
+  fixedPoints(p*q)
+    {2,0}
+                       Type: Set IntegerMod 4
+  even?(p*q)
+    false
+                       Type: Boolean
+
+See Also:
+o )show Permutation
+o $AXIOM/doc/src/algebra/perm.spad.dvi
+
+@
 <<domain PERM Permutation>>=
     -- import of domains and packages
 
@@ -307,17 +420,6 @@ causing bugs when computing [[movedPoints]], [[fixedPoints]], [[even?]],
 The other coercion facilities check for fixed points. It also seems that [[*]]
 removes fixed points from its result.
 
-<<TEST PERM>>=
-  p := coercePreimagesImages([[1,2,3],[1,2,3]])
-  movedPoints p    -- should return {}
-  even? p          -- should return true
-  p := coercePreimagesImages([[0,1,2,3],[3,0,2,1]])$PERM ZMOD 4
-  fixedPoints p    -- should return {2}
-  q := coercePreimagesImages([[0,1,2,3],[1,0]])$PERM ZMOD 4
-  fixedPoints(p*q) -- should return {2,0}
-  even?(p*q)       -- should return false
-@
- 
 <<domain PERM Permutation>>=
 
     movedPoints p == construct p.1
diff --git a/src/algebra/radix.spad.pamphlet b/src/algebra/radix.spad.pamphlet
index 4c25fd0..3e536be 100644
--- a/src/algebra/radix.spad.pamphlet
+++ b/src/algebra/radix.spad.pamphlet
@@ -713,8 +713,9 @@ g := gcd(p, q)
 )lisp (bye)
 @
 <<HexadecimalExpansion.help>>=
-\section{HexadecimalExpansion}
-\label{HexadecimalExpansionXmpPage}
+====================================================================
+HexadecimalExpansion
+====================================================================
 
 All rationals have repeating hexadecimal expansions.  The operation
 hex returns these expansions of type HexadecimalExpansion.  Operations
diff --git a/src/algebra/view2d.spad.pamphlet b/src/algebra/view2d.spad.pamphlet
index 2d77e98..8b27df5 100644
--- a/src/algebra/view2d.spad.pamphlet
+++ b/src/algebra/view2d.spad.pamphlet
@@ -417,64 +417,246 @@ GraphImage (): Exports == Implementation where
 
 @
 \section{domain VIEW2D TwoDimensionalViewport}
-\subsection{Creating multiple graphs in a Viewport}
-We want to graph $x^3 * (a+b*x)$ on the interval $x=-1\ldots1$
+<<TwoDimensionalViewport.help>>=
+====================================================================
+TwoDimensionalViewport examples
+====================================================================
+
+We want to graph x^3 * (a+b*x) on the interval x=-1..1
 so we clear out the workspace
-<<multigraph.input>>=
-)clear all
-@
+
 We assign values to the constants
-<<multigraph.input>>=
-a:=0.5
-b:=0.5
-@
+  a:=0.5
+    0.5
+                              Type: Float
+  b:=0.5
+    0.5
+                              Type: Float
+
 We draw the first case of the graph
-<<multigraph.input>>=
-y1:=draw(x^3*(a+b*x),x=-1..1,title=="2.2.10 explicit")
-@
+
+  y1:=draw(x^3*(a+b*x),x=-1..1,title=="2.2.10 explicit")
+    TwoDimensionalViewport: "2.2.10 explicit"
+                              Type: TwoDimensionalViewport
+
 We fetch the graph of the first object
-<<multigraph.input>>=
-g1:=getGraph(y1,1)
-@
+
+  g1:=getGraph(y1,1)
+    Graph with 1 point list
+                              Type: GraphImage
+
 We extract its points
-<<multigraph.input>>=
-pointLists g1
-@
+
+  pointLists g1
+   [
+     [[-1.,0.,1.,3.], [-0.95833333333333337,-1.8336166570216028E-2,1.,3.],
+      [-0.91666666666666674,-3.2093942901234518E-2,1.,3.],
+      [-0.87500000000000011,-4.18701171875E-2,1.,3.],
+      [-0.83333333333333348,-4.8225308641975301E-2,1.,3.],
+      [-0.79166666666666685,-5.1683967496141986E-2,1.,3.],
+      [-0.75000000000000022,-5.2734375E-2,1.,3.],
+      [-0.70833333333333359,-5.1828643422067916E-2,1.,3.],
+      [-0.66666666666666696,-4.9382716049382741E-2,1.,3.],
+      [-0.62500000000000033,-4.5776367187500042E-2,1.,3.],
+      [-0.5833333333333337,-4.1353202160493867E-2,1.,3.],
+      [-0.54166666666666707,-3.6420657310956832E-2,1.,3.],
+      [-0.50000000000000044,-3.1250000000000056E-2,1.,3.],
+      [-0.45833333333333376,-2.6076328607253136E-2,1.,3.],
+      [-0.41666666666666707,-2.1098572530864244E-2,1.,3.],
+      [-0.37500000000000039,-1.6479492187500042E-2,1.,3.],
+      [-0.3333333333333337,-1.2345679012345713E-2,1.,3.],
+      [-0.29166666666666702,-8.7875554591049648E-3,1.,3.],
+      [-0.25000000000000033,-5.8593750000000208E-3,1.,3.],
+      [-0.20833333333333368,-3.5792221257716214E-3,1.,3.],
+      [-0.16666666666666702,-1.9290123456790237E-3,1.,3.],
+      [-0.12500000000000036,-8.5449218750000705E-4,1.,3.],
+      [-8.3333333333333703E-2,-2.6523919753086765E-4,1.,3.],
+      [-4.1666666666667039E-2,-3.4661940586420673E-5,1.,3.],
+      [-3.7470027081099033E-16,-2.6304013894372334E-47,1.,3.],
+      [4.166666666666629E-2,3.7676022376542178E-5,1.,3.],
+      [8.3333333333332954E-2,3.1346450617283515E-4,1.,3.],
+      [0.12499999999999961,1.0986328124999894E-3,1.,3.],
+      [0.16666666666666627,2.7006172839505972E-3,1.,3.],
+      [0.20833333333333293,5.463023244598731E-3,1.,3.],
+      [0.24999999999999958,9.765624999999948E-3,1.,3.],
+      [0.29166666666666624,1.6024365837191284E-2,1.,3.],
+      [0.33333333333333293,2.469135802469126E-2,1.,3.],
+      [0.37499999999999961,3.6254882812499882E-2,1.,3.],
+      [0.4166666666666663,5.1239390432098617E-2,1.,3.],
+      [0.45833333333333298,7.0205500096450435E-2,1.,3.],
+      [0.49999999999999967,9.3749999999999792E-2,1.,3.],
+      [0.5416666666666663,0.12250584731867258,1.,3.],
+      [0.58333333333333293,0.15714216820987617,1.,3.],
+      [0.62499999999999956,0.1983642578124995,1.,3.],
+      [0.66666666666666619,0.24691358024691298,1.,3.],
+      [0.70833333333333282,0.30356776861496837,1.,3.],
+      [0.74999999999999944,0.369140624999999,1.,3.],
+      [0.79166666666666607,0.44448212046681984,1.,3.],
+      [0.8333333333333327,0.530478395061727,1.,3.],
+      [0.87499999999999933,0.62805175781249845,1.,3.],
+      [0.91666666666666596,0.73816068672839308,1.,3.],
+      [0.95833333333333259,0.86179982880015205,1.,3.], [1.,1.,1.,3.]]
+     ]
+                        Type: List List Point DoubleFloat
 
 Now we create a second graph with a changed parameter
-<<multigraph.input>>=
-b:=1.0
-@
+
+  b:=1.0
+    1.0
+                        Type: Float
+
 We draw it
-<<multigraph.input>>=
-y2:=draw(x^3*(a+b*x),x=-1..1)
-@
+
+  y2:=draw(x^3*(a+b*x),x=-1..1)
+    TwoDimensionalViewport: "AXIOM2D"
+                        Type: TwoDimensionalViewport
+
 We fetch this new graph
-<<multigraph.input>>=
-g2:=getGraph(y2,1)
-@
+
+  g2:=getGraph(y2,1)
+    Graph with 1 point list
+                       Type: GraphImage
+
 We get the points from this graph
-<<multigraph.input>>=
-pointLists g2
-@
-and we put these points, $g2$ onto the first graph $y1$ as graph $2$
-<<multigraph.input>>=
-putGraph(y1,g2,2)
-@
+
+  pointLists g2
+   [
+     [[-1.,0.5,1.,3.], [-0.95833333333333337,0.40339566454475323,1.,3.],
+      [-0.91666666666666674,0.32093942901234584,1.,3.],
+      [-0.87500000000000011,0.25122070312500017,1.,3.],
+      [-0.83333333333333348,0.19290123456790137,1.,3.],
+      [-0.79166666666666685,0.14471510898919768,1.,3.],
+      [-0.75000000000000022,0.10546875000000019,1.,3.],
+      [-0.70833333333333359,7.404091917438288E-2,1.,3.],
+      [-0.66666666666666696,4.938271604938288E-2,1.,3.],
+      [-0.62500000000000033,3.0517578125000125E-2,1.,3.],
+      [-0.5833333333333337,1.6541280864197649E-2,1.,3.],
+      [-0.54166666666666707,6.6219376929013279E-3,1.,3.],
+      [-0.50000000000000044,5.5511151231257827E-17,1.,3.],
+      [-0.45833333333333376,-4.011742862654287E-3,1.,3.],
+      [-0.41666666666666707,-6.0281635802469057E-3,1.,3.],
+      [-0.37500000000000039,-6.5917968750000035E-3,1.,3.],
+      [-0.3333333333333337,-6.1728395061728461E-3,1.,3.],
+      [-0.29166666666666702,-5.1691502700617377E-3,1.,3.],
+      [-0.25000000000000033,-3.9062500000000104E-3,1.,3.],
+      [-0.20833333333333368,-2.6373215663580349E-3,1.,3.],
+      [-0.16666666666666702,-1.543209876543218E-3,1.,3.],
+      [-0.12500000000000036,-7.3242187500000564E-4,1.,3.],
+      [-8.3333333333333703E-2,-2.4112654320987957E-4,1.,3.],
+      [-4.1666666666667039E-2,-3.315489969135889E-5,1.,3.],
+      [-3.7470027081099033E-16,-2.6304013894372324E-47,1.,3.],
+      [4.166666666666629E-2,3.9183063271603852E-5,1.,3.],
+      [8.3333333333332954E-2,3.3757716049382237E-4,1.,3.],
+      [0.12499999999999961,1.2207031249999879E-3,1.,3.],
+      [0.16666666666666627,3.0864197530863957E-3,1.,3.],
+      [0.20833333333333293,6.4049238040123045E-3,1.,3.],
+      [0.24999999999999958,1.1718749999999934E-2,1.,3.],
+      [0.29166666666666624,1.9642771026234473E-2,1.,3.],
+      [0.33333333333333293,3.0864197530864071E-2,1.,3.],
+      [0.37499999999999961,4.6142578124999847E-2,1.,3.],
+      [0.4166666666666663,6.6309799382715848E-2,1.,3.],
+      [0.45833333333333298,9.2270085841049135E-2,1.,3.],
+      [0.49999999999999967,0.12499999999999971,1.,3.],
+      [0.5416666666666663,0.16554844232253049,1.,3.],
+      [0.58333333333333293,0.21503665123456736,1.,3.],
+      [0.62499999999999956,0.27465820312499928,1.,3.],
+      [0.66666666666666619,0.3456790123456781,1.,3.],
+      [0.70833333333333282,0.42943733121141858,1.,3.],
+      [0.74999999999999944,0.52734374999999845,1.,3.],
+      [0.79166666666666607,0.64088119695215873,1.,3.],
+      [0.8333333333333327,0.77160493827160281,1.,3.],
+      [0.87499999999999933,0.92114257812499756,1.,3.],
+      [0.91666666666666596,1.0911940586419722,1.,3.],
+      [0.95833333333333259,1.2835316599151199,1.,3.], [1.,1.5,1.,3.]]
+     ]
+                           Type: List List Point DoubleFloat
+
+and we put these points, g2 onto the first graph y1 as graph 2
+
+  putGraph(y1,g2,2)
+                           Type: Void
+
 And now we do the whole sequence again
-<<multigraph.input>>=
-b:=2.0
-y3:=draw(x^3*(a+b*x),x=-1..1)
-g3:=getGraph(y3,1)
-pointLists g3
-@
-and put the third graphs points $g3$ onto the first graph $y1$ as graph $3$
-<<multigraph.input>>=
-putGraph(y1,g3,3)
-@
+
+  b:=2.0
+    2.0
+                           Type: Float
+
+  y3:=draw(x^3*(a+b*x),x=-1..1)
+    TwoDimensionalViewport: "AXIOM2D"
+                          Type: TwoDimensionalViewport
+
+  g3:=getGraph(y3,1)
+    Graph with 1 point list
+                          Type: GraphImage
+
+  pointLists g3
+   [
+     [[-1.,1.5,1.,3.], [-0.95833333333333337,1.2468593267746917,1.,3.],
+      [-0.91666666666666674,1.0270061728395066,1.,3.],
+      [-0.87500000000000011,0.83740234375000044,1.,3.],
+      [-0.83333333333333348,0.67515432098765471,1.,3.],
+      [-0.79166666666666685,0.53751326195987703,1.,3.],
+      [-0.75000000000000022,0.42187500000000056,1.,3.],
+      [-0.70833333333333359,0.32578004436728447,1.,3.],
+      [-0.66666666666666696,0.24691358024691412,1.,3.],
+      [-0.62500000000000033,0.18310546875000044,1.,3.],
+      [-0.5833333333333337,0.1323302469135807,1.,3.],
+      [-0.54166666666666707,9.2707127700617648E-2,1.,3.],
+      [-0.50000000000000044,6.2500000000000278E-2,1.,3.],
+      [-0.45833333333333376,4.0117428626543411E-2,1.,3.],
+      [-0.41666666666666707,2.4112654320987775E-2,1.,3.],
+      [-0.37500000000000039,1.3183593750000073E-2,1.,3.],
+      [-0.3333333333333337,6.1728395061728877E-3,1.,3.],
+      [-0.29166666666666702,2.0676601080247183E-3,1.,3.],
+      [-0.25000000000000033,1.0408340855860843E-17,1.,3.],
+      [-0.20833333333333368,-7.5352044753086191E-4,1.,3.],
+      [-0.16666666666666702,-7.7160493827160663E-4,1.,3.],
+      [-0.12500000000000036,-4.8828125000000282E-4,1.,3.],
+      [-8.3333333333333703E-2,-1.9290123456790339E-4,1.,3.],
+      [-4.1666666666667039E-2,-3.0140817901235325E-5,1.,3.],
+      [-3.7470027081099033E-16,-2.6304013894372305E-47,1.,3.],
+      [4.166666666666629E-2,4.21971450617272E-5,1.,3.],
+      [8.3333333333332954E-2,3.8580246913579681E-4,1.,3.],
+      [0.12499999999999961,1.4648437499999848E-3,1.,3.],
+      [0.16666666666666627,3.8580246913579933E-3,1.,3.],
+      [0.20833333333333293,8.2887249228394497E-3,1.,3.],
+      [0.24999999999999958,1.562499999999991E-2,1.,3.],
+      [0.29166666666666624,2.6879581404320851E-2,1.,3.],
+      [0.33333333333333293,4.3209876543209694E-2,1.,3.],
+      [0.37499999999999961,6.5917968749999764E-2,1.,3.],
+      [0.4166666666666663,9.6450617283950296E-2,1.,3.],
+      [0.45833333333333298,0.13639925733024652,1.,3.],
+      [0.49999999999999967,0.18749999999999956,1.,3.],
+      [0.5416666666666663,0.25163363233024633,1.,3.],
+      [0.58333333333333293,0.33082561728394977,1.,3.],
+      [0.62499999999999956,0.42724609374999883,1.,3.],
+      [0.66666666666666619,0.5432098765432084,1.,3.],
+      [0.70833333333333282,0.68117645640431912,1.,3.],
+      [0.74999999999999944,0.84374999999999756,1.,3.],
+      [0.79166666666666607,1.0336793499228365,1.,3.],
+      [0.8333333333333327,1.2538580246913544,1.,3.],
+      [0.87499999999999933,1.507324218749996,1.,3.],
+      [0.91666666666666596,1.7972608024691306,1.,3.],
+      [0.95833333333333259,2.1269953221450555,1.,3.], [1.,2.5,1.,3.]]
+     ]
+                        Type: List List Point DoubleFloat
+
+and put the third graphs points g3 onto the first graph y1 as graph 3
+
+  putGraph(y1,g3,3)
+                        Type: Void
+
 Finally we show the combined result
-<<multigraph.input>>=
-vp:=makeViewport2D(y1)
+
+  vp:=makeViewport2D(y1)
+    TwoDimensionalViewport: "2.2.10 explicit"
+                        Type: TwoDimensionalViewport
+
+See Also:
+o )show TwoDimensionalViewport
+o $AXIOM/doc/src/algebra/view2d.spad.dvi
+
 @
 <<domain VIEW2D TwoDimensionalViewport>>=
 )abbrev domain VIEW2D TwoDimensionalViewport
diff --git a/src/algebra/xlpoly.spad.pamphlet b/src/algebra/xlpoly.spad.pamphlet
index 34c26e1..8faf7cb 100644
--- a/src/algebra/xlpoly.spad.pamphlet
+++ b/src/algebra/xlpoly.spad.pamphlet
@@ -10,6 +10,304 @@
 \tableofcontents
 \eject
 \section{domain MAGMA Magma}
+<<Magma.input>>=
+-- xlpoly.spad.pamphlet Magma.input
+)spool Magma.output
+)set message test on
+)set message auto off
+)clear all
+--S 1
+x:Symbol :='x
+--R 
+--R
+--R   (1)  x
+--R                                                                 Type: Symbol
+--E 1
+
+--S 2
+y:Symbol :='y
+--R 
+--R
+--R   (2)  y
+--R                                                                 Type: Symbol
+--E 2
+
+--S 3
+z:Symbol :='z
+--R 
+--R
+--R   (3)  z
+--R                                                                 Type: Symbol
+--E 3
+
+--S 4
+word := OrderedFreeMonoid(Symbol)
+--R 
+--R
+--R   (4)  OrderedFreeMonoid Symbol
+--R                                                                 Type: Domain
+--E 4
+
+--S 5
+tree := Magma(Symbol)
+--R 
+--R
+--R   (5)  Magma Symbol
+--R                                                                 Type: Domain
+--E 5
+
+--S 6
+a:tree := x*x 
+--R 
+--R
+--R   (6)  [x,x]
+--R                                                           Type: Magma Symbol
+--E 6
+
+--S 7
+b:tree := y*y
+--R 
+--R
+--R   (7)  [y,y]
+--R                                                           Type: Magma Symbol
+--E 7
+
+--S 8
+c:tree := a*b
+--R 
+--R
+--R   (8)  [[x,x],[y,y]]
+--R                                                           Type: Magma Symbol
+--E 8
+
+--S 9
+left c
+--R 
+--R
+--R   (9)  [x,x]
+--R                                                           Type: Magma Symbol
+--E 9
+
+--S 10
+right c
+--R 
+--R
+--R   (10)  [y,y]
+--R                                                           Type: Magma Symbol
+--E 10
+
+--S 11
+length c
+--R 
+--R
+--R   (11)  4
+--R                                                        Type: PositiveInteger
+--E 11
+
+--S 12
+c::word
+--R 
+--R
+--R          2 2
+--R   (12)  x y
+--R                                               Type: OrderedFreeMonoid Symbol
+--E 12
+
+--S 13
+a < b
+--R 
+--R
+--R   (13)  true
+--R                                                                Type: Boolean
+--E 13
+
+--S 14
+a < c
+--R 
+--R
+--R   (14)  true
+--R                                                                Type: Boolean
+--E 14
+
+--S 15
+b < c
+--R 
+--R
+--R   (15)  true
+--R                                                                Type: Boolean
+--E 15
+
+--S 16
+first c
+--R 
+--R
+--R   (16)  x
+--R                                                                 Type: Symbol
+--E 16
+
+--S 17
+rest c
+--R 
+--R
+--R   (17)  [x,[y,y]]
+--R                                                           Type: Magma Symbol
+--E 17
+
+--S 18
+rest rest c
+--R 
+--R
+--R   (18)  [y,y]
+--R                                                           Type: Magma Symbol
+--E 18
+
+--S 19
+ax:tree := a*x
+--R 
+--R
+--R   (19)  [[x,x],x]
+--R                                                           Type: Magma Symbol
+--E 19
+
+--S 20
+xa:tree := x*a
+--R 
+--R
+--R   (20)  [x,[x,x]]
+--R                                                           Type: Magma Symbol
+--E 20
+
+--S 21
+xa < ax
+--R 
+--R
+--R   (21)  true
+--R                                                                Type: Boolean
+--E 21
+
+--S 22
+lexico(xa,ax)
+--R 
+--R
+--R   (22)  false
+--R                                                                Type: Boolean
+--E 22
+)spool
+)lisp (bye)
+@
+<<Magma.help>>=
+====================================================================
+Magma examples
+====================================================================
+
+Initialisations
+
+  x:Symbol :='x
+    x
+                         Type: Symbol
+
+  y:Symbol :='y
+    y
+                         Type: Symbol
+
+  z:Symbol :='z
+    z
+                         Type: Symbol
+
+  word := OrderedFreeMonoid(Symbol)
+    OrderedFreeMonoid Symbol
+                         Type: Domain
+
+  tree := Magma(Symbol)
+    Magma Symbol
+                         Type: Domain
+
+Let's make some trees
+
+  a:tree := x*x 
+    [x,x]
+                         Type: Magma Symbol
+
+  b:tree := y*y
+    [y,y]
+                         Type: Magma Symbol
+
+  c:tree := a*b
+    [[x,x],[y,y]]
+                         Type: Magma Symbol
+
+Query the trees
+
+  left c
+    [x,x]
+                         Type: Magma Symbol
+
+  right c
+    [y,y]
+                         Type: Magma Symbol
+
+  length c
+    4
+                         Type: PositiveInteger
+
+Coerce to the monoid
+
+  c::word
+     2 2
+    x y
+                         Type: OrderedFreeMonoid Symbol
+
+Check ordering
+
+  a < b
+    true
+                         Type: Boolean
+
+  a < c
+    true
+                         Type: Boolean
+
+  b < c
+    true
+                         Type: Boolean
+
+Navigate the tree
+
+  first c
+    x
+                         Type: Symbol
+
+  rest c
+    [x,[y,y]]
+                         Type: Magma Symbol
+
+  rest rest c
+    [y,y]
+                         Type: Magma Symbol
+
+Check ordering
+
+  ax:tree := a*x
+    [[x,x],x]
+                         Type: Magma Symbol
+
+  xa:tree := x*a
+    [x,[x,x]]
+                         Type: Magma Symbol
+
+  xa < ax
+    true
+                         Type: Boolean
+
+  lexico(xa,ax)
+    false
+                         Type: Boolean
+
+See Also:
+o )show Magma
+o $AXIOM/doc/src/algebra/xlpoly.spad.dvi
+
+@
 <<domain MAGMA Magma>>=
 )abbrev domain MAGMA Magma
 ++ Author: Michel Petitot (petitot@lifl.fr).
@@ -153,11 +451,345 @@ Magma(VarSet:OrderedSet):Public == Private where
 
 @
 \section{domain LWORD LyndonWord}
-A function $f \epsilon \lbrace 0,1 \rbrace$ is called acyclic if
-$C(F)$ consists of $n$ different objects. The canonical representative
-of the orbit of an acyclic function is usually called a Lyndon Word \cite{1}.
-If $f$ is acyclic, then all elements in the orbit $C(f)$ are acyclic
-as well, and we call $C(f)$ an acyclic orbit. 
+<<LyndonWord.input>>=
+-- xlpoly.spad.pamphlet LyndonWord.input
+)spool LyndonWord.output
+)set message test on
+)set message auto off
+)clear all
+--S 1 of 22
+a:Symbol :='a
+--R 
+--R
+--R   (1)  a
+--R                                                                 Type: Symbol
+--E 1
+
+--S 2 of 22
+b:Symbol :='b
+--R 
+--R
+--R   (2)  b
+--R                                                                 Type: Symbol
+--E 2
+
+--S 3 of 22
+c:Symbol :='c
+--R 
+--R
+--R   (3)  c
+--R                                                                 Type: Symbol
+--E 3
+
+--S 4 of 22
+lword:= LyndonWord(Symbol)
+--R 
+--R
+--R   (4)  LyndonWord Symbol
+--R                                                                 Type: Domain
+--E 4
+
+--S 5 of 22
+magma := Magma(Symbol)
+--R 
+--R
+--R   (5)  Magma Symbol
+--R                                                                 Type: Domain
+--E 5
+
+--S 6 of 22
+word := OrderedFreeMonoid(Symbol)
+--R 
+--R
+--R   (6)  OrderedFreeMonoid Symbol
+--R                                                                 Type: Domain
+--E 6
+
+--S 7 of 22
+LyndonWordsList1([a,b,c],3)$lword
+--R 
+--R
+--R   (7)
+--R   [[[a],[b],[c]], [[a b],[a c],[b c]],
+--R       2     2       2                      2    2       2
+--R    [[a b],[a c],[a b ],[a b c],[a c b],[a c ],[b c],[b c ]]]
+--R                             Type: OneDimensionalArray List LyndonWord Symbol
+--E 7
+
+--S 8 of 22
+LyndonWordsList([a,b,c],3)$lword
+--R 
+--R
+--R   (8)
+--R                                          2      2        2
+--R   [[a], [b], [c], [a b], [a c], [b c], [a b], [a c], [a b ], [a b c], [a c b],
+--R        2     2        2
+--R    [a c ], [b c], [b c ]]
+--R                                                 Type: List LyndonWord Symbol
+--E 8
+
+--S 9 of 22
+lw := LyndonWordsList([a,b],5)$lword
+--R 
+--R
+--R   (9)
+--R                       2        2     3      2 2       3     4      3 2
+--R   [[a], [b], [a b], [a b], [a b ], [a b], [a b ], [a b ], [a b], [a b ],
+--R      2          2 3           2       4
+--R    [a b a b], [a b ], [a b a b ], [a b ]]
+--R                                                 Type: List LyndonWord Symbol
+--E 9
+
+--S 10 of 22
+w1 : word := lw.4 :: word
+--R 
+--R
+--R          2
+--R   (10)  a b
+--R                                               Type: OrderedFreeMonoid Symbol
+--E 10
+
+--S 11 of 22
+w2 : word := lw.5 :: word
+--R 
+--R
+--R            2
+--R   (11)  a b
+--R                                               Type: OrderedFreeMonoid Symbol
+--E 11
+
+--S 12 of 22
+factor(a::word)$lword
+--R 
+--R
+--R   (12)  [[a]]
+--R                                                 Type: List LyndonWord Symbol
+--E 12
+
+--S 13 of 22
+factor(w1*w2)$lword
+--R 
+--R
+--R            2     2
+--R   (13)  [[a b a b ]]
+--R                                                 Type: List LyndonWord Symbol
+--E 13
+
+--S 14 of 22
+factor(w2*w2)$lword
+--R 
+--R
+--R              2      2
+--R   (14)  [[a b ],[a b ]]
+--R                                                 Type: List LyndonWord Symbol
+--E 14
+
+--S 15 of 22
+factor(w2*w1)$lword
+--R 
+--R
+--R              2    2
+--R   (15)  [[a b ],[a b]]
+--R                                                 Type: List LyndonWord Symbol
+--E 15
+
+--S 16 of 22
+lyndon?(w1)$lword
+--R 
+--R
+--R   (16)  true
+--R                                                                Type: Boolean
+--E 16
+
+--S 17 of 22
+lyndon?(w1*w2)$lword
+--R 
+--R
+--R   (17)  true
+--R                                                                Type: Boolean
+--E 17
+
+--S 18 of 22
+lyndon?(w2*w1)$lword
+--R 
+--R
+--R   (18)  false
+--R                                                                Type: Boolean
+--E 18
+
+--S 19 of 22
+lyndonIfCan(w1)$lword
+--R 
+--R
+--R           2
+--R   (19)  [a b]
+--R                                           Type: Union(LyndonWord Symbol,...)
+--E 19
+
+--S 20 of 22
+lyndonIfCan(w2*w1)$lword
+--R 
+--R
+--R   (20)  "failed"
+--R                                                    Type: Union("failed",...)
+--E 20
+
+--S 21 of 22
+lyndon(w1)$lword
+--R 
+--R
+--R           2
+--R   (21)  [a b]
+--R                                                      Type: LyndonWord Symbol
+--E 21
+
+--S 22 of 22
+lyndon(w1*w2)$lword
+--R 
+--R
+--R           2     2
+--R   (22)  [a b a b ]
+--R                                                      Type: LyndonWord Symbol
+--E 22
+)spool
+)lisp (bye)
+@
+<<LyndonWord.help>>=
+====================================================================
+LyndonWord examples
+====================================================================
+
+A function f in [0,1] is called acyclic if C(F) consists of n
+different objects. The canonical representative of the orbit of an
+acyclic function is usually called a Lyndon Word. If f is acyclic,
+then all elements in the orbit C(f) are acyclic as well, and we call
+C(f) an acyclic orbit.
+
+====================================================================
+Initialisations
+====================================================================
+
+  a:Symbol :='a
+    a
+                            Type: Symbol
+
+  b:Symbol :='b
+    b
+                            Type: Symbol
+
+  c:Symbol :='c
+    c
+                            Type: Symbol
+
+  lword:= LyndonWord(Symbol)
+    LyndonWord Symbol
+                            Type: Domain
+
+  magma := Magma(Symbol)
+    Magma Symbol
+                            Type: Domain
+
+  word := OrderedFreeMonoid(Symbol)
+    OrderedFreeMonoid Symbol
+                            Type: Domain
+
+All Lyndon words of with a, b, c to order 3
+
+  LyndonWordsList1([a,b,c],3)$lword
+   [[[a],[b],[c]], [[a b],[a c],[b c]],
+       2     2       2                      2    2       2
+    [[a b],[a c],[a b ],[a b c],[a c b],[a c ],[b c],[b c ]]]
+                            Type: OneDimensionalArray List LyndonWord Symbol
+
+All Lyndon words of with a, b, c to order 3 in flat list
+
+  LyndonWordsList([a,b,c],3)$lword
+                                          2      2        2
+   [[a], [b], [c], [a b], [a c], [b c], [a b], [a c], [a b ], [a b c], [a c b],
+        2     2        2
+    [a c ], [b c], [b c ]]
+                            Type: List LyndonWord Symbol
+
+All Lyndon words of with a, b to order 5
+
+  lw := LyndonWordsList([a,b],5)$lword
+                       2        2     3      2 2       3     4      3 2
+   [[a], [b], [a b], [a b], [a b ], [a b], [a b ], [a b ], [a b], [a b ],
+      2          2 3           2       4
+    [a b a b], [a b ], [a b a b ], [a b ]]
+                            Type: List LyndonWord Symbol
+
+  w1 : word := lw.4 :: word
+     2
+    a b
+                             Type: OrderedFreeMonoid Symbol
+
+  w2 : word := lw.5 :: word
+       2
+    a b
+                             Type: OrderedFreeMonoid Symbol
+
+Let's try factoring
+
+  factor(a::word)$lword
+    [[a]]
+                             Type: List LyndonWord Symbol
+
+  factor(w1*w2)$lword
+       2     2
+    [[a b a b ]]
+                             Type: List LyndonWord Symbol
+
+  factor(w2*w2)$lword
+         2      2
+    [[a b ],[a b ]]
+                             Type: List LyndonWord Symbol
+
+  factor(w2*w1)$lword
+         2    2
+    [[a b ],[a b]]
+                             Type: List LyndonWord Symbol
+
+====================================================================
+Checks and coercions
+====================================================================
+
+  lyndon?(w1)$lword
+    true
+                             Type: Boolean
+
+  lyndon?(w1*w2)$lword
+    true
+                             Type: Boolean
+
+  lyndon?(w2*w1)$lword
+    false
+                             Type: Boolean
+
+  lyndonIfCan(w1)$lword
+      2
+    [a b]
+                             Type: Union(LyndonWord Symbol,...)
+
+  lyndonIfCan(w2*w1)$lword
+    "failed"
+                             Type: Union("failed",...)
+
+  lyndon(w1)$lword
+      2
+    [a b]
+                             Type: LyndonWord Symbol
+
+  lyndon(w1*w2)$lword
+      2     2
+    [a b a b ]
+                             Type: LyndonWord Symbol
+
+See Also:
+o )show LyndonWord
+o $AXIOM/doc/src/algebra/xlpoly.spad.dvi
+
+@
 <<domain LWORD LyndonWord>>=
 )abbrev domain LWORD LyndonWord
 ++ Author: Michel Petitot (petitot@lifl.fr).
diff --git a/src/doc/book.pamphlet b/src/doc/book.pamphlet
index b941c08..a113b73 100644
--- a/src/doc/book.pamphlet
+++ b/src/doc/book.pamphlet
@@ -4823,7 +4823,7 @@ $$
 
 A {\it multiset} is a set that keeps track of the number of duplicate
 values. \footnote{Multisets are discussed in Section
-\ref{MultiSetXmpPage} on page~\pageref{MultiSetXmpPage}}
+\ref{MultisetXmpPage} on page~\pageref{MultisetXmpPage}}
 
 For all the primes $p$ between 2 and 1000, find the
 distribution of $p \bmod 5$.
@@ -41669,8 +41669,8 @@ For more information on related topics, see
 and
 \ref{TwoDimensionalArrayXmpPage} on page~\pageref{TwoDimensionalArrayXmpPage}.
 
-\section{MultiSet}
-\label{MultiSetXmpPage}
+\section{Multiset}
+\label{MultisetXmpPage}
 
 The domain {\tt Multiset(R)} is similar to {\tt Set(R)} except that
 multiplicities (counts of duplications) are maintained and displayed.
@@ -62605,7 +62605,7 @@ $\hbox{{\rm op}}_{j}$ & is an operation exported by the category.
 %
 \condata{MDAGG}{MultiDictionary}{DictionaryOperations}{duplicates insert! removeDuplicates!}
 %
-\condata{MSAGG}{MultiSetAggregate}{MultiDictionary SetAggregate}{}
+\condata{MSAGG}{MultisetAggregate}{MultiDictionary SetAggregate}{}
 %
 \condata{MTSCAT}{MultivariateTaylorSeriesCategory}{Evalable InnerEvalable PartialDifferentialRing PowerSeriesCategory
    RadicalCategory TranscendentalFunctionCategory}{coefficient extend integrate monomial order polynomial}
@@ -62638,7 +62638,7 @@ $\hbox{{\rm op}}_{j}$ & is an operation exported by the category.
 %
 \condata{ORDMON}{OrderedMonoid}{Monoid OrderedSet}{}
 %
-\condata{OMAGG}{OrderedMultiSetAggregate}{MultiSetAggregate PriorityQueueAggregate}{min}
+\condata{OMAGG}{OrderedMultisetAggregate}{MultisetAggregate PriorityQueueAggregate}{min}
 %
 \condata{ORDRING}{OrderedRing}{OrderedAbelianGroup OrderedMonoid Ring}{abs negative? positive? sign}
 %
@@ -63514,7 +63514,7 @@ $\hbox{{\rm op}}_{j}$ & is an operation exported by the domain.
    leadingMonomial lookup map monomial monomial? monomials numberOfMonomials one? random recip reductum retract
    retractIfCan size terms zero?}
 %
-\condata{MSET}{Multiset}{MultiSetAggregate}{{\tt \#} {\tt <} {\tt =} any? bag brace coerce construct convert copy count
+\condata{MSET}{Multiset}{MultisetAggregate}{{\tt \#} {\tt <} {\tt =} any? bag brace coerce construct convert copy count
    dictionary difference duplicates empty empty? eq? every? extract! find insert! inspect intersect less? map map! member?
    members more? multiset parts reduce remove remove! removeDuplicates removeDuplicates! select select! size? subset?
    symmetricDifference union}
diff --git a/src/doc/bookvol4.pamphlet b/src/doc/bookvol4.pamphlet
index db4c45d..4173cf1 100644
--- a/src/doc/bookvol4.pamphlet
+++ b/src/doc/bookvol4.pamphlet
@@ -513,9 +513,9 @@ this function.
 
 The libcheck function requires an absolute pathname to the int directory
 so call it thus:
-
-$-->$ )lisp (libcheck "/axiom/int/algebra")
-
+\begin{verbatim}
+ --> )lisp (libcheck "/axiom/int/algebra")
+\end{verbatim}
 The main reason this function is broken is that the system now gets
 exposure information from src/algebra/exposed.lsp.pamphlet. It appears
 that interp.exposed.pamphlet is no longer used (although I made sure
@@ -542,6 +542,7 @@ asq -so FOOBAR
 \end{verbatim}
 and it will tell you the name of the algebra source file that
 defines FOOBAR.
+
 \section{Axiom internal representations}
 \begin{verbatim}
 PRIMITIVE REPRESENTATIONS OF AXIOM OBJECTS
@@ -665,12 +666,110 @@ as the internal representation of
 
 what could be easier?
 \end{verbatim}
+
 \section{axiom command}
 The axiom command will eventually be a shell script. At the moment
 it is just a copy of the interpsys image. However the whole Axiom
 system consists of several processes and the axiom command starts
 these processes. The shell script will transparently replace the
 axiom executable image which will be renamed to spadsys.
+
+\section{help command documentation}
+Axiom supports a )help command that takes a single argument.
+This argument is interpreted as the name of a flat ascii file
+which should live in \$AXIOM/doc/src/spadhelp.
+
+\subsection{help documentation for algebra}
+The help documentation for algebra files lives within the algebra
+pamphlet. The help chunk contains the name of the domain, thus:
+
+\begin{verbatim}
+<<thisdomain.help>>=
+====================================================================
+thisdomain examples
+====================================================================
+
+   (documentation for this domain)
+
+  examplefunction foo
+   output
+                Type: thetype
+
+See Also:
+o )show thisdomain
+o $AXIOM/bin/src/doc/algebra/thisfile.spad.dvi
+
+@
+\end{verbatim}
+
+The documentation starts off with the domain enclosed in two lines
+of equal signs. The documentation is free format. Generally the
+functions are indented two spaces, the output is indented 3 spaces,
+and the Type field has been moved toward the center of the line.
+
+The ``See Also:'' section lists the domain with the ``show'' command
+and the path to the source file in dvi format.
+
+\subsection{adding help documentation in Makefile}
+
+There is a section in the src/algebra/Makefile.pamphlet that reads:
+\begin{verbatim}
+SPADHELP=\
+ ${HELP}/AssociationList.help  ${HELP}/BalancedBinaryTree.help \
+\end{verbatim}
+which is essentially a list of all of the algebra help files. Each item
+in this list refers to a stanza that looks like:
+
+\begin{verbatim}
+${HELP}/AssociationList.help: ${IN}/list.spad.pamphlet
+	@echo 7000 create AssociationList.help from ${IN}/list.spad.pamphlet
+	@${TANGLE} -R"AssociationList.help" ${IN}/list.spad.pamphlet \
+            >${HELP}/AssociationList.help
+	@cp ${HELP}/AssociationList.help ${HELP}/ALIST.help
+	@${TANGLE} -R"AssociationList.input" ${IN}/list.spad.pamphlet \
+            >${INPUT}/AssociationList.input
+\end{verbatim}
+
+Notice that the first line has an connection between the help file and 
+the spad file that contains it. The second line gives debugging output
+containing a unique number. The third line extracts the help file. The
+fourth line copies the file with the long name of the domain to a file
+with the abbreviation of the domain so the user can query the domain
+with either form.
+
+\subsection{Using help documentation for regression testing}
+
+The last line extracts an input test file for the algebra. In general
+each help file is used to create an input test file for regression testing.
+
+There is a Makefile variable called REGRESS in the algebra Makefile:
+\begin{verbatim}
+REGRESS=\
+ AssociationList.regress  BalancedBinaryTree.regress \
+\end{verbatim}
+
+This is part of a Makefile that structure within the algebra Makefile.
+This Makefile gets extracted by the Makefile in the input subdirectory.
+Thus there is a connection between the two Makefiles (algebra and input).
+This algebra regression Makefile goes by the chunk name 
+{\bf algebra.regress}. It contains a list of regression files and a 
+single stanza:
+\begin{verbatim}
+%.regress: %.input
+	@ echo algebra regression testing $*
+	@ rm -f $*.output
+	@ echo ')read $*.input' | ${TESTSYS} 
+	@ echo ')lisp (regress "$*.output")' | ${TESTSYS} \
+                | egrep -v '(Timestamp|Version)' | tee $*.regress
+\end{verbatim}
+The input Makefile extracts {\bf algebra.regress} and then calls 
+make to process this file.
+
+This keeps the regression test list in the algebra Makefile.
+
+\subsection{help documentation as algebra test files}
+
+
 \section{debugsys}
 The "debugsys" executable is the "interpsys" image but it is
 built using the interpreted lisp code rather than using compiled
diff --git a/src/doc/spadhelp.pamphlet b/src/doc/spadhelp.pamphlet
index cda0ac8..024164b 100644
--- a/src/doc/spadhelp.pamphlet
+++ b/src/doc/spadhelp.pamphlet
@@ -1482,33 +1482,40 @@ syntax        trace      undo       what       while
 
 Available algebra help topics are:
 
-AssociationList (ALIST)         BalancedBinaryTree (BBTREE)
-BasicOperator (BOP)             BinaryExpansion (BINARY)
-BinarySearchTree (BSTREE)       CardinalNumber (CARD)
-CartesianTensor (CARTEN)        Character (CHAR)
-CharacterClass (CCLASS)         CliffordAlgebra (CLIF)
-Complex (COMPLEX)               ContinuedFraction (CONTFRAC)
-CycleIndicators (CYCLES)        DeRhamComplex (DERHAM)
-DecimalExpansion (DECIMAL)      DistributedMultivariatePolynomial (DMP)
-DoubleFloat (DFLOAT)            EqTable (EQTBL)
-Equation (EQ)                   Factored (FR)
-FactoredFunctions2 (FR2)        File (FILE)
-FileName (FNAME)                FlexibleArray (FARRAY)
-Float (FLOAT)                   Fraction (FR)
+AssociationList (ALIST)          BalancedBinaryTree (BBTREE)
+BasicOperator (BOP)              BinaryExpansion (BINARY)
+BinarySearchTree (BSTREE)        CardinalNumber (CARD)
+CartesianTensor (CARTEN)         Character (CHAR)
+CharacterClass (CCLASS)          CliffordAlgebra (CLIF)
+Complex (COMPLEX)                ContinuedFraction (CONTFRAC)
+CycleIndicators (CYCLES)         DeRhamComplex (DERHAM)
+DecimalExpansion (DECIMAL)       DistributedMultivariatePolynomial (DMP)
+DoubleFloat (DFLOAT)             EqTable (EQTBL)
+Equation (EQ)                    Factored (FR)
+FactoredFunctions2 (FR2)         File (FILE)
+FileName (FNAME)                 FlexibleArray (FARRAY)
+Float (FLOAT)                    Fraction (FR)
 FullPartialFractionExpansion (FPARFRAC)
 GeneralDistributedMultivariatePolynomial (GDMP)
-GeneralSparseTable (GSTBL)      GroebnerFactorizationPackage (GBF)
-Heap (HEAP)                     HexadecimalExpansion (HEXADEC)
+GeneralSparseTable (GSTBL)       GroebnerFactorizationPackage (GBF)
+Heap (HEAP)                      HexadecimalExpansion (HEXADEC)
 HomogeneousDistributedMultivariatePolynomial (HDMP)
-Integer (INT)                   IntegerLinearDependence (ZLINDEP)
+Integer (INT)                    IntegerLinearDependence (ZLINDEP)
 IntegerNumberTheoryFunctions (INTHEORY)
-Kernel (KERNEL)                 KeyedAccessFile (KAFILE)
-LexTriangularPackage (LEXTRIPK) Library (LIB)
-LieExponentials (LEXP)          LinearOrdinaryDifferentialOperator (LODO)
+Kernel (KERNEL)                  KeyedAccessFile (KAFILE)
+LexTriangularPackage (LEXTRIPK)  Library (LIB)
+LieExponentials (LEXP)           LinearOrdinaryDifferentialOperator (LODO)
 LinearOrdinaryDifferentialOperator1 (LODO1)
 LinearOrdinaryDifferentialOperator2 (LODO2)
-RealSolvePackage (REALSOLV)
-RomanNumeral (ROMAN)
+List (LIST)                      LyndonWord (LWORD)
+Magma (MAGMA)                    MakeFunction (MKFUNC)
+MappingPackage1 (MAPPKG1)        MappingPackage2 (MAPPKG2)
+MappingPackage3 (MAPPKG3)        Matrix (MATRIX)
+Multiset (MSET)                  MultivariatePolynomial (MPOLY)
+None (NONE)                      Octonion (OCT)
+OneDimensionalArray (ARRAY1)
+PlaneAlgebraicCurvePlot (ACPLOT) RealSolvePackage (REALSOLV)
+RomanNumeral (ROMAN)             TwoDimensionalViewport (VIEW2D)
 
 @ 
 
diff --git a/src/input/Makefile.pamphlet b/src/input/Makefile.pamphlet
index 6a8e7e0..38b647a 100644
--- a/src/input/Makefile.pamphlet
+++ b/src/input/Makefile.pamphlet
@@ -281,9 +281,6 @@ OUTS= ffrac.output     \
       xpoly.output     xpr.output       \
       zdsolve.output   zimmer.output    zlindep.output 
 
-# new algebra tests based on documentation
-ALGEBRA=INTHEORY.output VIEW2D.output TESTFR.output
-
 REGRES= algaggr.regress algbrbf.regress  algfacob.regress alist.regress  \
     allfact.regress   antoine.regress \
     arith.regress     array1.regress   array2.regress \
@@ -361,7 +358,7 @@ REGRES= algaggr.regress algbrbf.regress  algfacob.regress alist.regress  \
 IN=     ${SRC}/input
 MID=	${INT}/input
 
-all: ${OUTS} ${ALGEBRA} ${REGRES} 
+all: ${OUTS} ${REGRES} 
 	@ echo 0 starting algebra regression testing
 	@ (cd ${MID} ; \
 	  ${TANGLE} -t8 -R"algebra.regress" ${SRC}/algebra/Makefile.pamphlet \

\start
Date: Wed, 5 Sep 2007 07:46:50 -0500
From: Tim Daly
To: list
Subject: 20070905.01.tpd.patch

This patch

- Adds additional help and regression test files for the algebra:

  o Set (SET)
  o SegmentBinding (SEGBIND)
  o Segment (SEG)
  o RomanNumeral.help (ROMAN)
  o RegularTriangularSet (REGSET)
  o RealClosure (RECLOS)
  o RadixExpansion (RADIX)
  o Polynomial (POLY)
  o Permanent (PERM)
  o PartialFraction (PFRAC)
  o OrderlyDifferentialPolynomial (ODPOL)
  o OrderedVariableList (OVAR)
  o Operator (OP)

Tim

================================================================
diff --git a/changelog b/changelog
index eeab935..6ffd80a 100644
--- a/changelog
+++ b/changelog
@@ -1,3 +1,53 @@
+20070905 tpd src/doc/spadhelp add Set
+20070905 tpd src/algebra/Makefile add Set.help 
+20070905 tpd src/algebra/sets.spad add Set.help (SET)
+20070905 tpd src/algebra/sets.spad Set.input
+20070905 tpd src/doc/spadhelp add SegmentBinding
+20070905 tpd src/algebra/Makefile add SegmentBinding.help 
+20070905 tpd src/algebra/seg.spad add SegmentBinding.help (SEGBIND)
+20070905 tpd src/algebra/seg.spad SegmentBinding.input
+20070905 tpd src/doc/spadhelp add Segment
+20070905 tpd src/algebra/Makefile add Segment.help 
+20070905 tpd src/algebra/seg.spad add Segment.help (SEG)
+20070905 tpd src/algebra/seg.spad Segment.input
+20070905 tpd src/algebra/integer.spad update RomanNumeral.help (ROMAN)
+20070905 tpd src/algebra/integer.spad update RomanNumeral.input
+20070904 tpd src/doc/spadhelp add RegularTriangularSet
+20070904 tpd src/algebra/Makefile add RegularTriangularSet.help 
+20070904 tpd src/algebra/regset.spad add RegularTriangularSet.help (REGSET)
+20070904 tpd src/algebra/regset.spad RegularTriangularSet.input
+20070904 tpd src/doc/spadhelp add RealClosure
+20070904 tpd src/algebra/Makefile add RealClosure.help 
+20070904 tpd src/algebra/reclos.spad add RealClosure.help (RECLOS)
+20070904 tpd src/algebra/reclos.spad RealClosure.input
+20070904 tpd src/doc/spadhelp add RadixExpansion
+20070904 tpd src/algebra/Makefile add RadixExpansion.help 
+20070904 tpd src/algebra/radix.spad add RadixExpansion.help (RADIX)
+20070904 tpd src/algebra/radix.spad RadixExpansion.input
+20070903 tpd src/doc/spadhelp add Polynomial
+20070903 tpd src/algebra/Makefile add Polynomial.help 
+20070903 tpd src/algebra/multpoly.spad add Polynomial.help (POLY)
+20070903 tpd src/algebra/multpoly.spad Polynomial.input
+20070903 tpd src/doc/spadhelp add Permanent
+20070903 tpd src/algebra/Makefile add Permanent.help 
+20070903 tpd src/algebra/perman.spad add Permanent.help (PERMAN)
+20070903 tpd src/algebra/perman.spad Permanent.input
+20070903 tpd src/doc/spadhelp add PartialFraction
+20070903 tpd src/algebra/Makefile add PartialFraction.help 
+20070903 tpd src/algebra/pfr.spad add PartialFraction.help (PFR)
+20070903 tpd src/algebra/pfr.spad PartialFraction.input
+20070903 tpd src/doc/spadhelp add OrderlyDifferentialPolynomial
+20070903 tpd src/algebra/Makefile add OrderlyDifferentialPolynomial.help 
+20070903 tpd src/algebra/dpolcat.spad add OrderlyDifferentialPolynomial (ODPOL)
+20070903 tpd src/algebra/dpolcat.spad OrderlyDifferentialPolynomial.input
+20070903 tpd src/doc/spadhelp add OrderedVariableList
+20070903 tpd src/algebra/Makefile add OrderedVariableList.help 
+20070903 tpd src/algebra/variable.spad add OrderedVariableList.help (OVAR)
+20070903 tpd src/algebra/variable.spad OrderedVariableList.input
+20070903 tpd src/doc/spadhelp add Operator
+20070903 tpd src/algebra/Makefile add Operator.help 
+20070903 tpd src/algebra/opalg.spad add Operator.help (OP)
+20070903 tpd src/algebra/opalg.spad Operator.input
 20070903 tpd src/algebra/radix.spad fix typos in help file
 20070903 tpd src/algebra/integer.spad fix typos in help file
 20070903 tpd src/doc/bookvol4 fix typos
@@ -26,7 +76,7 @@
 20070902 tpd src/algebra/Makefile add Matrix.help 
 20070902 tpd src/algebra/matrix.spad add Matrix.help (MATRIX)
 20070902 tpd src/algebra/matrix.spad Matrix.input
-20070902 tpd src/doc/bookvol4 document how to add help files
+20070902 tpd src/doc/Makefile document how to add help files
 20070902 tpd src/algebra/Makefile document how to add help files
 20070902 tpd src/doc/spadhelp add MappingPackage3
 20070902 tpd src/algebra/Makefile add MappingPackage3.help 
diff --git a/src/algebra/Makefile.pamphlet b/src/algebra/Makefile.pamphlet
index b011d80..8c50591 100644
--- a/src/algebra/Makefile.pamphlet
+++ b/src/algebra/Makefile.pamphlet
@@ -2098,10 +2098,16 @@ SPADHELP=\
  ${HELP}/Matrix.help           ${HELP}/Multiset.help \
  ${HELP}/MultivariatePolynomial.help ${HELP}/None.help \
  ${HELP}/Octonion.help         ${HELP}/OneDimensionalArray.help \
+ ${HELP}/Operator.help         ${HELP}/OrderedVariableList.help \
+ ${HELP}/OrderlyDifferentialPolynomial.help \
  ${HELP}/PlaneAlgebraicCurvePlot.help \
- ${HELP}/Permutation.help \
- ${HELP}/RealSolvePackage.help \
- ${HELP}/RomanNumeral.help \
+ ${HELP}/Permutation.help      ${HELP}/PartialFraction.help \
+ ${HELP}/Permanent.help        ${HELP}/Polynomial.help \
+ ${HELP}/Quaternion.help       ${HELP}/RadixExpansion.help \
+ ${HELP}/RealClosure.help      ${HELP}/RealSolvePackage.help \
+ ${HELP}/RegularTriangularSet.help \
+ ${HELP}/RomanNumeral.help     ${HELP}/Segment.help \
+ ${HELP}/Set.help \
  ${HELP}/TwoDimensionalViewport.help
 
 @
@@ -2142,10 +2148,15 @@ REGRESS=\
  Matrix.regress            Multiset.regress \
  MultivariatePolynomial.regress None.regress \
  Octonion.regress          OneDimensionalArray.regress \
- RealSolvePackage.regress \
+ Operator.regress          OrderedVariableList.regress \
+ OrderlyDifferentialPolynomial.regress PartialFraction.regress \
+ Permanent.regress         Permutation.regress \
  PlaneAlgebraicCurvePlot.regress \
- Permutation.regress \
- RomanNumeral.regress 
+ Polynomial.regress        Quaternion.regress \
+ RadixExpansion.regress    RealClosure.regress \
+ RealSolvePackage.regress  RegularTriangularSet.regress \
+ RomanNumeral.regress      Segment.regress \
+ Set.regress
 
 # this requires graphics
 # TwoDimensionalViewport
@@ -2628,8 +2639,60 @@ ${HELP}/OneDimensionalArray.help: ${IN}/array1.spad.pamphlet
 	@${TANGLE} -R"OneDimensionalArray.input" ${IN}/array1.spad.pamphlet \
             >${INPUT}/OneDimensionalArray.input
 
+${HELP}/Operator.help: ${IN}/opalg.spad.pamphlet
+	@echo 7053 create Operator.help from ${IN}/opalg.spad.pamphlet
+	@${TANGLE} -R"Operator.help" ${IN}/opalg.spad.pamphlet \
+           >${HELP}/Operator.help
+	@cp ${HELP}/Operator.help ${HELP}/OP.help
+	@${TANGLE} -R"Operator.input" ${IN}/opalg.spad.pamphlet \
+            >${INPUT}/Operator.input
+
+${HELP}/OrderedVariableList.help: ${IN}/variable.spad.pamphlet
+	@echo 7054 create OrderedVariableList.help from \
+           ${IN}/variable.spad.pamphlet
+	@${TANGLE} -R"OrderedVariableList.help" ${IN}/variable.spad.pamphlet \
+           >${HELP}/OrderedVariableList.help
+	@cp ${HELP}/OrderedVariableList.help ${HELP}/OVAR.help
+	@${TANGLE} -R"OrderedVariableList.input" ${IN}/variable.spad.pamphlet \
+            >${INPUT}/OrderedVariableList.input
+
+${HELP}/OrderlyDifferentialPolynomial.help: ${IN}/dpolcat.spad.pamphlet
+	@echo 7055 create OrderlyDifferentialPolynomial.help from \
+           ${IN}/dpolcat.spad.pamphlet
+	@${TANGLE} -R"OrderlyDifferentialPolynomial.help" \
+           ${IN}/dpolcat.spad.pamphlet \
+           >${HELP}/OrderlyDifferentialPolynomial.help
+	@cp ${HELP}/OrderlyDifferentialPolynomial.help ${HELP}/ODPOL.help
+	@${TANGLE} -R"OrderlyDifferentialPolynomial.input" \
+            ${IN}/dpolcat.spad.pamphlet \
+            >${INPUT}/OrderlyDifferentialPolynomial.input
+
+${HELP}/PartialFraction.help: ${IN}/pfr.spad.pamphlet
+	@echo 7056 create PartialFraction.help from ${IN}/pfr.spad.pamphlet
+	@${TANGLE} -R"PartialFraction.help" ${IN}/pfr.spad.pamphlet \
+           >${HELP}/PartialFraction.help
+	@cp ${HELP}/PartialFraction.help ${HELP}/PFR.help
+	@${TANGLE} -R"PartialFraction.input" ${IN}/pfr.spad.pamphlet \
+            >${INPUT}/PartialFraction.input
+
+${HELP}/Permanent.help: ${IN}/perman.spad.pamphlet
+	@echo 7057 create Permanent.help from ${IN}/perman.spad.pamphlet
+	@${TANGLE} -R"Permanent.help" ${IN}/perman.spad.pamphlet \
+           >${HELP}/Permanent.help
+	@cp ${HELP}/Permanent.help ${HELP}/PERMAN.help
+	@${TANGLE} -R"Permanent.input" ${IN}/perman.spad.pamphlet \
+            >${INPUT}/Permanent.input
+
+${HELP}/Polynomial.help: ${IN}/multpoly.spad.pamphlet
+	@echo 7058 create Polynomial.help from ${IN}/multpoly.spad.pamphlet
+	@${TANGLE} -R"Polynomial.help" ${IN}/multpoly.spad.pamphlet \
+           >${HELP}/Polynomial.help
+	@cp ${HELP}/Polynomial.help ${HELP}/POLY.help
+	@${TANGLE} -R"Polynomial.input" ${IN}/multpoly.spad.pamphlet \
+            >${INPUT}/Polynomial.input
+
 ${HELP}/PlaneAlgebraicCurvePlot.help: ${IN}/acplot.spad.pamphlet
-	@echo 7053 create PlaneAlgebraicCurvePlot.help from \
+	@echo 7059 create PlaneAlgebraicCurvePlot.help from \
             ${IN}/acplot.spad.pamphlet
 	@${TANGLE} -R"PlaneAlgebraicCurvePlot.help" \
           ${IN}/acplot.spad.pamphlet \
@@ -2640,31 +2703,80 @@ ${HELP}/PlaneAlgebraicCurvePlot.help: ${IN}/acplot.spad.pamphlet
             >${INPUT}/PlaneAlgebraicCurvePlot.input
 
 ${HELP}/Permutation.help: ${IN}/perm.spad.pamphlet
-	@echo 7054 create Permutation.help from ${IN}/perm.spad.pamphlet
+	@echo 7060 create Permutation.help from ${IN}/perm.spad.pamphlet
 	@${TANGLE} -R"Permutation.help" ${IN}/perm.spad.pamphlet \
            >${HELP}/Permutation.help
 	@cp ${HELP}/Permutation.help ${HELP}/PERM.help
 	@${TANGLE} -R"Permutation.input" ${IN}/perm.spad.pamphlet \
             >${INPUT}/Permutation.input
 
+${HELP}/Quaternion.help: ${IN}/quat.spad.pamphlet
+	@echo 7061 create Quaternion.help from ${IN}/quat.spad.pamphlet
+	@${TANGLE} -R"Quaternion.help" ${IN}/quat.spad.pamphlet \
+           >${HELP}/Quaternion.help
+	@cp ${HELP}/Quaternion.help ${HELP}/QUAT.help
+	@${TANGLE} -R"Quaternion.input" ${IN}/quat.spad.pamphlet \
+            >${INPUT}/Quaternion.input
+
+${HELP}/RadixExpansion.help: ${IN}/radix.spad.pamphlet
+	@echo 7062 create RadixExpansion.help from ${IN}/radix.spad.pamphlet
+	@${TANGLE} -R"RadixExpansion.help" ${IN}/radix.spad.pamphlet \
+           >${HELP}/RadixExpansion.help
+	@cp ${HELP}/RadixExpansion.help ${HELP}/RADIX.help
+	@${TANGLE} -R"RadixExpansion.input" ${IN}/radix.spad.pamphlet \
+            >${INPUT}/RadixExpansion.input
+
+${HELP}/RealClosure.help: ${IN}/reclos.spad.pamphlet
+	@echo 7063 create RealClosure.help from ${IN}/reclos.spad.pamphlet
+	@${TANGLE} -R"RealClosure.help" ${IN}/reclos.spad.pamphlet \
+           >${HELP}/RealClosure.help
+	@cp ${HELP}/RealClosure.help ${HELP}/RECLOS.help
+	@${TANGLE} -R"RealClosure.input" ${IN}/reclos.spad.pamphlet \
+            >${INPUT}/RealClosure.input
+
 ${HELP}/RealSolvePackage.help: ${IN}/acplot.spad.pamphlet
-	@echo 7055 create RealSolvePackage.help from ${IN}/acplot.spad.pamphlet
+	@echo 7064 create RealSolvePackage.help from ${IN}/acplot.spad.pamphlet
 	@${TANGLE} -R"RealSolvePackage.help" ${IN}/acplot.spad.pamphlet \
            >${HELP}/RealSolvePackage.help
 	@cp ${HELP}/RealSolvePackage.help ${HELP}/REALSOLV.help
 	@${TANGLE} -R"RealSolvePackage.input" ${IN}/acplot.spad.pamphlet \
             >${INPUT}/RealSolvePackage.input
 
+${HELP}/RegularTriangularSet.help: ${IN}/regset.spad.pamphlet
+	@echo 7065 create RegularTriangularSet.help from \
+          ${IN}/regset.spad.pamphlet
+	@${TANGLE} -R"RegularTriangularSet.help" ${IN}/regset.spad.pamphlet \
+           >${HELP}/RegularTriangularSet.help
+	@cp ${HELP}/RegularTriangularSet.help ${HELP}/REGSET.help
+	@${TANGLE} -R"RegularTriangularSet.input" ${IN}/regset.spad.pamphlet \
+            >${INPUT}/RegularTriangularSet.input
+
 ${HELP}/RomanNumeral.help: ${IN}/integer.spad.pamphlet
-	@echo 7056 create RomanNumeral.help from ${IN}/integer.spad.pamphlet
+	@echo 7066 create RomanNumeral.help from ${IN}/integer.spad.pamphlet
 	@${TANGLE} -R"RomanNumeral.help" ${IN}/integer.spad.pamphlet \
            >${HELP}/RomanNumeral.help
 	@cp ${HELP}/RomanNumeral.help ${HELP}/ROMAN.help
 	@${TANGLE} -R"RomanNumeral.input" ${IN}/integer.spad.pamphlet \
             >${INPUT}/RomanNumeral.input
 
+${HELP}/Segment.help: ${IN}/seg.spad.pamphlet
+	@echo 7067 create Segment.help from ${IN}/seg.spad.pamphlet
+	@${TANGLE} -R"Segment.help" ${IN}/seg.spad.pamphlet \
+           >${HELP}/Segment.help
+	@cp ${HELP}/Segment.help ${HELP}/SEG.help
+	@${TANGLE} -R"Segment.input" ${IN}/seg.spad.pamphlet \
+            >${INPUT}/Segment.input
+
+${HELP}/Set.help: ${IN}/sets.spad.pamphlet
+	@echo 7068 create Set.help from ${IN}/sets.spad.pamphlet
+	@${TANGLE} -R"Set.help" ${IN}/sets.spad.pamphlet \
+           >${HELP}/Set.help
+	@cp ${HELP}/Set.help ${HELP}/SET.help
+	@${TANGLE} -R"Set.input" ${IN}/sets.spad.pamphlet \
+            >${INPUT}/Set.input
+
 ${HELP}/TwoDimensionalViewport.help: ${IN}/view2d.spad.pamphlet
-	@echo 7057 create TwoDimensionalViewport.help from \
+	@echo 7069 create TwoDimensionalViewport.help from \
            ${IN}/view2d.spad.pamphlet
 	@${TANGLE} -R"TwoDimensionalViewport.help" \
            ${IN}/view2d.spad.pamphlet \
diff --git a/src/algebra/dpolcat.spad.pamphlet b/src/algebra/dpolcat.spad.pamphlet
index 2a17025..f01f7df 100644
--- a/src/algebra/dpolcat.spad.pamphlet
+++ b/src/algebra/dpolcat.spad.pamphlet
@@ -471,6 +471,658 @@ DifferentialSparseMultivariatePolynomial(R, S, V):
 
 @
 \section{domain ODPOL OrderlyDifferentialPolynomial}
+<<OrderlyDifferentialPolynomial.input>>=
+-- dpolcat.spad.pamphlet OrderlyDifferentialPolynomial.input
+)spool OrderlyDifferentialPolynomial.output
+)set message test on
+)set message auto off
+)clear all
+--S 1 of 36
+dpol:= ODPOL(FRAC INT)
+--R 
+--R
+--R   (1)  OrderlyDifferentialPolynomial Fraction Integer
+--R                                                                 Type: Domain
+--E 1
+
+--S 2 of 36
+w := makeVariable('w)$dpol
+--R 
+--R
+--R   (2)  theMap(DPOLCAT-;makeVariable;AM;17!0,0)
+--R Type: (NonNegativeInteger -> OrderlyDifferentialPolynomial Fraction Integer)
+--E 2
+
+--S 3 of 36
+z := makeVariable('z)$dpol
+--R 
+--R
+--R   (3)  theMap(DPOLCAT-;makeVariable;AM;17!0,0)
+--R Type: (NonNegativeInteger -> OrderlyDifferentialPolynomial Fraction Integer)
+--E 3
+
+--S 4 of 36
+w.5
+--R 
+--R
+--R   (4)  w
+--R         5
+--R                         Type: OrderlyDifferentialPolynomial Fraction Integer
+--E 4
+
+--S 5 of 36
+w 0
+--R 
+--R
+--R   (5)  w
+--R                         Type: OrderlyDifferentialPolynomial Fraction Integer
+--E 5
+
+--S 6 of 36
+[z.i for i in 1..5]
+--R 
+--R
+--R   (6)  [z ,z ,z ,z ,z ]
+--R          1  2  3  4  5
+--R                    Type: List OrderlyDifferentialPolynomial Fraction Integer
+--E 6
+
+--S 7 of 36
+f:= w.4 - w.1 * w.1 * z.3 
+--R 
+--R
+--R               2
+--R   (7)  w  - w  z
+--R         4    1  3
+--R                         Type: OrderlyDifferentialPolynomial Fraction Integer
+--E 7
+
+--S 8 of 36
+g:=(z.1)**3 * (z.2)**2 - w.2
+--R 
+--R
+--R          3  2
+--R   (8)  z  z   - w
+--R         1  2     2
+--R                         Type: OrderlyDifferentialPolynomial Fraction Integer
+--E 8
+
+--S 9 of 36
+D(f)
+--R 
+--R
+--R               2
+--R   (9)  w  - w  z  - 2w w z
+--R         5    1  4     1 2 3
+--R                         Type: OrderlyDifferentialPolynomial Fraction Integer
+--E 9
+
+--S 10 of 36
+D(f,4)
+--R 
+--R
+--R   (10)
+--R            2                               2
+--R     w  - w  z  - 8w w z  + (- 12w w  - 12w  )z  - 2w z w
+--R      8    1  7     1 2 6         1 3      2   5     1 3 5
+--R   + 
+--R                                         2
+--R     (- 8w w  - 24w w )z  - 8w z w  - 6w  z
+--R          1 4      2 3  4     2 3 4     3  3
+--R                         Type: OrderlyDifferentialPolynomial Fraction Integer
+--E 10
+
+--S 11 of 36
+df:=makeVariable(f)$dpol
+--R 
+--R
+--R   (11)  theMap(DPOLCAT-;makeVariable;AM;17!0,0)
+--R Type: (NonNegativeInteger -> OrderlyDifferentialPolynomial Fraction Integer)
+--E 11
+
+--S 12 of 36
+df.4
+--R 
+--R
+--R   (12)
+--R            2                               2
+--R     w  - w  z  - 8w w z  + (- 12w w  - 12w  )z  - 2w z w
+--R      8    1  7     1 2 6         1 3      2   5     1 3 5
+--R   + 
+--R                                         2
+--R     (- 8w w  - 24w w )z  - 8w z w  - 6w  z
+--R          1 4      2 3  4     2 3 4     3  3
+--R                         Type: OrderlyDifferentialPolynomial Fraction Integer
+--E 12
+
+--S 13 of 36
+order(g)
+--R 
+--R
+--R   (13)  2
+--R                                                        Type: PositiveInteger
+--E 13
+
+--S 14 of 36
+order(g, 'w)
+--R 
+--R
+--R   (14)  2
+--R                                                        Type: PositiveInteger
+--E 14
+
+--S 15 of 36
+differentialVariables(g)
+--R 
+--R
+--R   (15)  [z,w]
+--R                                                            Type: List Symbol
+--E 15
+
+--S 16 of 36
+degree(g)
+--R 
+--R
+--R           2  3
+--R   (16)  z  z
+--R          2  1
+--R                    Type: IndexedExponents OrderlyDifferentialVariable Symbol
+--E 16
+
+--S 17 of 36
+degree(g, 'w) 
+--R 
+--R
+--R   (17)  1
+--R                                                        Type: PositiveInteger
+--E 17
+
+--S 18 of 36
+weights(g)
+--R 
+--R
+--R   (18)  [7,2]
+--R                                                Type: List NonNegativeInteger
+--E 18
+
+--S 19 of 36
+weights(g,'w)
+--R 
+--R
+--R   (19)  [2]
+--R                                                Type: List NonNegativeInteger
+--E 19
+
+--S 20 of 36
+weight(g)
+--R 
+--R
+--R   (20)  7
+--R                                                        Type: PositiveInteger
+--E 20
+
+--S 21 of 36
+isobaric?(g)
+--R 
+--R
+--R   (21)  false
+--R                                                                Type: Boolean
+--E 21
+
+--S 22 of 36
+eval(g,['w::Symbol],[f])
+--R 
+--R
+--R                  2                           2        3  2
+--R   (22)  - w  + w  z  + 4w w z  + (2w w  + 2w  )z  + z  z
+--R            6    1  5     1 2 4      1 3     2   3    1  2
+--R                         Type: OrderlyDifferentialPolynomial Fraction Integer
+--E 22
+
+--S 23 of 36
+eval(g,variables(w.0),[f])
+--R 
+--R
+--R           3  2
+--R   (23)  z  z   - w
+--R          1  2     2
+--R                         Type: OrderlyDifferentialPolynomial Fraction Integer
+--E 23
+
+--S 24 of 36
+monomials(g)
+--R 
+--R
+--R            3  2
+--R   (24)  [z  z  ,- w ]
+--R           1  2     2
+--R                    Type: List OrderlyDifferentialPolynomial Fraction Integer
+--E 24
+
+--S 25 of 36
+variables(g)
+--R 
+--R
+--R   (25)  [z ,w ,z ]
+--R           2  2  1
+--R                                Type: List OrderlyDifferentialVariable Symbol
+--E 25
+
+--S 26 of 36
+gcd(f,g)
+--R 
+--R
+--R   (26)  1
+--R                         Type: OrderlyDifferentialPolynomial Fraction Integer
+--E 26
+
+--S 27 of 36
+groebner([f,g])
+--R 
+--R
+--R                 2     3  2
+--R   (27)  [w  - w  z ,z  z   - w ]
+--R           4    1  3  1  2     2
+--R                    Type: List OrderlyDifferentialPolynomial Fraction Integer
+--E 27
+
+--S 28 of 36
+lg:=leader(g)
+--R 
+--R
+--R   (28)  z
+--R          2
+--R                                     Type: OrderlyDifferentialVariable Symbol
+--E 28
+
+--S 29 of 36
+sg:=separant(g)
+--R 
+--R
+--R            3
+--R   (29)  2z  z
+--R           1  2
+--R                         Type: OrderlyDifferentialPolynomial Fraction Integer
+--E 29
+
+--S 30 of 36
+ig:=initial(g)
+--R 
+--R
+--R           3
+--R   (30)  z
+--R          1
+--R                         Type: OrderlyDifferentialPolynomial Fraction Integer
+--E 30
+
+--S 31 of 36
+g1 := D g
+--R 
+--R
+--R            3               2  3
+--R   (31)  2z  z z  - w  + 3z  z
+--R           1  2 3    3     1  2
+--R                         Type: OrderlyDifferentialPolynomial Fraction Integer
+--E 31
+
+--S 32 of 36
+lg1:= leader g1
+--R 
+--R
+--R   (32)  z
+--R          3
+--R                                     Type: OrderlyDifferentialVariable Symbol
+--E 32
+
+--S 33 of 36
+pdf:=D(f, lg1)
+--R 
+--R
+--R             2
+--R   (33)  - w
+--R            1
+--R                         Type: OrderlyDifferentialPolynomial Fraction Integer
+--E 33
+
+--S 34 of 36
+prf:=sg * f- pdf * g1
+--R 
+--R
+--R            3         2        2  2  3
+--R   (34)  2z  z w  - w  w  + 3w  z  z
+--R           1  2 4    1  3     1  1  2
+--R                         Type: OrderlyDifferentialPolynomial Fraction Integer
+--E 34
+
+--S 35 of 36
+lcf:=leadingCoefficient univariate(prf, lg)
+--R 
+--R
+--R            2  2
+--R   (35)  3w  z
+--R           1  1
+--R                         Type: OrderlyDifferentialPolynomial Fraction Integer
+--E 35
+
+--S 36 of 36
+ig * prf - lcf * g * lg
+--R 
+--R
+--R            6         2  3        2  2
+--R   (36)  2z  z w  - w  z  w  + 3w  z  w z
+--R           1  2 4    1  1  3     1  1  2 2
+--R                         Type: OrderlyDifferentialPolynomial Fraction Integer
+--E 36
+)spool
+)lisp (bye)
+@
+<<OrderlyDifferentialPolynomial.help>>=
+====================================================================
+OrderlyDifferentialPolynomial examples
+====================================================================
+
+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 OrderlyDifferentialPolynomial (abbreviated ODPOL) and
+SequentialDifferentialPolynomial (abbreviation 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 ODPOL and 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, DifferentialSparseMultivariatePolynomial (abbreviation 
+DSMP) allows both a user-provided list of differential indeterminates
+as well as a user-defined ranking.  We shall illustrate ODPOL(FRAC INT), 
+which constructs a domain of ordinary differential polynomials in an 
+arbitrary number of differential indeterminates with rational numbers 
+as coefficients.
+
+  dpol:= ODPOL(FRAC INT)
+    OrderlyDifferentialPolynomial Fraction Integer
+                            Type: Domain
+
+A differential indeterminate w may be viewed as an infinite sequence of 
+algebraic indeterminates, which are the derivatives of w. To facilitate 
+referencing these, Axiom provides the operation makeVariable to convert 
+an element of type Symbol to a map from the natural numbers to the 
+differential polynomial ring.
+
+  w := makeVariable('w)$dpol
+    theMap(DPOLCAT-;makeVariable;AM;17!0,0)
+ Type: (NonNegativeInteger -> OrderlyDifferentialPolynomial Fraction Integer)
+
+  z := makeVariable('z)$dpol
+    theMap(DPOLCAT-;makeVariable;AM;17!0,0)
+ Type: (NonNegativeInteger -> OrderlyDifferentialPolynomial Fraction Integer)
+
+The fifth derivative of w can be obtained by applying the map w to the 
+number 5.  Note that the order of differentiation is given as a subscript 
+(except when the order is 0).
+
+  w.5
+    w
+     5
+                      Type: OrderlyDifferentialPolynomial Fraction Integer
+
+  w 0
+    w
+                      Type: OrderlyDifferentialPolynomial Fraction Integer
+
+The first five derivatives of z can be generated by a list.
+
+  [z.i for i in 1..5]
+    [z ,z ,z ,z ,z ]
+      1  2  3  4  5
+                    Type: List OrderlyDifferentialPolynomial Fraction Integer
+
+The usual arithmetic can be used to form a differential polynomial from
+the derivatives.
+
+  f:= w.4 - w.1 * w.1 * z.3 
+           2
+    w  - w  z
+     4    1  3
+                    Type: OrderlyDifferentialPolynomial Fraction Integer
+
+  g:=(z.1)**3 * (z.2)**2 - w.2
+      3  2
+    z  z   - w
+     1  2     2
+                    Type: OrderlyDifferentialPolynomial Fraction Integer
+
+The operation D computes the derivative of any differential polynomial.
+
+  D(f)
+           2
+    w  - w  z  - 2w w z
+     5    1  4     1 2 3
+                    Type: OrderlyDifferentialPolynomial Fraction Integer
+
+The same operation can compute higher derivatives, like the fourth derivative.
+
+  D(f,4)
+            2                               2
+     w  - w  z  - 8w w z  + (- 12w w  - 12w  )z  - 2w z w
+      8    1  7     1 2 6         1 3      2   5     1 3 5
+   + 
+                                         2
+     (- 8w w  - 24w w )z  - 8w z w  - 6w  z
+          1 4      2 3  4     2 3 4     3  3
+                         Type: OrderlyDifferentialPolynomial Fraction Integer
+
+The operation makeVariable creates a map to facilitate referencing the 
+derivatives of f, similar to the map w.
+
+  df:=makeVariable(f)$dpol
+    theMap(DPOLCAT-;makeVariable;AM;17!0,0)
+ Type: (NonNegativeInteger -> OrderlyDifferentialPolynomial Fraction Integer)
+
+The fourth derivative of f may be referenced easily.
+
+  df.4
+            2                               2
+     w  - w  z  - 8w w z  + (- 12w w  - 12w  )z  - 2w z w
+      8    1  7     1 2 6         1 3      2   5     1 3 5
+   + 
+                                         2
+     (- 8w w  - 24w w )z  - 8w z w  - 6w  z
+          1 4      2 3  4     2 3 4     3  3
+                    Type: OrderlyDifferentialPolynomial Fraction Integer
+
+The operation order returns the order of a differential polynomial, 
+or the order in a specified differential indeterminate.
+
+  order(g)
+    2
+                    Type: PositiveInteger
+
+  order(g, 'w)
+    2
+                    Type: PositiveInteger
+
+The operation differentialVariables returns a list of differential 
+indeterminates occurring in a differential polynomial.
+
+  differentialVariables(g)
+    [z,w]
+                    Type: List Symbol
+
+The operation degree returns the degree, or the degree in the differential 
+indeterminate specified.
+
+  degree(g)
+       2  3
+     z  z
+      2  1
+                    Type: IndexedExponents OrderlyDifferentialVariable Symbol
+
+  degree(g, 'w) 
+    1
+                    Type: PositiveInteger
+
+The operation weights returns a list of weights of differential monomials 
+appearing in differential polynomial, or a list of weights in a specified 
+differential indeterminate.
+
+  weights(g)
+    [7,2]
+                    Type: List NonNegativeInteger
+
+  weights(g,'w)
+    [2]
+                    Type: List NonNegativeInteger
+
+The operation weight returns the maximum weight of all differential 
+monomials appearing in the differential polynomial.
+
+  weight(g)
+    7
+                    Type: PositiveInteger
+
+A differential polynomial is isobaric if the weights of all differential 
+monomials appearing in it are equal.
+
+  isobaric?(g)
+    false
+                    Type: Boolean
+
+To substitute differentially, use eval. Note that we must coerce 'w to 
+Symbol, since in ODPOL, differential indeterminates belong to the domain 
+Symbol.  Compare this result to the next, which substitutes algebraically
+(no substitution is done since w.0 does not appear in g).
+
+  eval(g,['w::Symbol],[f])
+              2                           2        3  2
+     - w  + w  z  + 4w w z  + (2w w  + 2w  )z  + z  z
+        6    1  5     1 2 4      1 3     2   3    1  2
+                    Type: OrderlyDifferentialPolynomial Fraction Integer
+
+  eval(g,variables(w.0),[f])
+       3  2
+     z  z   - w
+      1  2     2
+                    Type: OrderlyDifferentialPolynomial Fraction Integer
+
+Since OrderlyDifferentialPolynomial belongs to PolynomialCategory, all 
+the operations defined in the latter category, or in packages for the 
+latter category, are available.
+
+  monomials(g)
+        3  2
+     [z  z  ,- w ]
+       1  2     2
+                    Type: List OrderlyDifferentialPolynomial Fraction Integer
+
+  variables(g)
+    [z ,w ,z ]
+      2  2  1
+                    Type: List OrderlyDifferentialVariable Symbol
+
+  gcd(f,g)
+    1
+                    Type: OrderlyDifferentialPolynomial Fraction Integer
+
+  groebner([f,g])
+             2     3  2
+     [w  - w  z ,z  z   - w ]
+       4    1  3  1  2     2
+                    Type: List OrderlyDifferentialPolynomial Fraction Integer
+
+The next three operations are essential for elimination procedures in
+differential polynomial rings.  The operation leader returns the leader
+of a differential polynomial, which is the highest ranked derivative
+of the differential indeterminates that occurs.
+
+  lg:=leader(g)
+     z
+      2
+                    Type: OrderlyDifferentialVariable Symbol
+
+The operation separant returns the separant of a differential polynomial, 
+which is the partial derivative with respect to the leader.
+
+  sg:=separant(g)
+       3
+    2z  z
+      1  2
+                    Type: OrderlyDifferentialPolynomial Fraction Integer
+
+The operation initial returns the initial, which is the leading coefficient 
+when the given differential polynomial is expressed as a polynomial in 
+the leader.
+
+  ig:=initial(g)
+      3
+    z
+     1
+                    Type: OrderlyDifferentialPolynomial Fraction Integer
+
+Using these three operations, it is possible to reduce f modulo the 
+differential ideal generated by g.  The general scheme is to first 
+reduce the order, then reduce the degree in the leader.  First, eliminate 
+z.3 using the derivative of g.
+
+  g1 := D g
+       3               2  3
+    2z  z z  - w  + 3z  z
+      1  2 3    3     1  2
+                    Type: OrderlyDifferentialPolynomial Fraction Integer
+
+Find its leader.
+
+  lg1:= leader g1
+    z
+     3
+                    Type: OrderlyDifferentialVariable Symbol
+
+Differentiate f partially with respect to this leader.
+
+  pdf:=D(f, lg1)
+        2
+    - w
+       1
+                    Type: OrderlyDifferentialPolynomial Fraction Integer
+
+Compute the partial remainder of f with respect to g.
+
+  prf:=sg * f- pdf * g1
+       3         2        2  2  3
+    2z  z w  - w  w  + 3w  z  z
+      1  2 4    1  3     1  1  2
+                     Type: OrderlyDifferentialPolynomial Fraction Integer
+
+Note that high powers of lg still appear in prf.  Compute the leading 
+coefficient of prf as a polynomial in the leader of g.
+
+  lcf:=leadingCoefficient univariate(prf, lg)
+       2  2
+    3w  z
+      1  1
+                     Type: OrderlyDifferentialPolynomial Fraction Integer
+
+Finally, continue eliminating the high powers of lg appearing in prf to 
+obtain the (pseudo) remainder of f modulo g and its derivatives.
+
+  ig * prf - lcf * g * lg
+       6         2  3        2  2
+    2z  z w  - w  z  w  + 3w  z  w z
+      1  2 4    1  1  3     1  1  2 2
+                     Type: OrderlyDifferentialPolynomial Fraction Integer
+
+See Also:
+o )show OrderlyDifferentialPolynomial
+o $AXIOM/doc/src/algebra/dpolcat.spad.dvi
+
+@
 <<domain ODPOL OrderlyDifferentialPolynomial>>=
 )abbrev domain ODPOL OrderlyDifferentialPolynomial
 ++ Author:  William Sit
diff --git a/src/algebra/integer.spad.pamphlet b/src/algebra/integer.spad.pamphlet
index b5e56d2..16ac727 100644
--- a/src/algebra/integer.spad.pamphlet
+++ b/src/algebra/integer.spad.pamphlet
@@ -1443,54 +1443,247 @@ Note that this code is not included in the generated catdef.spad file.
 )set message test on
 )set message auto off
 )clear all
---S 1 of 5
+--S 1 of 15
+f := operator 'f
+--R 
+--R
+--R   (1)  f
+--R                                                          Type: BasicOperator
+--E 1
+
+--S 2 of 15
+D(f x,x,7)
+--R 
+--R
+--R         (vii)
+--R   (2)  f     (x)
+--R
+--R                                                     Type: Expression Integer
+--E 2
+
+--S 3 of 15
+a := roman(1978 - 1965)
+--R 
+--R
+--R   (3)  XIII
+--R                                                           Type: RomanNumeral
+--E 3
+
+--S 4 of 15
+x : UTS(ROMAN,'x,0) := x
+--R 
+--R
+--R   (4)  x
+--R                               Type: UnivariateTaylorSeries(RomanNumeral,x,0)
+--E 4
+
+--S 5 of 15
+recip(1 - x - x**2)
+--R 
+--R
+--R   (5)
+--R                 2        3      4         5         6        7          8
+--R     I + x + II x  + III x  + V x  + VIII x  + XIII x  + XXI x  + XXXIV x
+--R   + 
+--R         9           10      11
+--R     LV x  + LXXXIX x   + O(x  )
+--R                    Type: Union(UnivariateTaylorSeries(RomanNumeral,x,0),...)
+--E 5
+
+--S 6 of 15
+m : MATRIX FRAC ROMAN
+--R 
+--R                                                                   Type: Void
+--E 6
+
+--S 7 of 15
+m := matrix [ [1/(i + j) for i in 1..3] for j in 1..3]
+--R 
+--R
+--R        + I    I    I+
+--R        |--   ---  --|
+--R        |II   III  IV|
+--R        |            |
+--R        | I    I   I |
+--R   (7)  |---  --   - |
+--R        |III  IV   V |
+--R        |            |
+--R        | I    I    I|
+--R        |--    -   --|
+--R        +IV    V   VI+
+--R                                           Type: Matrix Fraction RomanNumeral
+--E 7
+
+--S 8 of 15
+inverse m
+--R 
+--R
+--R        +LXXII   - CCXL    CLXXX +
+--R        |                        |
+--R   (8)  |- CCXL    CM     - DCCXX|
+--R        |                        |
+--R        +CLXXX   - DCCXX    DC   +
+--R                                Type: Union(Matrix Fraction RomanNumeral,...)
+--E 8
+
+--S 9 of 15
+y := factorial 10
+--R 
+--R
+--R   (9)  3628800
+--R                                                        Type: PositiveInteger
+--E 9
+
+--S 10 of 15
+roman y
+--R 
+--R
+--R   (10)
+--R  ((((I))))((((I))))((((I)))) (((I)))(((I)))(((I)))(((I)))(((I)))(((I))) ((I))(
+--R  (I)) MMMMMMMMDCCC
+--R                                                           Type: RomanNumeral
+--E 10
+
+--S 11 of 15
 a := roman(78)
 --R 
 --R
---R   (1)  LXXVIII
+--R   (11)  LXXVIII
 --R                                                           Type: RomanNumeral
---E 1
+--E 11
 
---S 2 of 5
+--S 12 of 15
 b := roman(87)
 --R 
 --R
---R   (2)  LXXXVII
+--R   (12)  LXXXVII
 --R                                                           Type: RomanNumeral
---E 2
+--E 12
 
---S 3 of 5
+--S 13 of 15
 a + b 
 --R 
 --R
---R   (3)  CLXV
+--R   (13)  CLXV
 --R                                                           Type: RomanNumeral
---E 3
+--E 13
 
---S 4 of 5
+--S 14 of 15
 a * b
 --R 
 --R
---R   (4)  MMMMMMDCCLXXXVI
+--R   (14)  MMMMMMDCCLXXXVI
 --R                                                           Type: RomanNumeral
---E 4
+--E 14
 
---S 5 of 5
+--S 15 of 15
 b rem a 
 --R 
 --R
---R   (5)  IX
+--R   (15)  IX
 --R                                                           Type: RomanNumeral
---E 5
+--E 15
 )spool
 )lisp (bye)
 @
-
 <<RomanNumeral.help>>=
 ====================================================================
 RomanNumeral Examples
 ====================================================================
 
+The Roman numeral package was added to Axiom in MCMLXXXVI for use in
+denoting higher order derivatives.
+
+For example, let f be a symbolic operator.
+
+  f := operator 'f
+    f
+                                  Type: BasicOperator
+
+This is the seventh derivative of f with respect to x.
+  D(f x,x,7)
+     (vii)
+    f     (x)
+                                  Type: Expression Integer
+
+You can have integers printed as Roman numerals by declaring variables to
+be of type RomanNumeral (abbreviation ROMAN).
+
+  a := roman(1978 - 1965)
+    XIII
+                                  Type: RomanNumeral
+
+This package now has a small but devoted group of followers that claim
+this domain has shown its efficacy in many other contexts.  They claim
+that Roman numerals are every bit as useful as ordinary integers.
+
+In a sense, they are correct, because Roman numerals form a ring and you
+can therefore construct polynomials with Roman numeral coefficients,
+matrices over Roman numerals, etc..
+
+  x : UTS(ROMAN,'x,0) := x
+    x
+                              Type: UnivariateTaylorSeries(RomanNumeral,x,0)
+
+Was Fibonacci Italian or ROMAN?
+
+  recip(1 - x - x**2)
+                 2        3      4         5         6        7          8
+     I + x + II x  + III x  + V x  + VIII x  + XIII x  + XXI x  + XXXIV x
+   + 
+         9           10      11
+     LV x  + LXXXIX x   + O(x  )
+                    Type: Union(UnivariateTaylorSeries(RomanNumeral,x,0),...)
+
+You can also construct fractions with Roman numeral numerators and
+denominators, as this matrix Hilberticus illustrates.
+
+  m : MATRIX FRAC ROMAN
+                          Type: Void
+
+  m := matrix [ [1/(i + j) for i in 1..3] for j in 1..3]
+        + I    I    I+
+        |--   ---  --|
+        |II   III  IV|
+        |            |
+        | I    I   I |
+        |---  --   - |
+        |III  IV   V |
+        |            |
+        | I    I    I|
+        |--    -   --|
+        +IV    V   VI+
+                          Type: Matrix Fraction RomanNumeral
+
+Note that the inverse of the matrix has integral ROMAN entries.
+
+  inverse m
+        +LXXII   - CCXL    CLXXX +
+        |                        |
+        |- CCXL    CM     - DCCXX|
+        |                        |
+        +CLXXX   - DCCXX    DC   +
+                          Type: Union(Matrix Fraction RomanNumeral,...)
+
+Unfortunately, the spoil-sports say that the fun stops when the
+numbers get big---mostly because the Romans didn't establish
+conventions about representing very large numbers.
+
+  y := factorial 10
+    3628800
+                          Type: PositiveInteger
+
+You work it out!
+
+  roman y
+  ((((I))))((((I))))((((I)))) (((I)))(((I)))(((I)))(((I)))(((I)))(((I))) ((I))(
+  (I)) MMMMMMMMDCCC
+                           Type: RomanNumeral
+
+Issue the system command )show RomanNumeral to display the full
+list of operations defined by RomanNumeral.
+
+
   a := roman(78)
     LXXVIII
                       Type: RomanNumeral
diff --git a/src/algebra/multpoly.spad.pamphlet b/src/algebra/multpoly.spad.pamphlet
index 76a5624..68abc3c 100644
--- a/src/algebra/multpoly.spad.pamphlet
+++ b/src/algebra/multpoly.spad.pamphlet
@@ -10,6 +10,798 @@
 \tableofcontents
 \eject
 \section{domain POLY Polynomial}
+<<Polynomial.input>>=
+-- multpoly.spad.pamphlet Polynomial.input
+)spool Polynomial.output
+)set message test on
+)set message auto off
+--S 1 of 46
+x + 1
+--R 
+--R
+--R   (1)  x + 1
+--R                                                     Type: Polynomial Integer
+--E 1
+
+--S 2 of 46
+z - 2.3
+--R 
+--R
+--R   (2)  z - 2.3
+--R                                                       Type: Polynomial Float
+--E 2
+
+--S 3 of 46
+y**2 - z + 3/4
+--R 
+--R
+--R               2   3
+--R   (3)  - z + y  + -
+--R                   4
+--R                                            Type: Polynomial Fraction Integer
+--E 3
+
+--S 4 of 46
+y **2 + x*y + y
+--R 
+--R
+--R         2
+--R   (4)  y  + (x + 1)y
+--R                                                     Type: Polynomial Integer
+--E 4
+
+--S 5 of 46
+% :: DMP([y,x],INT)
+--R 
+--R
+--R         2
+--R   (5)  y  + y x + y
+--R                       Type: DistributedMultivariatePolynomial([y,x],Integer)
+--E 5
+
+--S 6 of 46
+p := (y-1)**2 * x * z
+--R 
+--R
+--R            2
+--R   (6)  (x y  - 2x y + x)z
+--R                                                     Type: Polynomial Integer
+--E 6
+
+--S 7 of 46
+q := (y-1) * x * (z+5)
+--R 
+--R
+--R   (7)  (x y - x)z + 5x y - 5x
+--R                                                     Type: Polynomial Integer
+--E 7
+
+--S 8 of 46
+factor(q)
+--R 
+--R
+--R   (8)  x(y - 1)(z + 5)
+--R                                            Type: Factored Polynomial Integer
+--E 8
+
+--S 9 of 46
+p - q**2
+--R 
+--R
+--R   (9)
+--R         2 2     2     2  2          2      2       2             2
+--R     (- x y  + 2x y - x )z  + ((- 10x  + x)y  + (20x  - 2x)y - 10x  + x)z
+--R   + 
+--R          2 2      2       2
+--R     - 25x y  + 50x y - 25x
+--R                                                     Type: Polynomial Integer
+--E 9
+
+--S 10 of 46
+gcd(p,q)
+--R 
+--R
+--R   (10)  x y - x
+--R                                                     Type: Polynomial Integer
+--E 10
+
+--S 11 of 46
+factor %
+--R 
+--R
+--R   (11)  x(y - 1)
+--R                                            Type: Factored Polynomial Integer
+--E 11
+
+--S 12 of 46
+lcm(p,q)
+--R 
+--R
+--R             2             2        2
+--R   (12)  (x y  - 2x y + x)z  + (5x y  - 10x y + 5x)z
+--R                                                     Type: Polynomial Integer
+--E 12
+
+--S 13 of 46
+content p
+--R 
+--R
+--R   (13)  1
+--R                                                        Type: PositiveInteger
+--E 13
+
+--S 14 of 46
+resultant(p,q,z)
+--R 
+--R
+--R           2 3      2 2      2      2
+--R   (14)  5x y  - 15x y  + 15x y - 5x
+--R                                                     Type: Polynomial Integer
+--E 14
+
+--S 15 of 46
+resultant(p,q,x)
+--R 
+--R
+--R   (15)  0
+--R                                                     Type: Polynomial Integer
+--E 15
+
+--S 16 of 46
+mainVariable p
+--R 
+--R
+--R   (16)  z
+--R                                                      Type: Union(Symbol,...)
+--E 16
+
+--S 17 of 46
+mainVariable(1 :: POLY INT)
+--R 
+--R
+--R   (17)  "failed"
+--R                                                    Type: Union("failed",...)
+--E 17
+
+--S 18 of 46
+ground? p
+--R 
+--R
+--R   (18)  false
+--R                                                                Type: Boolean
+--E 18
+
+--S 19 of 46
+ground?(1 :: POLY INT)
+--R 
+--R
+--R   (19)  true
+--R                                                                Type: Boolean
+--E 19
+
+--S 20 of 46
+variables p
+--R 
+--R
+--R   (20)  [z,y,x]
+--R                                                            Type: List Symbol
+--E 20
+
+--S 21 of 46
+degree(p,x)
+--R 
+--R
+--R   (21)  1
+--R                                                        Type: PositiveInteger
+--E 21
+
+--S 22 of 46
+degree(p,y)
+--R 
+--R
+--R   (22)  2
+--R                                                        Type: PositiveInteger
+--E 22
+
+--S 23 of 46
+degree(p,z)
+--R 
+--R
+--R   (23)  1
+--R                                                        Type: PositiveInteger
+--E 23
+
+--S 24 of 46
+degree(p,[x,y,z])
+--R 
+--R
+--R   (24)  [1,2,1]
+--R                                                Type: List NonNegativeInteger
+--E 24
+
+--S 25 of 46
+minimumDegree(p,z)
+--R 
+--R
+--R   (25)  1
+--R                                                        Type: PositiveInteger
+--E 25
+
+--S 26 of 46
+totalDegree p
+--R 
+--R
+--R   (26)  4
+--R                                                        Type: PositiveInteger
+--E 26
+
+--S 27 of 46
+leadingMonomial p
+--R 
+--R
+--R            2
+--R   (27)  x y z
+--R                                                     Type: Polynomial Integer
+--E 27
+
+--S 28 of 46
+reductum p
+--R 
+--R
+--R   (28)  (- 2x y + x)z
+--R                                                     Type: Polynomial Integer
+--E 28
+
+--S 29 of 46
+p - leadingMonomial p - reductum p
+--R 
+--R
+--R   (29)  0
+--R                                                     Type: Polynomial Integer
+--E 29
+
+--S 30 of 46
+leadingCoefficient p
+--R 
+--R
+--R   (30)  1
+--R                                                        Type: PositiveInteger
+--E 30
+
+--S 31 of 46
+p
+--R 
+--R
+--R             2
+--R   (31)  (x y  - 2x y + x)z
+--R                                                     Type: Polynomial Integer
+--E 31
+
+--S 32 of 46
+eval(p,x,w)
+--R 
+--R
+--R             2
+--R   (32)  (w y  - 2w y + w)z
+--R                                                     Type: Polynomial Integer
+--E 32
+
+--S 33 of 46
+eval(p,x,1)
+--R 
+--R
+--R           2
+--R   (33)  (y  - 2y + 1)z
+--R                                                     Type: Polynomial Integer
+--E 33
+
+--S 34 of 46
+eval(p,x,y^2 - 1)
+--R 
+--R
+--R           4     3
+--R   (34)  (y  - 2y  + 2y - 1)z
+--R                                                     Type: Polynomial Integer
+--E 34
+
+--S 35 of 46
+D(p,x)
+--R 
+--R
+--R           2
+--R   (35)  (y  - 2y + 1)z
+--R                                                     Type: Polynomial Integer
+--E 35
+
+--S 36 of 46
+D(p,y)
+--R 
+--R
+--R   (36)  (2x y - 2x)z
+--R                                                     Type: Polynomial Integer
+--E 36
+
+--S 37 of 46
+D(p,z)
+--R 
+--R
+--R            2
+--R   (37)  x y  - 2x y + x
+--R                                                     Type: Polynomial Integer
+--E 37
+
+--S 38 of 46
+integrate(p,y)
+--R 
+--R
+--R          1    3      2
+--R   (38)  (- x y  - x y  + x y)z
+--R          3
+--R                                            Type: Polynomial Fraction Integer
+--E 38
+
+--S 39 of 46
+qr := monicDivide(p,x+1,x)
+--R 
+--R
+--R                      2                           2
+--R   (39)  [quotient= (y  - 2y + 1)z,remainder= (- y  + 2y - 1)z]
+--R     Type: Record(quotient: Polynomial Integer,remainder: Polynomial Integer)
+--E 39
+
+--S 40 of 46
+qr.remainder
+--R 
+--R
+--R             2
+--R   (40)  (- y  + 2y - 1)z
+--R                                                     Type: Polynomial Integer
+--E 40
+
+--S 41 of 46
+p - ((x+1) * qr.quotient + qr.remainder)
+--R 
+--R
+--R   (41)  0
+--R                                                     Type: Polynomial Integer
+--E 41
+
+--S 42 of 46
+p/q
+--R 
+--R
+--R         (y - 1)z
+--R   (42)  --------
+--R           z + 5
+--R                                            Type: Fraction Polynomial Integer
+--E 42
+
+--S 43 of 46
+(2/3) * x**2 - y + 4/5 
+--R 
+--R
+--R               2  2   4
+--R   (43)  - y + - x  + -
+--R               3      5
+--R                                            Type: Polynomial Fraction Integer
+--E 43
+
+--S 44 of 46
+% :: FRAC POLY INT
+--R 
+--R
+--R                    2
+--R         - 15y + 10x  + 12
+--R   (44)  -----------------
+--R                 15
+--R                                            Type: Fraction Polynomial Integer
+--E 44
+
+--S 45 of 46
+% :: POLY FRAC INT
+--R 
+--R
+--R               2  2   4
+--R   (45)  - y + - x  + -
+--R               3      5
+--R                                            Type: Polynomial Fraction Integer
+--E 45
+
+--S 46 of 46
+map(numeric,%)
+--R 
+--R
+--R                                            2
+--R   (46)  - 1.0 y + 0.6666666666 6666666667 x  + 0.8
+--R                                                       Type: Polynomial Float
+--E 46
+)spool
+)lisp (bye)
+@
+<<Polynomial.help>>=
+====================================================================
+Polynomial examples
+====================================================================
+
+The domain constructor Polynomial (abbreviation: POLY) provides
+polynomials with an arbitrary number of unspecified variables.
+
+It is used to create the default polynomial domains in Axiom.  Here
+the coefficients are integers.
+
+  x + 1
+    x + 1
+                          Type: Polynomial Integer
+
+Here the coefficients have type Float.
+
+  z - 2.3
+    z - 2.3
+                           Type: Polynomial Float
+
+And here we have a polynomial in two variables with coefficients which
+have type Fraction Integer.
+
+  y**2 - z + 3/4
+           2   3
+    - z + y  + -
+               4
+                           Type: Polynomial Fraction Integer
+
+The representation of objects of domains created by Polynomial is that
+of recursive univariate polynomials. The term univariate means "one
+variable". The term multivariate means "possibly more than one variable".
+
+This recursive structure is sometimes obvious from the display of a polynomial.
+
+  y **2 + x*y + y
+     2
+    y  + (x + 1)y
+                           Type: Polynomial Integer
+
+In this example, you see that the polynomial is stored as a polynomial
+in y with coefficients that are polynomials in x with integer 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 DistributedMultivariatePolynomial and
+NewDistributedMultivariatePolynomial are stored and displayed in a
+non-recursive manner.
+
+You see a "flat" display of the above polynomial by converting to
+one of those types.
+
+  % :: DMP([y,x],INT)
+     2
+    y  + y x + y
+                   Type: DistributedMultivariatePolynomial([y,x],Integer)
+
+We will demonstrate many of the polynomial facilities by using two
+polynomials with integer coefficients.
+
+By default, the interpreter expands polynomial expressions, even if they
+are written in a factored format.
+
+  p := (y-1)**2 * x * z
+        2
+    (x y  - 2x y + x)z
+                   Type: Polynomial Integer
+
+See Factored to see how to create objects in factored form directly.
+
+  q := (y-1) * x * (z+5)
+    (x y - x)z + 5x y - 5x
+                   Type: Polynomial Integer
+
+The fully factored form can be recovered by using factor.
+
+  factor(q)
+    x(y - 1)(z + 5)
+                   Type: Factored Polynomial Integer
+
+This is the same name used for the operation to factor integers.  Such
+reuse of names is called overloading and makes it much easier to think
+of solving problems in general ways.  Axiom facilities for factoring
+polynomials created with Polynomial are currently restricted to the
+integer and rational number coefficient cases.
+
+The standard arithmetic operations are available for polynomials.
+
+  p - q**2
+         2 2     2     2  2          2      2       2             2
+     (- x y  + 2x y - x )z  + ((- 10x  + x)y  + (20x  - 2x)y - 10x  + x)z
+   + 
+          2 2      2       2
+     - 25x y  + 50x y - 25x
+                   Type: Polynomial Integer
+
+The operation gcd is used to compute the greatest common divisor of
+two polynomials.
+
+  gcd(p,q)
+    x y - x
+                   Type: Polynomial Integer
+
+In the case of p and q, the gcd is obvious from their definitions.  We
+factor the gcd to show this relationship better.
+
+  factor %
+    x(y - 1)
+                   Type: Factored Polynomial Integer
+
+The least common multiple is computed by using lcm.
+
+  lcm(p,q)
+        2             2        2
+    (x y  - 2x y + x)z  + (5x y  - 10x y + 5x)z
+                   Type: Polynomial Integer
+
+Use content to compute the greatest common divisor of the coefficients
+of the polynomial.
+
+  content p
+    1
+                   Type: PositiveInteger
+
+Many of the operations on polynomials require you to specify a variable.  
+For example, resultant requires you to give the variable in which the 
+polynomials should be expressed.
+
+This computes the resultant of the values of p and q, considering them 
+as polynomials in the variable z.  They do not share a root when thought 
+of as polynomials in z.
+
+  resultant(p,q,z)
+       2 3      2 2      2      2
+     5x y  - 15x y  + 15x y - 5x
+                   Type: Polynomial Integer
+
+This value is 0 because as polynomials in x the polynomials have a
+common root.
+
+  resultant(p,q,x)
+    0
+                   Type: Polynomial Integer
+
+The data type used for the variables created by Polynomial is Symbol.
+As mentioned above, the representation used by Polynomial is recursive
+and so there is a main variable for nonconstant polynomials.
+
+The operation mainVariable returns this variable.  The return type is 
+actually a union of Symbol and "failed".
+
+  mainVariable p
+    z
+                   Type: Union(Symbol,...)
+
+The latter branch of the union is be used if the polynomial has no
+variables, that is, is a constant.
+
+  mainVariable(1 :: POLY INT)
+    "failed"
+                   Type: Union("failed",...)
+
+You can also use the predicate ground? to test whether a polynomial is
+in fact a member of its ground ring.
+
+  ground? p
+    false
+                   Type: Boolean
+
+  ground?(1 :: POLY INT)
+    true
+                   Type: Boolean
+
+The complete list of variables actually used in a particular polynomial 
+is returned by variables.  For constant polynomials, this list is empty.
+
+  variables p
+    [z,y,x]
+                   Type: List Symbol
+
+The degree operation returns the degree of a polynomial in a specific variable.
+
+  degree(p,x)
+    1
+                   Type: PositiveInteger
+
+  degree(p,y)
+    2
+                   Type: PositiveInteger
+
+  degree(p,z)
+    1
+                   Type: PositiveInteger
+
+If you give a list of variables for the second argument, a list of the
+degrees in those variables is returned.
+
+  degree(p,[x,y,z])
+    [1,2,1]
+                   Type: List NonNegativeInteger
+
+The minimum degree of a variable in a polynomial is computed using 
+minimumDegree.
+
+  minimumDegree(p,z)
+    1
+                   Type: PositiveInteger
+
+The total degree of a polynomial is returned by totalDegree.
+
+  totalDegree p
+    4
+                   Type: PositiveInteger
+
+It is often convenient to think of a polynomial as a leading monomial plus
+the remaining terms.
+
+  leadingMonomial p
+        2
+     x y z
+                   Type: Polynomial Integer
+
+The reductum operation returns a polynomial consisting of the sum of
+the monomials after the first.
+
+  reductum p
+    (- 2x y + x)z
+                   Type: Polynomial Integer
+
+These have the obvious relationship that the original polynomial is
+equal to the leading monomial plus the reductum.
+
+  p - leadingMonomial p - reductum p
+    0
+                   Type: Polynomial Integer
+
+The value returned by leadingMonomial includes the coefficient of that term.  
+This is extracted by using leadingCoefficient on the original polynomial.
+
+  leadingCoefficient p
+    1
+                   Type: PositiveInteger
+
+The operation eval is used to substitute a value for a variable in a 
+polynomial.
+
+  p
+        2
+    (x y  - 2x y + x)z
+                   Type: Polynomial Integer
+
+This value may be another variable, a constant or a polynomial.
+
+  eval(p,x,w)
+        2
+    (w y  - 2w y + w)z
+                   Type: Polynomial Integer
+
+  eval(p,x,1)
+      2
+    (y  - 2y + 1)z
+                   Type: Polynomial Integer
+
+Actually, all the things being substituted are just polynomials,
+some more trivial than others.
+
+  eval(p,x,y^2 - 1)
+      4     3
+    (y  - 2y  + 2y - 1)z
+                   Type: Polynomial Integer
+
+Derivatives are computed using the D operation.
+
+  D(p,x)
+      2
+    (y  - 2y + 1)z
+                   Type: Polynomial Integer
+
+The first argument is the polynomial and the second is the variable.
+
+  D(p,y)
+    (2x y - 2x)z
+                   Type: Polynomial Integer
+
+Even if the polynomial has only one variable, you must specify it.
+
+  D(p,z)
+       2
+    x y  - 2x y + x
+                   Type: Polynomial Integer
+
+Integration of polynomials is similar and the integrate operation is used.
+
+Integration requires that the coefficients support division. Axiom
+converts polynomials over the integers to polynomials over the rational 
+numbers before integrating them.
+
+  integrate(p,y)
+     1    3      2
+    (- x y  - x y  + x y)z
+     3
+                  Type: Polynomial Fraction Integer
+
+It is not possible, in general, to divide two polynomials.  In our
+example using polynomials over the integers, the operation monicDivide
+divides a polynomial by a monic polynomial (that is, a polynomial with
+leading coefficient equal to 1).  The result is a record of the
+quotient and remainder of the division.
+
+You must specify the variable in which to express the polynomial.
+
+  qr := monicDivide(p,x+1,x)
+                 2                           2
+    [quotient= (y  - 2y + 1)z,remainder= (- y  + 2y - 1)z]
+     Type: Record(quotient: Polynomial Integer,remainder: Polynomial Integer)
+
+The selectors of the components of the record are quotient and remainder.  
+Issue this to extract the remainder.
+
+  qr.remainder
+        2
+    (- y  + 2y - 1)z
+                       Type: Polynomial Integer
+
+Now that we can extract the components, we can demonstrate the
+relationship among them and the arguments to our original expression
+qr := monicDivide(p,x+1,x).
+
+  p - ((x+1) * qr.quotient + qr.remainder)
+    0
+                       Type: Polynomial Integer
+
+If the / operator is used with polynomials, a fraction object is
+created.  In this example, the result is an object of type 
+Fraction Polynomial Integer.
+
+  p/q
+    (y - 1)z
+    --------
+      z + 5
+                       Type: Fraction Polynomial Integer
+
+If you use rational numbers as polynomial coefficients, the
+resulting object is of type Polynomial Fraction Integer.
+
+  (2/3) * x**2 - y + 4/5 
+          2  2   4
+    - y + - x  + -
+          3      5
+                       Type: Polynomial Fraction Integer
+
+This can be converted to a fraction of polynomials and back again, if
+required.
+
+  % :: FRAC POLY INT
+               2
+    - 15y + 10x  + 12
+    -----------------
+            15
+                       Type: Fraction Polynomial Integer
+
+  % :: POLY FRAC INT
+          2  2   4
+    - y + - x  + -
+          3      5
+                       Type: Polynomial Fraction Integer
+
+To convert the coefficients to floating point, map the numeric
+operation on the coefficients of the polynomial.
+
+  map(numeric,%)
+    - 1.0 y + 0.6666666666 6666666667 x  + 0.8
+                       Type: Polynomial Float
+
+See Also:
+o )help Factored
+o )help UnivariatePolynomial
+o )help MultivariatePolynomial
+o )help DistributedMultivariatePolynomial
+o )help NewDistributedMultivariatePolynomial
+o )show Polynomial
+o $AXIOM/doc/src/algebra/multpoly.spad.dvi
+
+@
 <<domain POLY Polynomial>>=
 )abbrev domain POLY Polynomial
 ++ Author: Dave Barton, Barry Trager
diff --git a/src/algebra/opalg.spad.pamphlet b/src/algebra/opalg.spad.pamphlet
index a03c8ce..8eab785 100644
--- a/src/algebra/opalg.spad.pamphlet
+++ b/src/algebra/opalg.spad.pamphlet
@@ -238,6 +238,392 @@ ModuleOperator(R: Ring, M:LeftModule(R)): Exports == Implementation where
 
 @
 \section{domain OP Operator}
+<<Operator.input>>=
+-- opalg.spad.pamphlet Operator.input
+)spool Operator.output
+)set message test on
+)set message auto off
+)clear all
+--S 1 of 21
+R := SQMATRIX(2, INT)
+--R 
+--R
+--R   (1)  SquareMatrix(2,Integer)
+--R                                                                 Type: Domain
+--E 1
+
+--S 2 of 21
+t := operator("tilde") :: OP(R)
+--R 
+--R
+--R   (2)  tilde
+--R                                       Type: Operator SquareMatrix(2,Integer)
+--E 2
+
+--S 3 of 21
+)set expose add constructor Operator
+--R 
+--R   Operator is now explicitly exposed in frame frame0 
+--E 3
+
+--S 4 of 21
+evaluate(t, m +-> transpose m)
+--R 
+--R
+--R   (3)  tilde
+--R                                       Type: Operator SquareMatrix(2,Integer)
+--E 4
+
+--S 5 of 21
+s : R := matrix [ [0, 1], [1, 0] ]
+--R 
+--R
+--R        +0  1+
+--R   (4)  |    |
+--R        +1  0+
+--R                                                Type: SquareMatrix(2,Integer)
+--E 5
+
+--S 6 of 21
+rho := t * s
+--R 
+--R
+--R             +0  1+
+--R   (5)  tilde|    |
+--R             +1  0+
+--R                                       Type: Operator SquareMatrix(2,Integer)
+--E 6
+
+--S 7 of 21
+z := rho**4 - 1
+--R 
+--R
+--R                   +0  1+     +0  1+     +0  1+     +0  1+
+--R   (6)  - 1 + tilde|    |tilde|    |tilde|    |tilde|    |
+--R                   +1  0+     +1  0+     +1  0+     +1  0+
+--R                                       Type: Operator SquareMatrix(2,Integer)
+--E 7
+
+--S 8 of 21
+m:R := matrix [ [1, 2], [3, 4] ]
+--R 
+--R
+--R        +1  2+
+--R   (7)  |    |
+--R        +3  4+
+--R                                                Type: SquareMatrix(2,Integer)
+--E 8
+
+--S 9 of 21
+z m
+--R 
+--R
+--R        +0  0+
+--R   (8)  |    |
+--R        +0  0+
+--R                                                Type: SquareMatrix(2,Integer)
+--E 9
+
+--S 10 of 21
+rho m
+--R 
+--R
+--R        +3  1+
+--R   (9)  |    |
+--R        +4  2+
+--R                                                Type: SquareMatrix(2,Integer)
+--E 10
+
+--S 11 of 21
+rho rho m
+--R 
+--R
+--R         +4  3+
+--R   (10)  |    |
+--R         +2  1+
+--R                                                Type: SquareMatrix(2,Integer)
+--E 11
+
+--S 12 of 21
+(rho^3) m
+--R 
+--R
+--R         +2  4+
+--R   (11)  |    |
+--R         +1  3+
+--R                                                Type: SquareMatrix(2,Integer)
+--E 12
+
+--S 13 of 21
+b := t * s - s * t
+--R 
+--R
+--R           +0  1+             +0  1+
+--R   (12)  - |    |tilde + tilde|    |
+--R           +1  0+             +1  0+
+--R                                       Type: Operator SquareMatrix(2,Integer)
+--E 13
+
+--S 14 of 21
+b m
+--R 
+--R
+--R         +1  - 3+
+--R   (13)  |      |
+--R         +3  - 1+
+--R                                                Type: SquareMatrix(2,Integer)
+--E 14
+
+--S 15 of 21
+L n ==
+  n = 0 => 1
+  n = 1 => x
+  (2*n-1)/n * x * L(n-1) - (n-1)/n * L(n-2)
+--R 
+--R                                                                   Type: Void
+--E 15
+
+--S 16 of 21
+dx := operator("D") :: OP(POLY FRAC INT)
+--R 
+--R
+--R   (15)  D
+--R                                   Type: Operator Polynomial Fraction Integer
+--E 16
+
+--S 17 of 21
+evaluate(dx, p +-> D(p, 'x))
+--R 
+--R
+--R   (16)  D
+--R                                   Type: Operator Polynomial Fraction Integer
+--E 17
+
+--S 18 of 21
+E n == (1 - x**2) * dx**2 - 2 * x * dx + n*(n+1)
+--R 
+--R                                                                   Type: Void
+--E 18
+
+--S 19 of 21
+L 15
+--R 
+--R   Compiling function L with type Integer -> Polynomial Fraction 
+--R      Integer 
+--R   Compiling function L as a recurrence relation.
+--R
+--R   (18)
+--R     9694845  15   35102025  13   50702925  11   37182145  9   14549535  7
+--R     ------- x   - -------- x   + -------- x   - -------- x  + -------- x
+--R       2048          2048           2048           2048          2048
+--R   + 
+--R       2909907  5   255255  3   6435
+--R     - ------- x  + ------ x  - ---- x
+--R         2048        2048       2048
+--R                                            Type: Polynomial Fraction Integer
+--E 19
+
+--S 20 of 21
+E 15
+--R 
+--R   Compiling function E with type PositiveInteger -> Operator 
+--R      Polynomial Fraction Integer 
+--R
+--R                        2      2
+--R   (19)  240 - 2x D - (x  - 1)D
+--R                                   Type: Operator Polynomial Fraction Integer
+--E 20
+
+--S 21 of 21
+(E 15)(L 15)
+--R 
+--R
+--R   (20)  0
+--R                                            Type: Polynomial Fraction Integer
+--E 21
+)spool
+)lisp (bye)
+@
+<<Operator.help>>=
+====================================================================
+Operator examples
+====================================================================
+
+Given any ring R, the ring of the Integer-linear operators over R is
+called Operator(R).  To create an operator over R, first create a
+basic operator using the operation operator, and then convert it to
+Operator(R) for the R you want.
+
+We choose R to be the two by two matrices over the integers.
+
+  R := SQMATRIX(2, INT)
+    SquareMatrix(2,Integer)
+                            Type: Domain
+
+Create the operator tilde on R.
+
+  t := operator("tilde") :: OP(R)
+    tilde
+                            Type: Operator SquareMatrix(2,Integer)
+
+Since Operator is unexposed we must either package-call operations
+from it, or expose it explicitly.  For convenience we will do the latter.
+
+Expose Operator.
+
+  )set expose add constructor Operator
+
+To attach an evaluation function (from R to R) to an operator over R,
+use evaluate(op, f) where op is an operator over R and f is a function
+R -> R.  This needs to be done only once when the operator is defined.
+Note that f must be Integer-linear (that is, f(ax+y) = a f(x) + f(y)
+for any integer a, and any x and y in R).
+
+We now attach the transpose map to the above operator t.
+
+  evaluate(t, m +-> transpose m)
+    tilde
+                       Type: Operator SquareMatrix(2,Integer)
+
+Operators can be manipulated formally as in any ring: + is the
+pointwise addition and * is composition.  Any element x of R can be
+converted to an operator op(x) over R, and the evaluation function of
+op(x) is left-multiplication by x.
+
+Multiplying on the left by this matrix swaps the two rows.
+
+  s : R := matrix [ [0, 1], [1, 0] ]
+        +0  1+
+        |    |
+        +1  0+
+                       Type: SquareMatrix(2,Integer)
+
+Can you guess what is the action of the following operator?
+
+  rho := t * s
+             +0  1+
+        tilde|    |
+             +1  0+
+                       Type: Operator SquareMatrix(2,Integer)
+
+Hint: applying rho four times gives the identity, so rho^4-1 should
+return 0 when applied to any two by two matrix.
+
+  z := rho**4 - 1
+                   +0  1+     +0  1+     +0  1+     +0  1+
+        - 1 + tilde|    |tilde|    |tilde|    |tilde|    |
+                   +1  0+     +1  0+     +1  0+     +1  0+
+                       Type: Operator SquareMatrix(2,Integer)
+
+Now check with this matrix.
+
+  m:R := matrix [ [1, 2], [3, 4] ]
+        +1  2+
+        |    |
+        +3  4+
+                       Type: SquareMatrix(2,Integer)
+
+  z m
+        +0  0+
+        |    |
+        +0  0+
+                       Type: SquareMatrix(2,Integer)
+
+As you have probably guessed by now, rho acts on matrices by rotating
+the elements clockwise.
+
+  rho m
+        +3  1+
+        |    |
+        +4  2+
+                       Type: SquareMatrix(2,Integer)
+
+  rho rho m
+         +4  3+
+         |    |
+         +2  1+
+                       Type: SquareMatrix(2,Integer)
+
+  (rho^3) m
+         +2  4+
+         |    |
+         +1  3+
+                       Type: SquareMatrix(2,Integer)
+
+Do the swapping of rows and transposition commute?  We can check by
+computing their bracket.
+
+  b := t * s - s * t
+           +0  1+             +0  1+
+         - |    |tilde + tilde|    |
+           +1  0+             +1  0+
+                       Type: Operator SquareMatrix(2,Integer)
+
+Now apply it to m.
+
+  b m
+         +1  - 3+
+         |      |
+         +3  - 1+
+                       Type: SquareMatrix(2,Integer)
+ 
+Next we demonstrate how to define a differential operator on a polynomial ring.
+
+This is the recursive definition of the n-th Legendre polynomial.
+
+  L n ==
+    n = 0 => 1
+    n = 1 => x
+    (2*n-1)/n * x * L(n-1) - (n-1)/n * L(n-2)
+                        Type: Void
+
+Create the differential operator d/dx on polynomials in x over the
+rational numbers.
+
+  dx := operator("D") :: OP(POLY FRAC INT)
+     D
+                        Type: Operator Polynomial Fraction Integer
+
+Now attach the map to it.
+
+  evaluate(dx, p +-> D(p, 'x))
+    D
+                        Type: Operator Polynomial Fraction Integer
+
+This is the differential equation satisfied by the n-th Legendre polynomial.
+
+  E n == (1 - x**2) * dx**2 - 2 * x * dx + n*(n+1)
+                        Type: Void
+
+Now we verify this for n = 15.  Here is the polynomial.
+
+  L 15
+     9694845  15   35102025  13   50702925  11   37182145  9   14549535  7
+     ------- x   - -------- x   + -------- x   - -------- x  + -------- x
+       2048          2048           2048           2048          2048
+   + 
+       2909907  5   255255  3   6435
+     - ------- x  + ------ x  - ---- x
+         2048        2048       2048
+                        Type: Polynomial Fraction Integer
+
+Here is the operator.
+
+  E 15
+    240 - 2x D - (x  - 1)D
+                        Type: Operator Polynomial Fraction Integer
+
+Here is the evaluation.
+
+  (E 15)(L 15)
+    0
+                        Type: Polynomial Fraction Integer
+
+See Also:
+o )show Operator
+o $AXIOM/doc/src/algebra/opalg.spad.dvi
+
+@
 <<domain OP Operator>>=
 )abbrev domain OP Operator
 ++ Author: Manuel Bronstein
diff --git a/src/algebra/perman.spad.pamphlet b/src/algebra/perman.spad.pamphlet
index bc2f63f..0e456a2 100644
--- a/src/algebra/perman.spad.pamphlet
+++ b/src/algebra/perman.spad.pamphlet
@@ -86,6 +86,83 @@ GrayCode: public == private where
 
 @
 \section{package PERMAN Permanent}
+<<Permanent.input>>=
+-- perman.spad.pamphlet Permanent.input
+)spool Permanent.output
+)set message test on
+)set message auto off
+)clear all
+--S 1 of 3
+kn n ==
+  r : MATRIX INT := new(n,n,1)
+  for i in 1..n repeat
+    r.i.i := 0
+  r
+--R 
+--R                                                                   Type: Void
+--E 1
+
+--S 2 of 3
+permanent(kn(5) :: SQMATRIX(5,INT))
+--R 
+--R   Compiling function kn with type PositiveInteger -> Matrix Integer 
+--R
+--R   (2)  44
+--R                                                        Type: PositiveInteger
+--E 2
+
+--S 3 of 3
+[permanent(kn(n) :: SQMATRIX(n,INT)) for n in 1..13]
+--R 
+--R   Cannot compile conversion for types involving local variables. In 
+--R      particular, could not compile the expression involving :: 
+--R      SQMATRIX(n,INT) 
+--R   AXIOM will attempt to step through and interpret the code.
+--R
+--R   (3)
+--R   [0,1,2,9,44,265,1854,14833,133496,1334961,14684570,176214841,2290792932]
+--R                                                Type: List NonNegativeInteger
+--E 3
+)spool
+)lisp (bye)
+@
+<<Permanent.help>>=
+====================================================================
+Permanent examples
+====================================================================
+
+The package Permanent provides the function permanent for square
+matrices.  The permanent of a square matrix can be computed in the
+same way as the determinant by expansion of minors except that for the
+permanent the sign for each element is 1, rather than being 1 if the
+row plus column indices is positive and -1 otherwise.  This function
+is much more difficult to compute efficiently than the determinant.
+An example of the use of permanent is the calculation of the n-th
+derangement number, defined to be the number of different possibilities 
+for n couples to dance but never with their own spouse.
+
+Consider an n by n matrix with entries 0 on the diagonal and 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.
+
+  kn n ==
+    r : MATRIX INT := new(n,n,1)
+    for i in 1..n repeat
+      r.i.i := 0
+    r
+
+Here are some derangement numbers, which you see grow quite fast.
+
+  permanent(kn(5) :: SQMATRIX(5,INT))
+
+  [permanent(kn(n) :: SQMATRIX(n,INT)) for n in 1..13]
+
+See Also:
+o )show Permanent
+o $AXIOM/doc/src/algebra/perman.spad.dvi
+
+@
 <<package PERMAN Permanent>>=
 )abbrev package PERMAN Permanent
 ++ Authors: Johannes Grabmeier, Oswald Gschnitzer
diff --git a/src/algebra/pfr.spad.pamphlet b/src/algebra/pfr.spad.pamphlet
index 8286147..ce53bf8 100644
--- a/src/algebra/pfr.spad.pamphlet
+++ b/src/algebra/pfr.spad.pamphlet
@@ -10,6 +10,279 @@
 \tableofcontents
 \eject
 \section{domain PFR PartialFraction}
+<<PartialFraction.input>>=
+-- pfr.spad.pamphlet PartialFraction.input
+)spool PartialFraction.output
+)set message test on
+)set message auto off
+)clear all
+--S 1 of 10
+partialFraction(1,factorial 10)
+--R 
+--R
+--R        159   23   12   1
+--R   (1)  --- - -- - -- + -
+--R          8    4    2   7
+--R         2    3    5
+--R                                                Type: PartialFraction Integer
+--E 1
+
+--S 2 of 10
+f := padicFraction(%)
+--R 
+--R
+--R        1    1    1    1    1    1    2    1    2   2    2   1
+--R   (2)  - + -- + -- + -- + -- + -- - -- - -- - -- - - - -- + -
+--R        2    4    5    6    7    8    2    3    4   5    2   7
+--R            2    2    2    2    2    3    3    3        5
+--R                                                Type: PartialFraction Integer
+--E 2
+
+--S 3 of 10
+compactFraction(f)
+--R 
+--R
+--R        159   23   12   1
+--R   (3)  --- - -- - -- + -
+--R          8    4    2   7
+--R         2    3    5
+--R                                                Type: PartialFraction Integer
+--E 3
+
+--S 4 of 10
+numberOfFractionalTerms(f)
+--R 
+--R
+--R   (4)  12
+--R                                                        Type: PositiveInteger
+--E 4
+
+--S 5 of 10
+nthFractionalTerm(f,3)
+--R 
+--R
+--R         1
+--R   (5)  --
+--R         5
+--R        2
+--R                                                Type: PartialFraction Integer
+--E 5
+
+--S 6 of 10
+partialFraction(1,- 13 + 14 * %i)
+--R 
+--R
+--R             1         4
+--R   (6)  - ------- + -------
+--R          1 + 2%i   3 + 8%i
+--R                                        Type: PartialFraction Complex Integer
+--E 6
+
+--S 7 of 10
+% :: Fraction Complex Integer
+--R 
+--R
+--R              %i
+--R   (7)  - ---------
+--R          14 + 13%i
+--R                                               Type: Fraction Complex Integer
+--E 7
+
+--S 8 of 10
+u : FR UP(x, FRAC INT) := reduce(*,[primeFactor(x+i,i) for i in 1..4])
+--R 
+--R
+--R                      2       3       4
+--R   (8)  (x + 1)(x + 2) (x + 3) (x + 4)
+--R                      Type: Factored UnivariatePolynomial(x,Fraction Integer)
+--E 8
+
+--S 9 of 10
+partialFraction(1,u)
+--R 
+--R
+--R   (9)
+--R     1     1      7     17  2         139   607  3   10115  2   391     44179
+--R    ---    - x + --   - -- x  - 12x - ---   --- x  + ----- x  + --- x + -----
+--R    648    4     16      8             8    324       432        4       324
+--R   ----- + -------- + ------------------- + ---------------------------------
+--R   x + 1          2                3                            4
+--R           (x + 2)          (x + 3)                      (x + 4)
+--R               Type: PartialFraction UnivariatePolynomial(x,Fraction Integer)
+--E 9
+
+--S 10 of 10
+padicFraction %
+--R 
+--R
+--R   (10)
+--R       1       1         1        17        3          1       607       403
+--R      ---      -        --        --        -          -       ---       ---
+--R      648      4        16         8        4          2       324       432
+--R     ----- + ----- - -------- - ----- + -------- - -------- + ----- + --------
+--R     x + 1   x + 2          2   x + 3          2          3   x + 4          2
+--R                     (x + 2)            (x + 3)    (x + 3)            (x + 4)
+--R   + 
+--R        13          1
+--R        --         --
+--R        36         12
+--R     -------- + --------
+--R            3          4
+--R     (x + 4)    (x + 4)
+--R               Type: PartialFraction UnivariatePolynomial(x,Fraction Integer)
+--E 10
+)spool
+)lisp (bye)
+@
+<<PartialFraction.help>>=
+====================================================================
+PartialFraction examples
+====================================================================
+
+A partial fraction is a decomposition of a quotient into a sum of
+quotients where the denominators of the summands are powers of
+primes. Most people first encounter partial fractions when they are
+learning integral calculus.  For a technical discussion of partial
+fractions, see, for example, Lang's Algebra. For example, the rational
+number 1/6 is decomposed into 1/2-1/3.  You can compute partial
+fractions of quotients of objects from domains belonging to the
+category EuclideanDomain.  For example, Integer, Complex Integer, and
+UnivariatePolynomial(x, Fraction Integer) all belong to EuclideanDomain.  
+In the examples following, we demonstrate how to decompose quotients of 
+each of these kinds of object into partial fractions.
+
+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 factor.  In these examples, it is not necessary to factor the
+denominators explicitly.
+
+The main operation for computing partial fractions is called partialFraction 
+and we use this to compute a decomposition of 1/10!. The first argument to
+partialFraction is the numerator of the quotient and the second argument is 
+the factored denominator.
+
+  partialFraction(1,factorial 10)
+    159   23   12   1
+    --- - -- - -- + -
+      8    4    2   7
+     2    3    5
+                           Type: PartialFraction Integer
+
+Since the denominators are powers of primes, it may be possible to
+expand the numerators further with respect to those primes. Use the
+operation padicFraction to do this.
+
+  f := padicFraction(%)
+    1    1    1    1    1    1    2    1    2   2    2   1
+    - + -- + -- + -- + -- + -- - -- - -- - -- - - - -- + -
+    2    4    5    6    7    8    2    3    4   5    2   7
+        2    2    2    2    2    3    3    3        5
+                           Type: PartialFraction Integer
+
+The operation compactFraction returns an expanded fraction into the usual 
+form. The compacted version is used internally for computational efficiency.
+
+  compactFraction(f)
+    159   23   12   1
+    --- - -- - -- + -
+      8    4    2   7
+     2    3    5
+                           Type: PartialFraction Integer
+
+You can add, subtract, multiply and divide partial fractions. In addition, 
+you can extract the parts of the decomposition. numberOfFractionalTerms 
+computes the number of terms in the fractional part. This does not include 
+the whole part of the fraction, which you get by calling wholePart.  In 
+this example, the whole part is just 0.
+
+  numberOfFractionalTerms(f)
+    12
+                           Type: PositiveInteger
+
+The operation nthFractionalTerm returns the individual terms in the
+decomposition.  Notice that the object returned is a partial fraction
+itself.  firstNumer and firstDenom extract the numerator and denominator 
+of the first term of the fraction.
+
+  nthFractionalTerm(f,3)
+      1
+     --
+      5
+     2
+                           Type: PartialFraction Integer
+
+Given two gaussian integers, you can decompose their quotient into a
+partial fraction.
+
+  partialFraction(1,- 13 + 14 * %i)
+         1         4
+    - ------- + -------
+      1 + 2%i   3 + 8%i
+                           Type: PartialFraction Complex Integer
+
+To convert back to a quotient, simply use a conversion.
+
+  % :: Fraction Complex Integer
+          %i
+    - ---------
+      14 + 13%i
+                           Type: Fraction Complex Integer
+
+To conclude this section, we compute the decomposition of
+
+                   1
+     -------------------------------
+                   2       3       4
+     (x + 1)(x + 2) (x + 3) (x + 4)
+
+
+The polynomials in this object have type 
+UnivariatePolynomial(x, Fraction Integer).
+
+We use the primeFactor operation to create the denominator in factored
+form directly.
+
+  u : FR UP(x, FRAC INT) := reduce(*,[primeFactor(x+i,i) for i in 1..4])
+                  2       3       4
+    (x + 1)(x + 2) (x + 3) (x + 4)
+                  Type: Factored UnivariatePolynomial(x,Fraction Integer)
+
+These are the compact and expanded partial fractions for the quotient.
+
+  partialFraction(1,u)
+     1     1      7     17  2         139   607  3   10115  2   391     44179
+    ---    - x + --   - -- x  - 12x - ---   --- x  + ----- x  + --- x + -----
+    648    4     16      8             8    324       432        4       324
+   ----- + -------- + ------------------- + ---------------------------------
+   x + 1          2                3                            4
+           (x + 2)          (x + 3)                      (x + 4)
+               Type: PartialFraction UnivariatePolynomial(x,Fraction Integer)
+
+  padicFraction %
+       1       1         1        17        3          1       607       403
+      ---      -        --        --        -          -       ---       ---
+      648      4        16         8        4          2       324       432
+     ----- + ----- - -------- - ----- + -------- - -------- + ----- + --------
+     x + 1   x + 2          2   x + 3          2          3   x + 4          2
+                     (x + 2)            (x + 3)    (x + 3)            (x + 4)
+   + 
+        13          1
+        --         --
+        36         12
+     -------- + --------
+            3          4
+     (x + 4)    (x + 4)
+               Type: PartialFraction UnivariatePolynomial(x,Fraction Integer)
+
+See Also:
+o )help Factored
+o )help Complex
+o )help FullPartialFractionExpansionXmpPage
+o )show PartialFraction
+o $AXIOM/doc/src/algebra/pfr.spad.dvi
+
+@
 <<domain PFR PartialFraction>>=
 )abbrev domain PFR PartialFraction
 ++ Author: Robert S. Sutor
diff --git a/src/algebra/quat.spad.pamphlet b/src/algebra/quat.spad.pamphlet
index ca56315..ebb8941 100644
--- a/src/algebra/quat.spad.pamphlet
+++ b/src/algebra/quat.spad.pamphlet
@@ -5233,6 +5233,245 @@ QuaternionCategory(R: CommutativeRing): Category ==
 
 @
 \section{domain QUAT Quaternion}
+<<Quaternion.input>>=
+-- quat.spad.pamphlet Quaternion.input
+)spool Quaternion.output
+)set message test on
+)set message auto off
+)clear all
+--S 1 of 13
+q := quatern(2/11,-8,3/4,1)
+--R 
+--R
+--R         2        3
+--R   (1)  -- - 8i + - j + k
+--R        11        4
+--R                                            Type: Quaternion Fraction Integer
+--E 1
+
+--S 2 of 13
+[real q, imagI q, imagJ q, imagK q]
+--R 
+--R
+--R          2     3
+--R   (2)  [--,- 8,-,1]
+--R         11     4
+--R                                                  Type: List Fraction Integer
+--E 2
+
+--S 3 of 13
+inv q
+--R 
+--R
+--R          352     15488      484       1936
+--R   (3)  ------ + ------ i - ----- j - ------ k
+--R        126993   126993     42331     126993
+--R                                            Type: Quaternion Fraction Integer
+--E 3
+
+--S 4 of 13
+q^6
+--R 
+--R
+--R          2029490709319345   48251690851     144755072553     48251690851
+--R   (4)  - ---------------- - ----------- i + ------------ j + ----------- k
+--R             7256313856        1288408         41229056         10307264
+--R                                            Type: Quaternion Fraction Integer
+--E 4
+
+--S 5 of 13
+r := quatern(-2,3,23/9,-89); q + r
+--R 
+--R
+--R          20        119
+--R   (5)  - -- - 5i + --- j - 88k
+--R          11         36
+--R                                            Type: Quaternion Fraction Integer
+--E 5
+
+--S 6 of 13
+q * r - r * q
+--R 
+--R
+--R          2495             817
+--R   (6)  - ---- i - 1418j - --- k
+--R           18               18
+--R                                            Type: Quaternion Fraction Integer
+--E 6
+
+--S 7 of 13
+i:=quatern(0,1,0,0) 
+--R 
+--R
+--R   (7)  i
+--R                                                     Type: Quaternion Integer
+--E 7
+
+--S 8 of 13
+j:=quatern(0,0,1,0) 
+--R 
+--R
+--R   (8)  j
+--R                                                     Type: Quaternion Integer
+--E 8
+
+--S 9 of 13
+k:=quatern(0,0,0,1)
+--R 
+--R
+--R   (9)  k
+--R                                                     Type: Quaternion Integer
+--E 9
+
+--S 10 of 13
+[i*i, j*j, k*k, i*j, j*k, k*i, q*i]
+--R 
+--R
+--R                                 2         3
+--R   (10)  [- 1,- 1,- 1,k,i,j,8 + -- i + j - - k]
+--R                                11         4
+--R                                       Type: List Quaternion Fraction Integer
+--E 10
+
+--S 11 of 13
+norm q
+--R 
+--R
+--R         126993
+--R   (11)  ------
+--R          1936
+--R                                                       Type: Fraction Integer
+--E 11
+
+--S 12 of 13
+conjugate q 
+--R 
+--R
+--R          2        3
+--R   (12)  -- + 8i - - j - k
+--R         11        4
+--R                                            Type: Quaternion Fraction Integer
+--E 12
+
+--S 13 of 13
+q * %
+--R 
+--R
+--R         126993
+--R   (13)  ------
+--R          1936
+--R                                            Type: Quaternion Fraction Integer
+--E 13
+)spool
+)lisp (bye)
+@
+<<Quaternion.help>>=
+====================================================================
+Quaternion examples
+====================================================================
+
+The domain constructor Quaternion implements quaternions over
+commutative rings.
+
+The basic operation for creating quaternions is quatern.  This is a
+quaternion over the rational numbers.
+
+  q := quatern(2/11,-8,3/4,1)
+     2        3
+    -- - 8i + - j + k
+    11        4
+                        Type: Quaternion Fraction Integer
+
+The four arguments are the real part, the i imaginary part, the j
+imaginary part, and the k imaginary part, respectively.
+
+  [real q, imagI q, imagJ q, imagK q]
+      2     3
+    [--,- 8,-,1]
+     11     4
+                        Type: List Fraction Integer
+
+Because q is over the rationals (and nonzero), you can invert it.
+
+  inv q
+      352     15488      484       1936
+    ------ + ------ i - ----- j - ------ k
+    126993   126993     42331     126993
+                        Type: Quaternion Fraction Integer
+
+The usual arithmetic (ring) operations are available
+
+  q^6
+      2029490709319345   48251690851     144755072553     48251690851
+    - ---------------- - ----------- i + ------------ j + ----------- k
+         7256313856        1288408         41229056         10307264
+                        Type: Quaternion Fraction Integer
+
+  r := quatern(-2,3,23/9,-89); q + r
+      20        119
+    - -- - 5i + --- j - 88k
+      11         36
+                        Type: Quaternion Fraction Integer
+
+In general, multiplication is not commutative.
+
+  q * r - r * q
+      2495             817
+    - ---- i - 1418j - --- k
+       18               18
+                         Type: Quaternion Fraction Integer
+
+There are no predefined constants for the imaginary i, j, and k parts,
+but you can easily define them.
+
+  i:=quatern(0,1,0,0) 
+    i
+                         Type: Quaternion Integer
+
+  j:=quatern(0,0,1,0) 
+    j
+                         Type: Quaternion Integer
+ 
+  k:=quatern(0,0,0,1)
+    k
+                         Type: Quaternion Integer
+
+These satisfy the normal identities.
+
+  [i*i, j*j, k*k, i*j, j*k, k*i, q*i]
+                             2         3
+     [- 1,- 1,- 1,k,i,j,8 + -- i + j - - k]
+                            11         4
+                          Type: List Quaternion Fraction Integer
+
+The norm is the quaternion times its conjugate.
+
+  norm q
+    126993
+    ------
+     1936
+                          Type: Fraction Integer
+
+  conjugate q 
+      2        3
+     -- + 8i - - j - k
+     11        4
+                          Type: Quaternion Fraction Integer
+
+  q * %
+     126993
+     ------
+      1936
+                          Type: Quaternion Fraction Integer
+
+See Also:
+o )help Octonion
+o )help Complex
+o )help CliffordAlgebra
+o )show Quaternion
+o $AXIOM/doc/src/algebra/quat.spad.dvi
+
+@
 <<domain QUAT Quaternion>>=
 )abbrev domain QUAT Quaternion
 ++ Author: Robert S. Sutor
diff --git a/src/algebra/radix.spad.pamphlet b/src/algebra/radix.spad.pamphlet
index 3e536be..98364b1 100644
--- a/src/algebra/radix.spad.pamphlet
+++ b/src/algebra/radix.spad.pamphlet
@@ -10,6 +10,286 @@
 \tableofcontents
 \eject
 \section{domain RADIX RadixExpansion}
+<<RadixExpansion.input>>=
+-- radix.spad.pamphlet RadixExpansion.input
+)spool RadixExpansion.output
+)set message test on
+)set message auto off
+)clear all
+--S 1 of 17
+111::RadixExpansion(5)
+--R 
+--R
+--R   (1)  421
+--R                                                       Type: RadixExpansion 5
+--E 1
+
+--S 2 of 17
+(5/24)::RadixExpansion(2)
+--R 
+--R
+--R             __
+--R   (2)  0.00110
+--R                                                       Type: RadixExpansion 2
+--E 2
+
+--S 3 of 17
+(5/24)::RadixExpansion(3)
+--R 
+--R
+--R           __
+--R   (3)  0.012
+--R                                                       Type: RadixExpansion 3
+--E 3
+
+--S 4 of 17
+(5/24)::RadixExpansion(8)
+--R 
+--R
+--R           __
+--R   (4)  0.152
+--R                                                       Type: RadixExpansion 8
+--E 4
+
+--S 5 of 17
+(5/24)::RadixExpansion(10)
+--R 
+--R
+--R             _
+--R   (5)  0.2083
+--R                                                      Type: RadixExpansion 10
+--E 5
+
+--S 6 of 17
+(5/24)::RadixExpansion(12)
+--R 
+--R
+--R   (6)  0.26
+--R                                                      Type: RadixExpansion 12
+--E 6
+
+--S 7 of 17
+(5/24)::RadixExpansion(16)
+--R 
+--R
+--R           _
+--R   (7)  0.35
+--R                                                      Type: RadixExpansion 16
+--E 7
+
+--S 8 of 17
+(5/24)::RadixExpansion(36)
+--R 
+--R
+--R   (8)  0.7I
+--R                                                      Type: RadixExpansion 36
+--E 8
+
+--S 9 of 17
+(5/24)::RadixExpansion(38)
+--R 
+--R
+--R                    _____
+--R   (9)  0 . 7 34 31 25 12
+--R                                                      Type: RadixExpansion 38
+--E 9
+
+--S 10 of 17
+a := (76543/210)::RadixExpansion(8)
+--R 
+--R
+--R              ____
+--R   (10)  554.37307
+--R                                                       Type: RadixExpansion 8
+--E 10
+
+--S 11 of 17
+w := wholeRagits a
+--R 
+--R
+--R   (11)  [5,5,4]
+--R                                                           Type: List Integer
+--E 11
+
+--S 12 of 17
+f0 := prefixRagits a
+--R 
+--R
+--R   (12)  [3]
+--R                                                           Type: List Integer
+--E 12
+
+--S 13 of 17
+f1 := cycleRagits a
+--R 
+--R
+--R   (13)  [7,3,0,7]
+--R                                                           Type: List Integer
+--E 13
+
+--S 14 of 17
+u:RadixExpansion(8):=wholeRadix(w)+fractRadix(f0,f1)
+--R 
+--R
+--R              ____
+--R   (14)  554.37307
+--R                                                       Type: RadixExpansion 8
+--E 14
+
+--S 15 of 17
+v: RadixExpansion(12) := fractRadix([1,2,3,11], [0])
+--R 
+--R
+--R               _
+--R   (15)  0.123B0
+--R                                                      Type: RadixExpansion 12
+--E 15
+
+--S 16 of 17
+fractRagits(u)
+--R 
+--R
+--R              _______
+--R   (16)  [3,7,3,0,7,7]
+--R                                                         Type: Stream Integer
+--E 16
+
+--S 17 of 17
+a :: Fraction(Integer)
+--R 
+--R
+--R         76543
+--R   (17)  -----
+--R          210
+--R                                                       Type: Fraction Integer
+--E 17
+)spool
+)lisp (bye)
+@
+<<RadixExpansion.help>>=
+====================================================================
+RadixExpansion examples
+====================================================================
+
+It possible to expand numbers in general bases.
+
+Here we expand 111 in base 5. This means
+  10^2+10^1+10^0 = 4 * 5^2+2 * 5^1 + 5^0
+
+  111::RadixExpansion(5)
+    421
+                              Type: RadixExpansion 5
+
+You can expand fractions to form repeating expansions.
+
+  (5/24)::RadixExpansion(2)
+         __
+    0.00110
+                              Type: RadixExpansion 2
+
+  (5/24)::RadixExpansion(3)
+       __
+    0.012
+                              Type: RadixExpansion 3
+
+  (5/24)::RadixExpansion(8)
+       __
+    0.152
+                              Type: RadixExpansion 8
+
+  (5/24)::RadixExpansion(10)
+         _
+    0.2083
+                              Type: RadixExpansion 10
+
+For bases from 11 to 36 the letters A through Z are used.
+
+  (5/24)::RadixExpansion(12)
+    0.26
+                              Type: RadixExpansion 12
+
+  (5/24)::RadixExpansion(16)
+       _
+    0.35
+                              Type: RadixExpansion 16
+
+  (5/24)::RadixExpansion(36)
+    0.7I
+                              Type: RadixExpansion 36
+
+For bases greater than 36, the ragits are separated by blanks.
+
+  (5/24)::RadixExpansion(38)
+                _____
+    0 . 7 34 31 25 12
+                              Type: RadixExpansion 38
+
+The RadixExpansion type provides operations to obtain the individual
+ragits.  Here is a rational number in base 8.
+
+  a := (76543/210)::RadixExpansion(8)
+          ____
+     554.37307
+                              Type: RadixExpansion 8
+
+The operation wholeRagits returns a list of the ragits for the
+integral part of the number.
+
+  w := wholeRagits a
+    [5,5,4]
+                              Type: List Integer
+
+The operations prefixRagits and cycleRagits return lists of the initial
+and repeating ragits in the fractional part of the number.
+
+  f0 := prefixRagits a
+    [3]
+                              Type: List Integer
+
+  f1 := cycleRagits a
+    [7,3,0,7]
+                              Type: List Integer
+
+You can construct any radix expansion by giving the whole, prefix and
+cycle parts.  The declaration is necessary to let Axiom know the base
+of the ragits.
+
+  u:RadixExpansion(8):=wholeRadix(w)+fractRadix(f0,f1)
+         ____
+    554.37307
+                              Type: RadixExpansion 8
+
+If there is no repeating part, then the list [0] should be used.
+
+  v: RadixExpansion(12) := fractRadix([1,2,3,11], [0])
+          _
+    0.123B0
+                              Type: RadixExpansion 12
+
+If you are not interested in the repeating nature of the expansion, an
+infinite stream of ragits can be obtained using fractRagits.
+
+  fractRagits(u)
+         _______
+    [3,7,3,0,7,7]
+                              Type: Stream Integer
+
+Of course, it's possible to recover the fraction representation:
+
+  a :: Fraction(Integer)
+    76543
+    -----
+     210
+                              Type: Fraction Integer
+
+See Also:
+o )help DecimalExpansion
+o )help BinaryExpansion
+o )help HexadecimalExpansion
+o )show RadixExpansion
+o $AXIOM/doc/src/algebra/radix.spad.dvi
+
+@
 <<domain RADIX RadixExpansion>>=
 )abbrev domain RADIX RadixExpansion
 ++ Author: Stephen M. Watt
diff --git a/src/algebra/reclos.spad.pamphlet b/src/algebra/reclos.spad.pamphlet
index b0400ad..85889cc 100644
--- a/src/algebra/reclos.spad.pamphlet
+++ b/src/algebra/reclos.spad.pamphlet
@@ -901,6 +901,1192 @@ 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.
 ordered field
+<<RealClosure.input>>=
+-- reclos.spad.pamphlet RealClosure.input
+)spool RealClosure.output
+)set message test on
+)set message auto off
+)clear all
+--S 1 of 67
+Ran := RECLOS(FRAC INT)
+--R 
+--R
+--R   (1)  RealClosure Fraction Integer
+--R                                                                 Type: Domain
+--E 1
+
+--S 2 of 67
+fourSquares(a:Ran,b:Ran,c:Ran,d:Ran):Ran==sqrt(a)+sqrt(b)-sqrt(c)-sqrt(d)
+--R 
+--R   Function declaration fourSquares : (RealClosure Fraction Integer,
+--R      RealClosure Fraction Integer,RealClosure Fraction Integer,
+--R      RealClosure Fraction Integer) -> RealClosure Fraction Integer has
+--R      been added to workspace.
+--R                                                                   Type: Void
+--E 2
+
+--S 3 of 67
+squareDiff1 := fourSquares(73,548,60,586)
+--R 
+--R   Compiling function fourSquares with type (RealClosure Fraction 
+--R      Integer,RealClosure Fraction Integer,RealClosure Fraction Integer
+--R      ,RealClosure Fraction Integer) -> RealClosure Fraction Integer 
+--R
+--R           +---+    +--+    +---+    +--+
+--R   (3)  - \|586  - \|60  + \|548  + \|73
+--R                                           Type: RealClosure Fraction Integer
+--E 3
+
+--S 4 of 67
+recip(squareDiff1)
+--R 
+--R
+--R   (4)
+--R             +---+          +--+  +--+         +--+ +---+            +---+
+--R     ((54602\|548  + 149602\|73 )\|60  + 49502\|73 \|548  + 9900895)\|586
+--R   + 
+--R             +--+ +---+             +--+            +---+            +--+
+--R     (154702\|73 \|548  + 30941947)\|60  + 10238421\|548  + 28051871\|73
+--R                                Type: Union(RealClosure Fraction Integer,...)
+--E 4
+
+--S 5 of 67
+sign(squareDiff1)
+--R 
+--R
+--R   (5)  1
+--R                                                        Type: PositiveInteger
+--E 5
+
+--S 6 of 67
+squareDiff2 := fourSquares(165,778,86,990)
+--R 
+--R
+--R           +---+    +--+    +---+    +---+
+--R   (6)  - \|990  - \|86  + \|778  + \|165
+--R                                           Type: RealClosure Fraction Integer
+--E 6
+
+--S 7 of 67
+recip(squareDiff2)
+--R 
+--R
+--R   (7)
+--R                +---+           +---+  +--+          +---+ +---+
+--R       ((556778\|778  + 1209010\|165 )\|86  + 401966\|165 \|778  + 144019431)
+--R    *
+--R        +---+
+--R       \|990
+--R   + 
+--R              +---+ +---+              +--+             +---+             +---+
+--R     (1363822\|165 \|778  + 488640503)\|86  + 162460913\|778  + 352774119\|165
+--R                                Type: Union(RealClosure Fraction Integer,...)
+--E 7
+
+--S 8 of 67
+sign(squareDiff2)
+--R 
+--R
+--R   (8)  1
+--R                                                        Type: PositiveInteger
+--E 8
+
+--S 9 of 67
+squareDiff3 := fourSquares(217,708,226,692)
+--R 
+--R
+--R           +---+    +---+    +---+    +---+
+--R   (9)  - \|692  - \|226  + \|708  + \|217
+--R                                           Type: RealClosure Fraction Integer
+--E 9
+
+--S 10 of 67
+recip(squareDiff3)
+--R 
+--R
+--R   (10)
+--R               +---+         +---+  +---+         +---+ +---+             +---+
+--R     ((- 34102\|708  - 61598\|217 )\|226  - 34802\|217 \|708  - 13641141)\|692
+--R   + 
+--R              +---+ +---+             +---+            +---+            +---+
+--R     (- 60898\|217 \|708  - 23869841)\|226  - 13486123\|708  - 24359809\|217
+--R                                Type: Union(RealClosure Fraction Integer,...)
+--E 10
+
+--S 11 of 67
+sign(squareDiff3)
+--R 
+--R
+--R   (11)  - 1
+--R                                                                Type: Integer
+--E 11
+
+--S 12 of 67
+squareDiff4 := fourSquares(155,836,162,820)
+--R 
+--R
+--R            +---+    +---+    +---+    +---+
+--R   (12)  - \|820  - \|162  + \|836  + \|155
+--R                                           Type: RealClosure Fraction Integer
+--E 12
+
+--S 13 of 67
+recip(squareDiff4)
+--R 
+--R
+--R   (13)
+--R               +---+         +---+  +---+         +---+ +---+             +---+
+--R     ((- 37078\|836  - 86110\|155 )\|162  - 37906\|155 \|836  - 13645107)\|820
+--R   + 
+--R              +---+ +---+             +---+            +---+            +---+
+--R     (- 85282\|155 \|836  - 30699151)\|162  - 13513901\|836  - 31384703\|155
+--R                                Type: Union(RealClosure Fraction Integer,...)
+--E 13
+
+--S 14 of 67
+sign(squareDiff4)
+--R 
+--R
+--R   (14)  - 1
+--R                                                                Type: Integer
+--E 14
+
+--S 15 of 67
+squareDiff5 := fourSquares(591,772,552,818)
+--R 
+--R
+--R            +---+    +---+    +---+    +---+
+--R   (15)  - \|818  - \|552  + \|772  + \|591
+--R                                           Type: RealClosure Fraction Integer
+--E 15
+
+--S 16 of 67
+recip(squareDiff5)
+--R 
+--R
+--R   (16)
+--R             +---+         +---+  +---+         +---+ +---+             +---+
+--R     ((70922\|772  + 81058\|591 )\|552  + 68542\|591 \|772  + 46297673)\|818
+--R   + 
+--R            +---+ +---+             +---+            +---+            +---+
+--R     (83438\|591 \|772  + 56359389)\|552  + 47657051\|772  + 54468081\|591
+--R                                Type: Union(RealClosure Fraction Integer,...)
+--E 16
+
+--S 17 of 67
+sign(squareDiff5)
+--R 
+--R
+--R   (17)  1
+--R                                                        Type: PositiveInteger
+--E 17
+
+--S 18 of 67
+squareDiff6 := fourSquares(434,1053,412,1088)
+--R 
+--R
+--R            +----+    +---+    +----+    +---+
+--R   (18)  - \|1088  - \|412  + \|1053  + \|434
+--R                                           Type: RealClosure Fraction Integer
+--E 18
+
+--S 19 of 67
+recip(squareDiff6)
+--R 
+--R
+--R   (19)
+--R                +----+          +---+  +---+          +---+ +----+
+--R       ((115442\|1053  + 179818\|434 )\|412  + 112478\|434 \|1053  + 76037291)
+--R    *
+--R        +----+
+--R       \|1088
+--R   + 
+--R           +---+ +----+              +---+            +----+             +---+
+--R   (182782\|434 \|1053  + 123564147)\|412  + 77290639\|1053  + 120391609\|434
+--R                                Type: Union(RealClosure Fraction Integer,...)
+--E 19
+
+--S 20 of 67
+sign(squareDiff6)
+--R 
+--R
+--R   (20)  1
+--R                                                        Type: PositiveInteger
+--E 20
+
+--S 21 of 67
+squareDiff7 := fourSquares(514,1049,446,1152)
+--R 
+--R
+--R            +----+    +---+    +----+    +---+
+--R   (21)  - \|1152  - \|446  + \|1049  + \|514
+--R                                           Type: RealClosure Fraction Integer
+--E 21
+
+--S 22 of 67
+recip(squareDiff7)
+--R 
+--R
+--R   (22)
+--R                +----+          +---+  +---+          +---+ +----+
+--R       ((349522\|1049  + 499322\|514 )\|446  + 325582\|514 \|1049  + 239072537)
+--R    *
+--R        +----+
+--R       \|1152
+--R   + 
+--R           +---+ +----+              +---+             +----+             +---+
+--R   (523262\|514 \|1049  + 384227549)\|446  + 250534873\|1049  + 357910443\|514
+--R                                Type: Union(RealClosure Fraction Integer,...)
+--E 22
+
+--S 23 of 67
+sign(squareDiff7)
+--R 
+--R
+--R   (23)  1
+--R                                                        Type: PositiveInteger
+--E 23
+
+--S 24 of 67
+squareDiff8 := fourSquares(190,1751,208,1698)
+--R 
+--R
+--R            +----+    +---+    +----+    +---+
+--R   (24)  - \|1698  - \|208  + \|1751  + \|190
+--R                                           Type: RealClosure Fraction Integer
+--E 24
+
+--S 25 of 67
+recip(squareDiff8)
+--R 
+--R
+--R   (25)
+--R                     +----+          +---+  +---+          +---+ +----+
+--R           (- 214702\|1751  - 651782\|190 )\|208  - 224642\|190 \|1751
+--R         + 
+--R           - 129571901
+--R    *
+--R        +----+
+--R       \|1698
+--R   + 
+--R               +---+ +----+              +---+             +----+
+--R     (- 641842\|190 \|1751  - 370209881)\|208  - 127595865\|1751
+--R   + 
+--R                 +---+
+--R     - 387349387\|190
+--R                                Type: Union(RealClosure Fraction Integer,...)
+--E 25
+
+--S 26 of 67
+sign(squareDiff8)
+--R 
+--R
+--R   (26)  - 1
+--R                                                                Type: Integer
+--E 26
+
+--S 27 of 67
+relativeApprox(squareDiff8,10**(-3))::Float
+--R 
+--R
+--R   (27)  - 0.2340527771 5937700123 E -10
+--R                                                                  Type: Float
+--E 27
+
+--S 28 of 67
+l := allRootsOf((x**2-2)**2-2)$Ran
+--R 
+--R
+--R   (28)  [%A33,%A34,%A35,%A36]
+--R                                      Type: List RealClosure Fraction Integer
+--E 28
+
+--S 29 of 67
+removeDuplicates map(mainDefiningPolynomial,l)
+--R 
+--R
+--R           4     2
+--R   (29)  [?  - 4?  + 2]
+--RType: List Union(SparseUnivariatePolynomial RealClosure Fraction Integer,"failed")
+--E 29
+
+--S 30 of 67
+map(mainCharacterization,l)
+--R 
+--R
+--R   (30)  [[- 2,- 1[,[- 1,0[,[0,1[,[1,2[]
+--RType: List Union(RightOpenIntervalRootCharacterization(RealClosure Fraction Integer,SparseUnivariatePolynomial RealClosure Fraction Integer),"failed")
+--E 30
+
+--S 31 of 67
+[reduce(+,l),reduce(*,l)-2]
+--R 
+--R
+--R   (31)  [0,0]
+--R                                      Type: List RealClosure Fraction Integer
+--E 31
+
+--S 32 of 67
+(s2, s5, s10) := (sqrt(2)$Ran, sqrt(5)$Ran, sqrt(10)$Ran)
+--R 
+--R
+--R          +--+
+--R   (32)  \|10
+--R                                           Type: RealClosure Fraction Integer
+--E 32
+
+--S 33 of 67
+eq1:=sqrt(s10+3)*sqrt(s5+2) - sqrt(s10-3)*sqrt(s5-2) = sqrt(10*s2+10)
+--R 
+--R
+--R            +---------+ +--------+    +---------+ +--------+   +-----------+
+--R            | +--+      | +-+         | +--+      | +-+        |   +-+
+--R   (33)  - \|\|10  - 3 \|\|5  - 2  + \|\|10  + 3 \|\|5  + 2 = \|10\|2  + 10
+--R                                  Type: Equation RealClosure Fraction Integer
+--E 33
+
+--S 34 of 67
+eq1::Boolean
+--R 
+--R
+--R   (34)  true
+--R                                                                Type: Boolean
+--E 34
+
+--S 35 of 67
+eq2:=sqrt(s5+2)*sqrt(s2+1) - sqrt(s5-2)*sqrt(s2-1) = sqrt(2*s10+2)
+--R 
+--R
+--R            +--------+ +--------+    +--------+ +--------+   +----------+
+--R            | +-+      | +-+         | +-+      | +-+        |  +--+
+--R   (35)  - \|\|5  - 2 \|\|2  - 1  + \|\|5  + 2 \|\|2  + 1 = \|2\|10  + 2
+--R                                  Type: Equation RealClosure Fraction Integer
+--E 35
+
+--S 36 of 67
+eq2::Boolean
+--R 
+--R
+--R   (36)  true
+--R                                                                Type: Boolean
+--E 36
+
+--S 37 of 67
+s3 := sqrt(3)$Ran
+--R 
+--R
+--R          +-+
+--R   (37)  \|3
+--R                                           Type: RealClosure Fraction Integer
+--E 37
+
+--S 38 of 67
+s7:= sqrt(7)$Ran
+--R 
+--R
+--R          +-+
+--R   (38)  \|7
+--R                                           Type: RealClosure Fraction Integer
+--E 38
+
+--S 39 of 67
+e1 := sqrt(2*s7-3*s3,3)
+--R 
+--R
+--R          +-------------+
+--R         3|  +-+     +-+
+--R   (39)  \|2\|7  - 3\|3
+--R                                           Type: RealClosure Fraction Integer
+--E 39
+
+--S 40 of 67
+e2 := sqrt(2*s7+3*s3,3)
+--R 
+--R
+--R          +-------------+
+--R         3|  +-+     +-+
+--R   (40)  \|2\|7  + 3\|3
+--R                                           Type: RealClosure Fraction Integer
+--E 40
+
+--S 41 of 67
+e2-e1-s3
+--R 
+--R
+--R   (41)  0
+--R                                           Type: RealClosure Fraction Integer
+--E 41
+
+--S 42 of 67
+pol : UP(x,Ran) := x**4+(7/3)*x**2+30*x-(100/3)
+--R 
+--R
+--R          4   7  2         100
+--R   (42)  x  + - x  + 30x - ---
+--R              3             3
+--R                   Type: UnivariatePolynomial(x,RealClosure Fraction Integer)
+--E 42
+
+--S 43 of 67
+r1 := sqrt(7633)$Ran
+--R 
+--R
+--R          +----+
+--R   (43)  \|7633
+--R                                           Type: RealClosure Fraction Integer
+--E 43
+
+--S 44 of 67
+alpha := sqrt(5*r1-436,3)/3
+--R 
+--R
+--R            +--------------+
+--R         1 3|  +----+
+--R   (44)  - \|5\|7633  - 436
+--R         3
+--R                                           Type: RealClosure Fraction Integer
+--E 44
+
+--S 45 of 67
+beta := -sqrt(5*r1+436,3)/3 
+--R 
+--R
+--R              +--------------+
+--R           1 3|  +----+
+--R   (45)  - - \|5\|7633  + 436
+--R           3
+--R                                           Type: RealClosure Fraction Integer
+--E 45
+
+--S 46 of 67
+pol.(alpha+beta-1/3)
+--R 
+--R
+--R   (46)  0
+--R                                           Type: RealClosure Fraction Integer
+--E 46
+
+--S 47 of 67
+qol : UP(x,Ran) := x**5+10*x**3+20*x+22
+--R 
+--R
+--R          5      3
+--R   (47)  x  + 10x  + 20x + 22
+--R                   Type: UnivariatePolynomial(x,RealClosure Fraction Integer)
+--E 47
+
+--S 48 of 67
+r2 := sqrt(153)$Ran
+--R 
+--R
+--R          +---+
+--R   (48)  \|153
+--R                                           Type: RealClosure Fraction Integer
+--E 48
+
+--S 49 of 67
+alpha2 := sqrt(r2-11,5)
+--R 
+--R
+--R          +-----------+
+--R         5| +---+
+--R   (49)  \|\|153  - 11
+--R                                           Type: RealClosure Fraction Integer
+--E 49
+
+--S 50 of 67
+beta2 := -sqrt(r2+11,5)
+--R 
+--R
+--R            +-----------+
+--R           5| +---+
+--R   (50)  - \|\|153  + 11
+--R                                           Type: RealClosure Fraction Integer
+--E 50
+
+--S 51 of 67
+qol(alpha2+beta2)
+--R 
+--R
+--R   (51)  0
+--R                                           Type: RealClosure Fraction Integer
+--E 51
+
+--S 52 of 67
+dst1:=sqrt(9+4*s2)=1+2*s2
+--R 
+--R
+--R          +---------+
+--R          |  +-+         +-+
+--R   (52)  \|4\|2  + 9 = 2\|2  + 1
+--R                                  Type: Equation RealClosure Fraction Integer
+--E 52
+
+--S 53 of 67
+dst1::Boolean
+--R 
+--R
+--R   (53)  true
+--R                                                                Type: Boolean
+--E 53
+
+--S 54 of 67
+s6:Ran:=sqrt 6
+--R 
+--R
+--R          +-+
+--R   (54)  \|6
+--R                                           Type: RealClosure Fraction Integer
+--E 54
+
+--S 55 of 67
+dst2:=sqrt(5+2*s6)+sqrt(5-2*s6) = 2*s3
+--R 
+--R
+--R          +-----------+    +---------+
+--R          |    +-+         |  +-+         +-+
+--R   (55)  \|- 2\|6  + 5  + \|2\|6  + 5 = 2\|3
+--R                                  Type: Equation RealClosure Fraction Integer
+--E 55
+
+--S 56 of 67
+dst2::Boolean
+--R 
+--R
+--R   (56)  true
+--R                                                                Type: Boolean
+--E 56
+
+--S 57 of 67
+s29:Ran:=sqrt 29
+--R 
+--R
+--R          +--+
+--R   (57)  \|29
+--R                                           Type: RealClosure Fraction Integer
+--E 57
+
+--S 58 of 67
+dst4:=sqrt(16-2*s29+2*sqrt(55-10*s29)) = sqrt(22+2*s5)-sqrt(11+2*s29)+s5
+--R 
+--R
+--R   (58)
+--R    +--------------------------------+
+--R    |  +--------------+                    +-----------+    +----------+
+--R    |  |     +--+           +--+           |  +--+          |  +-+          +-+
+--R   \|2\|- 10\|29  + 55  - 2\|29  + 16 = - \|2\|29  + 11  + \|2\|5  + 22  + \|5
+--R                                  Type: Equation RealClosure Fraction Integer
+--E 58
+
+--S 59 of 67
+dst4::Boolean
+--R 
+--R
+--R   (59)  true
+--R                                                                Type: Boolean
+--E 59
+
+--S 60 of 67
+dst6:=sqrt((112+70*s2)+(46+34*s2)*s5) = (5+4*s2)+(3+s2)*s5 
+--R 
+--R
+--R          +--------------------------------+
+--R          |    +-+       +-+      +-+           +-+      +-+     +-+
+--R   (60)  \|(34\|2  + 46)\|5  + 70\|2  + 112 = (\|2  + 3)\|5  + 4\|2  + 5
+--R                                  Type: Equation RealClosure Fraction Integer
+--E 60
+
+--S 61 of 67
+dst6::Boolean
+--R 
+--R
+--R   (61)  true
+--R                                                                Type: Boolean
+--E 61
+
+--S 62 of 67
+f3:Ran:=sqrt(3,5)
+--R 
+--R
+--R         5+-+
+--R   (62)  \|3
+--R                                           Type: RealClosure Fraction Integer
+--E 62
+
+--S 63 of 67
+f25:Ran:=sqrt(1/25,5)
+--R 
+--R
+--R          +--+
+--R          | 1
+--R   (63)  5|--
+--R         \|25
+--R                                           Type: RealClosure Fraction Integer
+--E 63
+
+--S 64 of 67
+f32:Ran:=sqrt(32/5,5)
+--R 
+--R
+--R          +--+
+--R          |32
+--R   (64)  5|--
+--R         \| 5
+--R                                           Type: RealClosure Fraction Integer
+--E 64
+
+--S 65 of 67
+f27:Ran:=sqrt(27/5,5)
+--R 
+--R
+--R          +--+
+--R          |27
+--R   (65)  5|--
+--R         \| 5
+--R                                           Type: RealClosure Fraction Integer
+--E 65
+
+--S 66 of 67
+dst5:=sqrt((f32-f27,3)) = f25*(1+f3-f3**2)
+--R 
+--R
+--R          +---------------+
+--R          |   +--+    +--+                         +--+
+--R          |   |27     |32       5+-+2   5+-+       | 1
+--R   (66)  3|- 5|--  + 5|--  = (- \|3   + \|3  + 1) 5|--
+--R         \|  \| 5    \| 5                         \|25
+--R                                  Type: Equation RealClosure Fraction Integer
+--E 66
+
+--S 67 of 67
+dst5::Boolean
+--R 
+--R
+--R   (67)  true
+--R                                                                Type: Boolean
+--E 67
+)spool
+)lisp (bye)
+@
+<<RealClosure.help>>=
+====================================================================
+RealClosure examples
+====================================================================
+
+The Real Closure 1.0 package provided by Renaud Rioboo consists of
+different packages, categories and domains :
+
+The package RealPolynomialUtilitiesPackage which needs a Field F and a 
+UnivariatePolynomialCategory domain with coefficients in F. It computes 
+some simple functions such as Sturm and Sylvester sequences sturmSequence,
+sylvesterSequence.
+
+The category RealRootCharacterizationCategory provides abstract
+functions to work with "real roots" of univariate polynomials. These
+resemble variables with some functionality needed to compute important
+operations.
+
+The category RealClosedField provides common operations available over
+real closed fiels. These include finding all the roots of a univariate
+polynomial, taking square (and higher) roots, ...
+
+The domain RightOpenIntervalRootCharacterization is the main code that
+provides the functionality of 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.
+
+The 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, 
+approximate or relative (relativeApprox).
+
+====================================================================
+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 sqrt(2) + sqrt(2) you have two new variables
+which happen to be equal. To avoid this name the expression such as in
+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.
+
+====================================================================
+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
+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''.
+
+====================================================================
+REFERENCES
+====================================================================
+
+
+[1]  R. Rioboo : Real Algebraic Closure of an ordered Field : Implementation 
+     in Axiom. 
+     In proceedings of the ISSAC'92 Conference, Berkeley 1992 pp. 206-215.
+
+[2]  Z. Ligatsikas, R. Rioboo, M. F. Roy : Generic computation of the real
+     closure of an ordered field.
+     In Mathematics and Computers in Simulation Volume 42, Issue 4-6,
+     November 1996.
+
+====================================================================
+EXAMPLES
+====================================================================
+
+We shall work with the real closure of the ordered field of 
+rational numbers.
+
+  Ran := RECLOS(FRAC INT)
+    RealClosure Fraction Integer
+                              Type: Domain
+
+Some simple signs for square roots, these correspond to an extension
+of degree 16 of the rational numbers. Examples provided by J. Abbot.
+
+  fourSquares(a:Ran,b:Ran,c:Ran,d:Ran):Ran==sqrt(a)+sqrt(b)-sqrt(c)-sqrt(d)
+                              Type: Void
+
+These produce values very close to zero.
+
+  squareDiff1 := fourSquares(73,548,60,586)
+       +---+    +--+    +---+    +--+
+    - \|586  - \|60  + \|548  + \|73
+                              Type: RealClosure Fraction Integer
+
+  recip(squareDiff1)
+             +---+          +--+  +--+         +--+ +---+            +---+
+     ((54602\|548  + 149602\|73 )\|60  + 49502\|73 \|548  + 9900895)\|586
+   + 
+             +--+ +---+             +--+            +---+            +--+
+     (154702\|73 \|548  + 30941947)\|60  + 10238421\|548  + 28051871\|73
+                              Type: Union(RealClosure Fraction Integer,...)
+
+  sign(squareDiff1)
+    1
+                              Type: PositiveInteger
+
+  squareDiff2 := fourSquares(165,778,86,990)
+       +---+    +--+    +---+    +---+
+    - \|990  - \|86  + \|778  + \|165
+                              Type: RealClosure Fraction Integer
+
+  recip(squareDiff2)
+                +---+           +---+  +--+          +---+ +---+
+       ((556778\|778  + 1209010\|165 )\|86  + 401966\|165 \|778  + 144019431)
+    *
+        +---+
+       \|990
+   + 
+              +---+ +---+              +--+             +---+             +---+
+     (1363822\|165 \|778  + 488640503)\|86  + 162460913\|778  + 352774119\|165
+                              Type: Union(RealClosure Fraction Integer,...)
+
+  sign(squareDiff2)
+    1
+                              Type: PositiveInteger
+
+  squareDiff3 := fourSquares(217,708,226,692)
+       +---+    +---+    +---+    +---+
+    - \|692  - \|226  + \|708  + \|217
+                              Type: RealClosure Fraction Integer
+
+  recip(squareDiff3)
+               +---+         +---+  +---+         +---+ +---+             +---+
+     ((- 34102\|708  - 61598\|217 )\|226  - 34802\|217 \|708  - 13641141)\|692
+   + 
+              +---+ +---+             +---+            +---+            +---+
+     (- 60898\|217 \|708  - 23869841)\|226  - 13486123\|708  - 24359809\|217
+                              Type: Union(RealClosure Fraction Integer,...)
+
+  sign(squareDiff3)
+    - 1
+                              Type: Integer
+
+  squareDiff4 := fourSquares(155,836,162,820)
+       +---+    +---+    +---+    +---+
+    - \|820  - \|162  + \|836  + \|155
+                              Type: RealClosure Fraction Integer
+
+  recip(squareDiff4)
+               +---+         +---+  +---+         +---+ +---+             +---+
+     ((- 37078\|836  - 86110\|155 )\|162  - 37906\|155 \|836  - 13645107)\|820
+   + 
+              +---+ +---+             +---+            +---+            +---+
+     (- 85282\|155 \|836  - 30699151)\|162  - 13513901\|836  - 31384703\|155
+                              Type: Union(RealClosure Fraction Integer,...)
+
+  sign(squareDiff4)
+    - 1
+                              Type: Integer
+
+  squareDiff5 := fourSquares(591,772,552,818)
+       +---+    +---+    +---+    +---+
+    - \|818  - \|552  + \|772  + \|591
+                              Type: RealClosure Fraction Integer
+
+  recip(squareDiff5)
+             +---+         +---+  +---+         +---+ +---+             +---+
+     ((70922\|772  + 81058\|591 )\|552  + 68542\|591 \|772  + 46297673)\|818
+   + 
+            +---+ +---+             +---+            +---+            +---+
+     (83438\|591 \|772  + 56359389)\|552  + 47657051\|772  + 54468081\|591
+                              Type: Union(RealClosure Fraction Integer,...)
+
+  sign(squareDiff5)
+    1
+                              Type: PositiveInteger
+
+  squareDiff6 := fourSquares(434,1053,412,1088)
+       +----+    +---+    +----+    +---+
+    - \|1088  - \|412  + \|1053  + \|434
+                              Type: RealClosure Fraction Integer
+
+  recip(squareDiff6)
+                +----+          +---+  +---+          +---+ +----+
+       ((115442\|1053  + 179818\|434 )\|412  + 112478\|434 \|1053  + 76037291)
+    *
+        +----+
+       \|1088
+   + 
+           +---+ +----+              +---+            +----+             +---+
+   (182782\|434 \|1053  + 123564147)\|412  + 77290639\|1053  + 120391609\|434
+                             Type: Union(RealClosure Fraction Integer,...)
+
+  sign(squareDiff6)
+    1
+                             Type: PositiveInteger
+
+  squareDiff7 := fourSquares(514,1049,446,1152)
+       +----+    +---+    +----+    +---+
+    - \|1152  - \|446  + \|1049  + \|514
+                             Type: RealClosure Fraction Integer
+
+  recip(squareDiff7)
+                +----+          +---+  +---+          +---+ +----+
+       ((349522\|1049  + 499322\|514 )\|446  + 325582\|514 \|1049  + 239072537)
+    *
+        +----+
+       \|1152
+   + 
+           +---+ +----+              +---+             +----+             +---+
+   (523262\|514 \|1049  + 384227549)\|446  + 250534873\|1049  + 357910443\|514
+                             Type: Union(RealClosure Fraction Integer,...)
+
+  sign(squareDiff7)
+    1
+                             Type: PositiveInteger
+
+  squareDiff8 := fourSquares(190,1751,208,1698)
+       +----+    +---+    +----+    +---+
+    - \|1698  - \|208  + \|1751  + \|190
+                             Type: RealClosure Fraction Integer
+
+  recip(squareDiff8)
+                     +----+          +---+  +---+          +---+ +----+
+           (- 214702\|1751  - 651782\|190 )\|208  - 224642\|190 \|1751
+         + 
+           - 129571901
+    *
+        +----+
+       \|1698
+   + 
+               +---+ +----+              +---+             +----+
+     (- 641842\|190 \|1751  - 370209881)\|208  - 127595865\|1751
+   + 
+                 +---+
+     - 387349387\|190
+                            Type: Union(RealClosure Fraction Integer,...)
+
+  sign(squareDiff8)
+    - 1
+                            Type: Integer
+
+This should give three digits of precision
+
+  relativeApprox(squareDiff8,10**(-3))::Float
+    - 0.2340527771 5937700123 E -10
+                            Type: Float
+
+The sum of these 4 roots is 0
+
+  l := allRootsOf((x**2-2)**2-2)$Ran
+    [%A33,%A34,%A35,%A36]
+                            Type: List RealClosure Fraction Integer
+
+Check that they are all roots of the same polynomial
+
+  removeDuplicates map(mainDefiningPolynomial,l)
+      4     2
+    [?  - 4?  + 2]
+       Type: List Union(
+                   SparseUnivariatePolynomial RealClosure Fraction Integer,
+                   "failed")
+
+We can see at a glance that they are separate roots
+
+  map(mainCharacterization,l)
+    [[- 2,- 1[,[- 1,0[,[0,1[,[1,2[]
+       Type: List Union(
+              RightOpenIntervalRootCharacterization(
+               RealClosure Fraction Integer,
+               SparseUnivariatePolynomial RealClosure Fraction Integer),
+              "failed")
+
+Check the sum and product
+
+  [reduce(+,l),reduce(*,l)-2]
+    [0,0]
+                    Type: List RealClosure Fraction Integer
+
+A more complicated test that involve an extension of degree 256.
+This is a way of checking nested radical identities.
+
+  (s2, s5, s10) := (sqrt(2)$Ran, sqrt(5)$Ran, sqrt(10)$Ran)
+     +--+
+    \|10
+                    Type: RealClosure Fraction Integer
+
+  eq1:=sqrt(s10+3)*sqrt(s5+2) - sqrt(s10-3)*sqrt(s5-2) = sqrt(10*s2+10)
+       +---------+ +--------+    +---------+ +--------+   +-----------+
+       | +--+      | +-+         | +--+      | +-+        |   +-+
+    - \|\|10  - 3 \|\|5  - 2  + \|\|10  + 3 \|\|5  + 2 = \|10\|2  + 10
+                    Type: Equation RealClosure Fraction Integer
+
+  eq1::Boolean
+    true
+                    Type: Boolean
+
+  eq2:=sqrt(s5+2)*sqrt(s2+1) - sqrt(s5-2)*sqrt(s2-1) = sqrt(2*s10+2)
+       +--------+ +--------+    +--------+ +--------+   +----------+
+       | +-+      | +-+         | +-+      | +-+        |  +--+
+    - \|\|5  - 2 \|\|2  - 1  + \|\|5  + 2 \|\|2  + 1 = \|2\|10  + 2
+                    Type: Equation RealClosure Fraction Integer
+
+  eq2::Boolean
+    true
+                    Type: Boolean
+
+Some more examples from J. M. Arnaudies
+
+  s3 := sqrt(3)$Ran
+     +-+
+    \|3
+                    Type: RealClosure Fraction Integer
+
+  s7:= sqrt(7)$Ran
+     +-+
+    \|7
+                    Type: RealClosure Fraction Integer
+
+  e1 := sqrt(2*s7-3*s3,3)
+     +-------------+
+    3|  +-+     +-+
+    \|2\|7  - 3\|3
+                    Type: RealClosure Fraction Integer
+
+  e2 := sqrt(2*s7+3*s3,3)
+     +-------------+
+    3|  +-+     +-+
+    \|2\|7  + 3\|3
+                    Type: RealClosure Fraction Integer
+
+This should be null
+
+  e2-e1-s3
+    0
+                    Type: RealClosure Fraction Integer
+
+A quartic polynomial
+
+  pol : UP(x,Ran) := x**4+(7/3)*x**2+30*x-(100/3)
+     4   7  2         100
+    x  + - x  + 30x - ---
+         3             3
+                  Type: UnivariatePolynomial(x,RealClosure Fraction Integer)
+
+Add some cubic roots
+
+  r1 := sqrt(7633)$Ran
+     +----+
+    \|7633
+                        Type: RealClosure Fraction Integer
+
+  alpha := sqrt(5*r1-436,3)/3
+       +--------------+
+    1 3|  +----+
+    - \|5\|7633  - 436
+    3
+                        Type: RealClosure Fraction Integer
+
+  beta := -sqrt(5*r1+436,3)/3 
+         +--------------+
+      1 3|  +----+
+    - - \|5\|7633  + 436
+      3
+                        Type: RealClosure Fraction Integer
+
+this should be null
+
+  pol.(alpha+beta-1/3)
+    0
+                        Type: RealClosure Fraction Integer
+
+A quintic polynomial
+
+  qol : UP(x,Ran) := x**5+10*x**3+20*x+22
+     5      3
+    x  + 10x  + 20x + 22
+              Type: UnivariatePolynomial(x,RealClosure Fraction Integer)
+
+Add some cubic roots
+
+  r2 := sqrt(153)$Ran
+     +---+
+    \|153
+                          Type: RealClosure Fraction Integer
+
+  alpha2 := sqrt(r2-11,5)
+     +-----------+
+    5| +---+
+    \|\|153  - 11
+                          Type: RealClosure Fraction Integer
+
+  beta2 := -sqrt(r2+11,5)
+       +-----------+
+      5| +---+
+    - \|\|153  + 11
+                          Type: RealClosure Fraction Integer
+
+this should be null
+
+  qol(alpha2+beta2)
+    0
+                          Type: RealClosure Fraction Integer
+
+Finally, some examples from the book Computer Algebra by Davenport,
+Siret and Tournier (page 77).  The last one is due to Ramanujan.
+
+  dst1:=sqrt(9+4*s2)=1+2*s2
+     +---------+
+     |  +-+         +-+
+    \|4\|2  + 9 = 2\|2  + 1
+                          Type: Equation RealClosure Fraction Integer
+
+  dst1::Boolean
+    true
+                          Type: Boolean
+
+  s6:Ran:=sqrt 6
+     +-+
+    \|6
+                          Type: RealClosure Fraction Integer
+
+  dst2:=sqrt(5+2*s6)+sqrt(5-2*s6) = 2*s3
+     +-----------+    +---------+
+     |    +-+         |  +-+         +-+
+    \|- 2\|6  + 5  + \|2\|6  + 5 = 2\|3
+                          Type: Equation RealClosure Fraction Integer
+
+  dst2::Boolean
+    true
+                          Type: Boolean
+
+  s29:Ran:=sqrt 29
+     +--+
+    \|29
+                          Type: RealClosure Fraction Integer
+
+  dst4:=sqrt(16-2*s29+2*sqrt(55-10*s29)) = sqrt(22+2*s5)-sqrt(11+2*s29)+s5
+    +--------------------------------+
+    |  +--------------+                    +-----------+    +----------+
+    |  |     +--+           +--+           |  +--+          |  +-+          +-+
+   \|2\|- 10\|29  + 55  - 2\|29  + 16 = - \|2\|29  + 11  + \|2\|5  + 22  + \|5
+                          Type: Equation RealClosure Fraction Integer
+
+  dst4::Boolean
+    true
+                          Type: Boolean
+
+  dst6:=sqrt((112+70*s2)+(46+34*s2)*s5) = (5+4*s2)+(3+s2)*s5 
+     +--------------------------------+
+     |    +-+       +-+      +-+           +-+      +-+     +-+
+    \|(34\|2  + 46)\|5  + 70\|2  + 112 = (\|2  + 3)\|5  + 4\|2  + 5
+                          Type: Equation RealClosure Fraction Integer
+
+  dst6::Boolean
+    true
+                          Type: Boolean
+
+  f3:Ran:=sqrt(3,5)
+    5+-+
+    \|3
+                          Type: RealClosure Fraction Integer
+
+  f25:Ran:=sqrt(1/25,5)
+     +--+
+     | 1
+    5|--
+    \|25
+                          Type: RealClosure Fraction Integer
+
+  f32:Ran:=sqrt(32/5,5)
+     +--+
+     |32
+    5|--
+    \| 5
+                          Type: RealClosure Fraction Integer
+
+  f27:Ran:=sqrt(27/5,5)
+     +--+
+     |27
+    5|--
+    \| 5
+                          Type: RealClosure Fraction Integer
+
+  dst5:=sqrt((f32-f27,3)) = f25*(1+f3-f3**2)
+     +---------------+
+     |   +--+    +--+                         +--+
+     |   |27     |32       5+-+2   5+-+       | 1
+    3|- 5|--  + 5|--  = (- \|3   + \|3  + 1) 5|--
+    \|  \| 5    \| 5                         \|25
+                          Type: Equation RealClosure Fraction Integer
+
+  dst5::Boolean
+    true
+                          Type: Boolean
+
+See Also:
+o )help RightOpenIntervalRootCharacterization
+o )help RealClosedField
+o )help RealRootCharacterizationCategory
+o )help UnivariatePolynomialCategory
+o )help Field
+o )help RealPolynomialUtilitiesPackage
+o )show RealClosure
+o $AXIOM/doc/src/algebra/reclos.spad.dvi
+
+@
 <<domain RECLOS RealClosure>>=
 )abbrev domain RECLOS RealClosure
 ++ Author: Renaud Rioboo
diff --git a/src/algebra/regset.spad.pamphlet b/src/algebra/regset.spad.pamphlet
index 99d0747..2a1e80c 100644
--- a/src/algebra/regset.spad.pamphlet
+++ b/src/algebra/regset.spad.pamphlet
@@ -1369,6 +1369,1376 @@ chains). Among them {\bf RegularTriangularSet} and
 by Marc Moreno Maza for computing triangular decompositions of polynomial
 systems. This method is refined in the package {\bf LazardSetSolvingPackage}
 in order to produce decompositions by means of Lazard triangular sets.
+<<RegularTriangularSet.input>>=
+-- regset.spad.pamphlet RegularTriangularSet.input
+)spool RegularTriangularSet.output
+)set message test on
+)set message auto off
+)clear all
+--S 1 of 34
+R := Integer
+--R 
+--R
+--R   (1)  Integer
+--R                                                                 Type: Domain
+--E 1
+
+--S 2 of 34
+ls : List Symbol := [x,y,z,t]
+--R 
+--R
+--R   (2)  [x,y,z,t]
+--R                                                            Type: List Symbol
+--E 2
+
+--S 3 of 34
+V := OVAR(ls)
+--R 
+--R
+--R   (3)  OrderedVariableList [x,y,z,t]
+--R                                                                 Type: Domain
+--E 3
+
+--S 4 of 34
+E := IndexedExponents V
+--R 
+--R
+--R   (4)  IndexedExponents OrderedVariableList [x,y,z,t]
+--R                                                                 Type: Domain
+--E 4
+
+--S 5 of 34
+P := NSMP(R, V)
+--R 
+--R
+--R   (5)  NewSparseMultivariatePolynomial(Integer,OrderedVariableList [x,y,z,t])
+--R                                                                 Type: Domain
+--E 5
+
+--S 6 of 34
+x: P := 'x
+--R 
+--R
+--R   (6)  x
+--R Type: NewSparseMultivariatePolynomial(Integer,OrderedVariableList [x,y,z,t])
+--E 6
+
+--S 7 of 34
+y: P := 'y
+--R 
+--R
+--R   (7)  y
+--R Type: NewSparseMultivariatePolynomial(Integer,OrderedVariableList [x,y,z,t])
+--E 7
+
+--S 8 of 34
+z: P := 'z
+--R 
+--R
+--R   (8)  z
+--R Type: NewSparseMultivariatePolynomial(Integer,OrderedVariableList [x,y,z,t])
+--E 8
+
+--S 9 of 34
+t: P := 't
+--R 
+--R
+--R   (9)  t
+--R Type: NewSparseMultivariatePolynomial(Integer,OrderedVariableList [x,y,z,t])
+--E 9
+
+--S 10 of 34
+T := REGSET(R,E,V,P)
+--R 
+--R
+--R   (10)
+--R  RegularTriangularSet(Integer,IndexedExponents OrderedVariableList [x,y,z,t],O
+--R  rderedVariableList [x,y,z,t],NewSparseMultivariatePolynomial(Integer,OrderedV
+--R  ariableList [x,y,z,t]))
+--R                                                                 Type: Domain
+--E 10
+
+--S 11 of 34
+p1 := x ** 31 - x ** 6 - x - y 
+--R 
+--R
+--R          31    6
+--R   (11)  x   - x  - x - y
+--R Type: NewSparseMultivariatePolynomial(Integer,OrderedVariableList [x,y,z,t])
+--E 11
+
+--S 12 of 34
+p2 := x ** 8  - z 
+--R 
+--R
+--R          8
+--R   (12)  x  - z
+--R Type: NewSparseMultivariatePolynomial(Integer,OrderedVariableList [x,y,z,t])
+--E 12
+
+--S 13 of 34
+p3 := x ** 10 - t 
+--R 
+--R
+--R          10
+--R   (13)  x   - t
+--R Type: NewSparseMultivariatePolynomial(Integer,OrderedVariableList [x,y,z,t])
+--E 13
+
+--S 14 of 34
+lp := [p1, p2, p3]
+--R 
+--R
+--R           31    6          8      10
+--R   (14)  [x   - x  - x - y,x  - z,x   - t]
+--RType: List NewSparseMultivariatePolynomial(Integer,OrderedVariableList [x,y,z,t])
+--E 14
+
+--S 15 of 34
+zeroSetSplit(lp)$T
+--R 
+--R
+--R            5    4      2     3     8     5    3    2   4                2
+--R   (15)  [{z  - t ,t z y  + 2z y - t  + 2t  + t  - t ,(t  - t)x - t y - z }]
+--RType: List RegularTriangularSet(Integer,IndexedExponents OrderedVariableList [x,y,z,t],OrderedVariableList [x,y,z,t],NewSparseMultivariatePolynomial(Integer,OrderedVariableList [x,y,z,t]))
+--E 15
+
+--S 16 of 34
+lts := zeroSetSplit(lp,false)$T
+--R 
+--R
+--R   (16)
+--R      5    4      2     3     8     5    3    2   4                2
+--R   [{z  - t ,t z y  + 2z y - t  + 2t  + t  - t ,(t  - t)x - t y - z },
+--R      3      5          2     3         2
+--R    {t  - 1,z  - t,t z y  + 2z y + 1,z x  - t}, {t,z,y,x}]
+--RType: List RegularTriangularSet(Integer,IndexedExponents OrderedVariableList [x,y,z,t],OrderedVariableList [x,y,z,t],NewSparseMultivariatePolynomial(Integer,OrderedVariableList [x,y,z,t]))
+--E 16
+
+--S 17 of 34
+[coHeight(ts) for ts in lts]
+--R 
+--R
+--R   (17)  [1,0,0]
+--R                                                Type: List NonNegativeInteger
+--E 17
+
+--S 18 of 34
+f1 := y**2*z+2*x*y*t-2*x-z
+--R 
+--R
+--R                          2
+--R   (18)  (2t y - 2)x + z y  - z
+--R Type: NewSparseMultivariatePolynomial(Integer,OrderedVariableList [x,y,z,t])
+--E 18
+
+--S 19 of 34
+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
+--R 
+--R
+--R              3              2        2              3      2
+--R   (19)  - z x  + (4t y + 4)x  + (4z y  + 4z)x + 2t y  - 10y  - 10t y + 2
+--R Type: NewSparseMultivariatePolynomial(Integer,OrderedVariableList [x,y,z,t])
+--E 19
+
+--S 20 of 34
+f3 :=  2*y*z*t+x*t**2-x-2*z 
+--R 
+--R
+--R           2
+--R   (20)  (t  - 1)x + 2t z y - 2z
+--R Type: NewSparseMultivariatePolynomial(Integer,OrderedVariableList [x,y,z,t])
+--E 20
+
+--S 21 of 34
+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
+--R 
+--R
+--R             3      2                2     3             2      2
+--R   (21)  (- z  + (4t  + 4)z)x + (4t z  + 2t  - 10t)y + 4z  - 10t  + 2
+--R Type: NewSparseMultivariatePolynomial(Integer,OrderedVariableList [x,y,z,t])
+--E 21
+
+--S 22 of 34
+lf := [f1, f2, f3, f4]
+--R 
+--R
+--R   (22)
+--R                     2
+--R   [(2t y - 2)x + z y  - z,
+--R         3              2        2              3      2
+--R    - z x  + (4t y + 4)x  + (4z y  + 4z)x + 2t y  - 10y  - 10t y + 2,
+--R      2
+--R    (t  - 1)x + 2t z y - 2z,
+--R        3      2                2     3             2      2
+--R    (- z  + (4t  + 4)z)x + (4t z  + 2t  - 10t)y + 4z  - 10t  + 2]
+--RType: List NewSparseMultivariatePolynomial(Integer,OrderedVariableList [x,y,z,t])
+--E 22
+
+--S 23 of 34
+zeroSetSplit(lf)$T
+--R 
+--R
+--R   (23)
+--R      2      8      6       2                 3            2
+--R   [{t  - 1,z  - 16z  + 256z  - 256,t y - 1,(z  - 8z)x - 8z  + 16},
+--R       2      2     2
+--R    {3t  + 1,z  - 7t  - 1,y + t,x + z},
+--R      8      6      2         3            2
+--R    {t  - 10t  + 10t  - 1,z,(t  - 5t)y - 5t  + 1,x},
+--R      2      2
+--R    {t  + 3,z  - 4,y + t,x - z}]
+--RType: List RegularTriangularSet(Integer,IndexedExponents OrderedVariableList [x,y,z,t],OrderedVariableList [x,y,z,t],NewSparseMultivariatePolynomial(Integer,OrderedVariableList [x,y,z,t]))
+--E 23
+
+--S 24 of 34
+lts2 := zeroSetSplit(lf,false)$T
+--R 
+--R
+--R   (24)
+--R      8      6      2         3            2
+--R   [{t  - 10t  + 10t  - 1,z,(t  - 5t)y - 5t  + 1,x},
+--R      2      8      6       2                 3            2
+--R    {t  - 1,z  - 16z  + 256z  - 256,t y - 1,(z  - 8z)x - 8z  + 16},
+--R       2      2     2                     2      2
+--R    {3t  + 1,z  - 7t  - 1,y + t,x + z}, {t  + 3,z  - 4,y + t,x - z}]
+--RType: List RegularTriangularSet(Integer,IndexedExponents OrderedVariableList [x,y,z,t],OrderedVariableList [x,y,z,t],NewSparseMultivariatePolynomial(Integer,OrderedVariableList [x,y,z,t]))
+--E 24
+
+--S 25 of 34
+[coHeight(ts) for ts in lts2]
+--R 
+--R
+--R   (25)  [0,0,0,0]
+--R                                                Type: List NonNegativeInteger
+--E 25
+
+--S 26 of 34
+degrees := [degree(ts) for ts in lts2]
+--R 
+--R
+--R   (26)  [8,16,4,4]
+--R                                                Type: List NonNegativeInteger
+--E 26
+
+--S 27 of 34
+reduce(+,degrees)
+--R 
+--R
+--R   (27)  32
+--R                                                        Type: PositiveInteger
+--E 27
+
+--S 28 of 34
+u : R := 2 
+--R 
+--R
+--R   (28)  2
+--R                                                                Type: Integer
+--E 28
+
+--S 29 of 34
+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
+--R 
+--R
+--R   (29)
+--R       2           2  2        2                            2           2
+--R     (y  - 2t y + t )x  + (- 2y  + ((2t + 4)z + 2t)y + (- 2t  + 2)z - 4t  - 2)x
+--R   + 
+--R      2                      2       2          2
+--R     y  + (- 2t z - 4t)y + (t  + 10)z  - 8z + 4t  + 2
+--R Type: NewSparseMultivariatePolynomial(Integer,OrderedVariableList [x,y,z,t])
+--E 29
+
+--S 30 of 34
+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
+--R 
+--R
+--R                                               2
+--R   (30)  (- 3z y + 2t z + t)x + (z + 4)y + 4t z  - 7t z
+--R Type: NewSparseMultivariatePolynomial(Integer,OrderedVariableList [x,y,z,t])
+--E 30
+
+--S 31 of 34
+q3 := -u**2*(z-1)**2+ 2*z*(z-x)-2*(x-1)
+--R 
+--R
+--R                         2
+--R   (31)  (- 2z - 2)x - 2z  + 8z - 2
+--R Type: NewSparseMultivariatePolynomial(Integer,OrderedVariableList [x,y,z,t])
+--E 31
+
+--S 32 of 34
+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)
+--R 
+--R
+--R   (32)
+--R        2     2      2        2                      2        2
+--R     (3y  - 3t  - 4)x  + (- 6y  + (12t z + 12t)y + 6t z)x + 3y  + (12t z - 12t)y
+--R   + 
+--R        2      2         2            2
+--R     (9t  + 4)z  + (- 24t  - 4)z + 12t  + 4
+--R Type: NewSparseMultivariatePolynomial(Integer,OrderedVariableList [x,y,z,t])
+--E 32
+
+--S 33 of 34
+lq := [q1, q2, q3, q4]
+--R 
+--R
+--R   (33)
+--R   [
+--R         2           2  2
+--R       (y  - 2t y + t )x
+--R     + 
+--R            2                            2           2          2
+--R       (- 2y  + ((2t + 4)z + 2t)y + (- 2t  + 2)z - 4t  - 2)x + y
+--R     + 
+--R                          2       2          2
+--R       (- 2t z - 4t)y + (t  + 10)z  - 8z + 4t  + 2
+--R     ,
+--R                                          2                         2
+--R    (- 3z y + 2t z + t)x + (z + 4)y + 4t z  - 7t z, (- 2z - 2)x - 2z  + 8z - 2,
+--R
+--R          2     2      2        2                      2        2
+--R       (3y  - 3t  - 4)x  + (- 6y  + (12t z + 12t)y + 6t z)x + 3y
+--R     + 
+--R                           2      2         2            2
+--R       (12t z - 12t)y + (9t  + 4)z  + (- 24t  - 4)z + 12t  + 4
+--R     ]
+--RType: List NewSparseMultivariatePolynomial(Integer,OrderedVariableList [x,y,z,t])
+--E 33
+
+--S 34 of 34
+zeroSetSplit(lq,true,true)$T
+--R 
+--R[1 <4,0> -> |4|; {0}]W[2 <5,0>,<3,1> -> |8|; {0}][2 <4,1>,<3,1> -> |7|; {0}][1 <3,1> -> |3|; {0}]G[2 <4,1>,<4,1> -> |8|; {0}]W[3 <5,1>,<4,1>,<3,2> -> |12|; {0}]GI[3 <4,2>,<4,1>,<3,2> -> |11|; {0}]GWw[3 <4,1>,<3,2>,<5,2> -> |12|; {0}][3 <3,2>,<3,2>,<5,2> -> |11|; {0}]GIwWWWw[4 <3,2>,<4,2>,<5,2>,<2,3> -> |14|; {0}][4 <2,2>,<4,2>,<5,2>,<2,3> -> |13|; {0}]Gwww[5 <3,2>,<3,2>,<4,2>,<5,2>,<2,3> -> |17|; {0}]Gwwwwww[8 <3,2>,<4,2>,<4,2>,<4,2>,<4,2>,<4,2>,<5,2>,<2,3> -> |30|; {0}]Gwwwwww[8 <4,2>,<4,2>,<4,2>,<4,2>,<4,2>,<4,2>,<5,2>,<2,3> -> |31|; {0}][8 <3,3>,<4,2>,<4,2>,<4,2>,<4,2>,<4,2>,<5,2>,<2,3> -> |30|; {0}][8 <2,3>,<4,2>,<4,2>,<4,2>,<4,2>,<4,2>,<5,2>,<2,3> -> |29|; {0}][8 <1,3>,<4,2>,<4,2>,<4,2>,<4,2>,<4,2>,<5,2>,<2,3> -> |28|; {0}][7 <4,2>,<4,2>,<4,2>,<4,2>,<4,2>,<5,2>,<2,3> -> |27|; {0}][6 <4,2>,<4,2>,<4,2>,<4,2>,<5,2>,<2,3> -> |23|; {0}][5 <4,2>,<4,2>,<4,2>,<5,2>,<2,3> -> |19|; {0}]GIGIWwww[6 <5,2>,<4,2>,<4,2>,<5,2>,<3,3>,<2,3> -> |23|; {0}][6 <4,3>,<4,2>,<4,2>,<5,2>,<3,3!
>,<2,3> -> |22|; {0}]GIGI[6 <3,4>,<4,2>,<4,2>,<5,2>,<3,3>,<2,3> -> |21|; {0}][6 <2,4>,<4,2>,<4,2>,<5,2>,<3,3>,<2,3> -> |20|; {0}]GGG[5 <4,2>,<4,2>,<5,2>,<3,3>,<2,3> -> |18|; {0}]GIGIWwwwW[6 <5,2>,<4,2>,<5,2>,<3,3>,<3,3>,<2,3> -> |22|; {0}][6 <4,3>,<4,2>,<5,2>,<3,3>,<3,3>,<2,3> -> |21|; {0}]GIwwWwWWWWWWWwWWWWwwwww[8 <4,2>,<5,2>,<3,3>,<3,3>,<4,3>,<2,3>,<3,4>,<3,4> -> |27|; {0}][8 <3,3>,<5,2>,<3,3>,<3,3>,<4,3>,<2,3>,<3,4>,<3,4> -> |26|; {0}][8 <2,3>,<5,2>,<3,3>,<3,3>,<4,3>,<2,3>,<3,4>,<3,4> -> |25|; {0}]Gwwwwwwwwwwwwwwwwwwww[9 <5,2>,<3,3>,<3,3>,<4,3>,<3,3>,<3,3>,<2,3>,<3,4>,<3,4> -> |29|; {0}]GI[9 <4,3>,<3,3>,<3,3>,<4,3>,<3,3>,<3,3>,<2,3>,<3,4>,<3,4> -> |28|; {0}][9 <3,3>,<3,3>,<3,3>,<4,3>,<3,3>,<3,3>,<2,3>,<3,4>,<3,4> -> |27|; {0}][9 <2,3>,<3,3>,<3,3>,<4,3>,<3,3>,<3,3>,<2,3>,<3,4>,<3,4> -> |26|; {0}]GGwwwwwwwwwwwwWWwwwwwwww[11 <3,3>,<3,3>,<3,3>,<3,3>,<4,3>,<2,3>,<3,3>,<3,3>,<3,3>,<3,4>,<3,4> -> |33|; {0}][11 <2,3>,<3,3>,<3,3>,<3,3>,<4,3>,<2,3>,<3,3>,<3,3>,<3,3>,<3,4>,<3,4> -> !
|32|; {0}][11 <1,3>,<3,3>,<3,3>,<3,3>,<4,3>,<2,3>,<3,3>,<3,3>!
,<3,3>,<3,4>,<3,4> -> |31|; {0}]GGGwwwwwwwwwwwww[12 <2,3>,<2,3>,<3,3>,<3,3>,<4,3>,<3,3>,<2,3>,<3,3>,<3,3>,<3,3>,<3,4>,<3,4> -> |34|; {0}]GGwwwwwwwwwwwww[13 <3,3>,<2,3>,<3,3>,<3,3>,<3,3>,<3,3>,<4,3>,<2,3>,<3,3>,<3,3>,<3,3>,<3,4>,<3,4> -> |38|; {0}]Gwwwwwwwwwwwww[13 <2,3>,<3,3>,<4,3>,<3,3>,<4,3>,<3,3>,<3,3>,<2,3>,<3,3>,<3,3>,<3,3>,<3,4>,<3,4> -> |39|; {0}]GGGwwwwwwwwwwwww[15 <3,3>,<4,3>,<3,3>,<3,3>,<3,3>,<3,3>,<3,3>,<3,3>,<4,3>,<2,3>,<3,3>,<3,3>,<3,3>,<3,4>,<3,4> -> |46|; {0}][14 <4,3>,<3,3>,<3,3>,<3,3>,<3,3>,<3,3>,<3,3>,<4,3>,<2,3>,<3,3>,<3,3>,<3,3>,<3,4>,<3,4> -> |43|; {0}]GIGGGGIGGI[14 <3,4>,<3,3>,<3,3>,<3,3>,<3,3>,<3,3>,<3,3>,<4,3>,<2,3>,<3,3>,<3,3>,<3,3>,<3,4>,<3,4> -> |42|; {0}]GGG[14 <2,4>,<3,3>,<3,3>,<3,3>,<3,3>,<3,3>,<3,3>,<4,3>,<2,3>,<3,3>,<3,3>,<3,3>,<3,4>,<3,4> -> |41|; {0}][14 <1,4>,<3,3>,<3,3>,<3,3>,<3,3>,<3,3>,<3,3>,<4,3>,<2,3>,<3,3>,<3,3>,<3,3>,<3,4>,<3,4> -> |40|; {0}]GGG[13 <3,3>,<3,3>,<3,3>,<3,3>,<3,3>,<3,3>,<4,3>,<2,3>,<3,3>,<3,3>,<3,3>,<3,4>,<3,4> -> |39|;!
 {0}]Gwwwwwwwwwwwww[15 <3,3>,<3,3>,<4,3>,<4,3>,<4,3>,<3,3>,<3,3>,<4,3>,<3,3>,<2,3>,<3,3>,<3,3>,<3,3>,<3,4>,<3,4> -> |48|; {0}]Gwwwwwwwwwwwww[15 <4,3>,<4,3>,<3,3>,<4,3>,<4,3>,<3,3>,<4,3>,<3,3>,<3,3>,<2,3>,<3,3>,<3,3>,<3,3>,<3,4>,<3,4> -> |49|; {0}]GIGI[15 <3,4>,<4,3>,<3,3>,<4,3>,<4,3>,<3,3>,<4,3>,<3,3>,<3,3>,<2,3>,<3,3>,<3,3>,<3,3>,<3,4>,<3,4> -> |48|; {0}]G[14 <4,3>,<3,3>,<4,3>,<4,3>,<3,3>,<4,3>,<3,3>,<3,3>,<2,3>,<3,3>,<3,3>,<3,3>,<3,4>,<3,4> -> |45|; {0}][13 <3,3>,<4,3>,<4,3>,<3,3>,<4,3>,<3,3>,<3,3>,<2,3>,<3,3>,<3,3>,<3,3>,<3,4>,<3,4> -> |41|; {0}]Gwwwwwwwwwwwww[13 <4,3>,<4,3>,<4,3>,<3,3>,<3,3>,<4,3>,<3,3>,<2,3>,<3,3>,<3,3>,<3,3>,<3,4>,<3,4> -> |42|; {0}]GIGGGGIGGI[13 <3,4>,<4,3>,<4,3>,<3,3>,<3,3>,<4,3>,<3,3>,<2,3>,<3,3>,<3,3>,<3,3>,<3,4>,<3,4> -> |41|; {0}]GGGGGGGG[13 <2,4>,<4,3>,<4,3>,<3,3>,<3,3>,<4,3>,<3,3>,<2,3>,<3,3>,<3,3>,<3,3>,<3,4>,<3,4> -> |40|; {0}][13 <1,4>,<4,3>,<4,3>,<3,3>,<3,3>,<4,3>,<3,3>,<2,3>,<3,3>,<3,3>,<3,3>,<3,4>,<3,4> -> |39|; {0}][13 <0,4>,<4,3>,<4,3>,!
<3,3>,<3,3>,<4,3>,<3,3>,<2,3>,<3,3>,<3,3>,<3,3>,<3,4>,<3,4> -!
> |38|; {0}][12 <4,3>,<4,3>,<3,3>,<3,3>,<4,3>,<3,3>,<2,3>,<3,3>,<3,3>,<3,3>,<3,4>,<3,4> -> |38|; {1}][11 <4,3>,<3,3>,<3,3>,<4,3>,<3,3>,<2,3>,<3,3>,<3,3>,<3,3>,<3,4>,<3,4> -> |34|; {1}][10 <3,3>,<3,3>,<4,3>,<3,3>,<2,3>,<3,3>,<3,3>,<3,3>,<3,4>,<3,4> -> |30|; {1}][10 <2,3>,<3,3>,<4,3>,<3,3>,<2,3>,<3,3>,<3,3>,<3,3>,<3,4>,<3,4> -> |29|; {1}]GGGwwwwwwwwwwwww[11 <3,3>,<3,3>,<4,3>,<3,3>,<3,3>,<2,3>,<3,3>,<3,3>,<3,3>,<3,4>,<3,4> -> |33|; {1}]GGGwwwwwwwwwwwww[12 <4,3>,<3,3>,<4,3>,<3,3>,<3,3>,<4,3>,<2,3>,<3,3>,<3,3>,<3,3>,<3,4>,<3,4> -> |38|; {1}]Gwwwwwwwwwwwww[12 <3,3>,<4,3>,<5,3>,<3,3>,<4,3>,<3,3>,<2,3>,<3,3>,<3,3>,<3,3>,<3,4>,<3,4> -> |39|; {1}]GGwwwwwwwwwwwww[13 <5,3>,<4,3>,<4,3>,<4,3>,<3,3>,<3,3>,<4,3>,<2,3>,<3,3>,<3,3>,<3,3>,<3,4>,<3,4> -> |44|; {1}]GIGGGGIGGIW[13 <4,4>,<4,3>,<4,3>,<4,3>,<3,3>,<3,3>,<4,3>,<2,3>,<3,3>,<3,3>,<3,3>,<3,4>,<3,4> -> |43|; {1}]GGW[13 <3,4>,<4,3>,<4,3>,<4,3>,<3,3>,<3,3>,<4,3>,<2,3>,<3,3>,<3,3>,<3,3>,<3,4>,<3,4> -> |42|; {1}]GGG[12 <4,3>,<4,3>,<4,3>,<3,3>!
,<3,3>,<4,3>,<2,3>,<3,3>,<3,3>,<3,3>,<3,4>,<3,4> -> |39|; {1}]Gwwwwwwwwwwwww[12 <4,3>,<4,3>,<5,3>,<3,3>,<4,3>,<3,3>,<2,3>,<3,3>,<3,3>,<3,3>,<3,4>,<3,4> -> |40|; {1}]Gwwwwwwwwwwwww[13 <5,3>,<5,3>,<4,3>,<5,3>,<3,3>,<3,3>,<4,3>,<2,3>,<3,3>,<3,3>,<3,3>,<3,4>,<3,4> -> |46|; {1}]GIGIW[13 <4,4>,<5,3>,<4,3>,<5,3>,<3,3>,<3,3>,<4,3>,<2,3>,<3,3>,<3,3>,<3,3>,<3,4>,<3,4> -> |45|; {1}][13 <3,4>,<5,3>,<4,3>,<5,3>,<3,3>,<3,3>,<4,3>,<2,3>,<3,3>,<3,3>,<3,3>,<3,4>,<3,4> -> |44|; {1}][13 <2,4>,<5,3>,<4,3>,<5,3>,<3,3>,<3,3>,<4,3>,<2,3>,<3,3>,<3,3>,<3,3>,<3,4>,<3,4> -> |43|; {1}]GG[12 <5,3>,<4,3>,<5,3>,<3,3>,<3,3>,<4,3>,<2,3>,<3,3>,<3,3>,<3,3>,<3,4>,<3,4> -> |41|; {1}]GIGGGGIGGIW[12 <4,4>,<4,3>,<5,3>,<3,3>,<3,3>,<4,3>,<2,3>,<3,3>,<3,3>,<3,3>,<3,4>,<3,4> -> |40|; {1}]GGGGGGW[12 <3,4>,<4,3>,<5,3>,<3,3>,<3,3>,<4,3>,<2,3>,<3,3>,<3,3>,<3,3>,<3,4>,<3,4> -> |39|; {1}][12 <2,4>,<4,3>,<5,3>,<3,3>,<3,3>,<4,3>,<2,3>,<3,3>,<3,3>,<3,3>,<3,4>,<3,4> -> |38|; {1}][12 <1,4>,<4,3>,<5,3>,<3,3>,<3,3>,<4,3>,<2,3>,<3,!
3>,<3,3>,<3,3>,<3,4>,<3,4> -> |37|; {1}]GGG[11 <4,3>,<5,3>,<3!
,3>,<3,3>,<4,3>,<2,3>,<3,3>,<3,3>,<3,3>,<3,4>,<3,4> -> |36|; {1}][10 <5,3>,<3,3>,<3,3>,<4,3>,<2,3>,<3,3>,<3,3>,<3,3>,<3,4>,<3,4> -> |32|; {1}][9 <3,3>,<3,3>,<4,3>,<2,3>,<3,3>,<3,3>,<3,3>,<3,4>,<3,4> -> |27|; {1}]W[9 <2,4>,<3,3>,<4,3>,<2,3>,<3,3>,<3,3>,<3,3>,<3,4>,<3,4> -> |26|; {1}][9 <1,4>,<3,3>,<4,3>,<2,3>,<3,3>,<3,3>,<3,3>,<3,4>,<3,4> -> |25|; {1}][8 <3,3>,<4,3>,<2,3>,<3,3>,<3,3>,<3,3>,<3,4>,<3,4> -> |24|; {1}]W[8 <2,4>,<4,3>,<2,3>,<3,3>,<3,3>,<3,3>,<3,4>,<3,4> -> |23|; {1}][8 <1,4>,<4,3>,<2,3>,<3,3>,<3,3>,<3,3>,<3,4>,<3,4> -> |22|; {1}][7 <4,3>,<2,3>,<3,3>,<3,3>,<3,3>,<3,4>,<3,4> -> |21|; {1}]w[7 <3,4>,<2,3>,<3,3>,<3,3>,<3,3>,<3,4>,<3,4> -> |20|; {1}][7 <2,4>,<2,3>,<3,3>,<3,3>,<3,3>,<3,4>,<3,4> -> |19|; {1}][7 <1,4>,<2,3>,<3,3>,<3,3>,<3,3>,<3,4>,<3,4> -> |18|; {1}][6 <2,3>,<3,3>,<3,3>,<3,3>,<3,4>,<3,4> -> |17|; {1}]GGwwwwww[7 <3,3>,<3,3>,<3,3>,<3,3>,<3,3>,<3,4>,<3,4> -> |21|; {1}]GIW[7 <2,4>,<3,3>,<3,3>,<3,3>,<3,3>,<3,4>,<3,4> -> |20|; {1}]GG[6 <3,3>,<3,3>,<3,3>,<3,3>,<3!
,4>,<3,4> -> |18|; {1}]Gwwwwww[7 <4,3>,<4,3>,<3,3>,<3,3>,<3,3>,<3,4>,<3,4> -> |23|; {1}]GIW[7 <3,4>,<4,3>,<3,3>,<3,3>,<3,3>,<3,4>,<3,4> -> |22|; {1}][6 <4,3>,<3,3>,<3,3>,<3,3>,<3,4>,<3,4> -> |19|; {1}]GIW[6 <3,4>,<3,3>,<3,3>,<3,3>,<3,4>,<3,4> -> |18|; {1}]GGW[6 <2,4>,<3,3>,<3,3>,<3,3>,<3,4>,<3,4> -> |17|; {1}][6 <1,4>,<3,3>,<3,3>,<3,3>,<3,4>,<3,4> -> |16|; {1}]GGG[5 <3,3>,<3,3>,<3,3>,<3,4>,<3,4> -> |15|; {1}]GIW[5 <2,4>,<3,3>,<3,3>,<3,4>,<3,4> -> |14|; {1}]GG[4 <3,3>,<3,3>,<3,4>,<3,4> -> |12|; {1}][3 <3,3>,<3,4>,<3,4> -> |9|; {1}]W[3 <2,4>,<3,4>,<3,4> -> |8|; {1}][3 <1,4>,<3,4>,<3,4> -> |7|; {1}]G[2 <3,4>,<3,4> -> |6|; {1}]G[1 <3,4> -> |3|; {1}][1 <2,4> -> |2|; {1}][1 <1,4> -> |1|; {1}]
+--R   *** QCMPACK Statistics ***
+--R      Table     size:  36
+--R      Entries reused:  255
+--R
+--R   *** REGSETGCD: Gcd Statistics ***
+--R      Table     size:  125
+--R      Entries reused:  0
+--R
+--R   *** REGSETGCD: Inv Set Statistics ***
+--R      Table     size:  30
+--R      Entries reused:  0
+--R
+--R   (34)
+--R   [
+--R     {
+--R                         24                   23                    22
+--R         960725655771966t   + 386820897948702t   + 8906817198608181t
+--R       + 
+--R                          21                     20                    19
+--R         2704966893949428t   + 37304033340228264t   + 7924782817170207t
+--R       + 
+--R                           18                     17                      16
+--R         93126799040354990t   + 13101273653130910t   + 156146250424711858t
+--R       + 
+--R                           15                      14                     13
+--R         16626490957259119t   + 190699288479805763t   + 24339173367625275t
+--R       + 
+--R                            12                     11                      10
+--R         180532313014960135t   + 35288089030975378t   + 135054975747656285t
+--R       + 
+--R                           9                     8                     7
+--R         34733736952488540t  + 75947600354493972t  + 19772555692457088t
+--R       + 
+--R                           6                    5                    4
+--R         28871558573755428t  + 5576152439081664t  + 6321711820352976t
+--R       + 
+--R                       3                   2
+--R       438314209312320t  + 581105748367008t  - 60254467992576t + 1449115951104
+--R       ,
+--R
+--R                                                                         23
+--R             26604210869491302385515265737052082361668474181372891857784t
+--R           + 
+--R                                                                          22
+--R             443104378424686086067294899528296664238693556855017735265295t
+--R           + 
+--R                                                                          21
+--R             279078393286701234679141342358988327155321305829547090310242t
+--R           + 
+--R                                                                           20
+--R             3390276361413232465107617176615543054620626391823613392185226t
+--R           + 
+--R                                                                          19
+--R             941478179503540575554198645220352803719793196473813837434129t
+--R           + 
+--R                                                                            18
+--R             11547855194679475242211696749673949352585747674184320988144390t
+--R           + 
+--R                                                                           17
+--R             1343609566765597789881701656699413216467215660333356417241432t
+--R           + 
+--R                                                                            16
+--R             23233813868147873503933551617175640859899102987800663566699334t
+--R           + 
+--R                                                                          15
+--R             869574020537672336950845440508790740850931336484983573386433t
+--R           + 
+--R                                                                            14
+--R             31561554305876934875419461486969926554241750065103460820476969t
+--R           + 
+--R                                                                           13
+--R             1271400990287717487442065952547731879554823889855386072264931t
+--R           + 
+--R                                                                            12
+--R             31945089913863736044802526964079540198337049550503295825160523t
+--R           + 
+--R                                                                           11
+--R             3738735704288144509871371560232845884439102270778010470931960t
+--R           + 
+--R                                                                            10
+--R             25293997512391412026144601435771131587561905532992045692885927t
+--R           + 
+--R                                                                           9
+--R             5210239009846067123469262799870052773410471135950175008046524t
+--R           + 
+--R                                                                            8
+--R             15083887986930297166259870568608270427403187606238713491129188t
+--R           + 
+--R                                                                           7
+--R             3522087234692930126383686270775779553481769125670839075109000t
+--R           + 
+--R                                                                           6
+--R             6079945200395681013086533792568886491101244247440034969288588t
+--R           + 
+--R                                                                           5
+--R             1090634852433900888199913756247986023196987723469934933603680t
+--R           + 
+--R                                                                           4
+--R             1405819430871907102294432537538335402102838994019667487458352t
+--R           + 
+--R                                                                         3
+--R             88071527950320450072536671265507748878347828884933605202432t
+--R           + 
+--R                                                                          2
+--R             135882489433640933229781177155977768016065765482378657129440t
+--R           + 
+--R             - 13957283442882262230559894607400314082516690749975646520320t
+--R           + 
+--R             334637692973189299277258325709308472592117112855749713920
+--R        *
+--R           z
+--R       + 
+--R                                                                    23
+--R         8567175484043952879756725964506833932149637101090521164936t
+--R       + 
+--R                                                                      22
+--R         149792392864201791845708374032728942498797519251667250945721t
+--R       + 
+--R                                                                     21
+--R         77258371783645822157410861582159764138123003074190374021550t
+--R       + 
+--R                                                                       20
+--R         1108862254126854214498918940708612211184560556764334742191654t
+--R       + 
+--R                                                                      19
+--R         213250494460678865219774480106826053783815789621501732672327t
+--R       + 
+--R                                                                       18
+--R         3668929075160666195729177894178343514501987898410131431699882t
+--R       + 
+--R                                                                      17
+--R         171388906471001872879490124368748236314765459039567820048872t
+--R       + 
+--R                                                                       16
+--R         7192430746914602166660233477331022483144921771645523139658986t
+--R       + 
+--R                                                                        15
+--R         - 128798674689690072812879965633090291959663143108437362453385t
+--R       + 
+--R                                                                       14
+--R         9553010858341425909306423132921134040856028790803526430270671t
+--R       + 
+--R                                                                       13
+--R         - 13296096245675492874538687646300437824658458709144441096603t
+--R       + 
+--R                                                                       12
+--R         9475806805814145326383085518325333106881690568644274964864413t
+--R       + 
+--R                                                                      11
+--R         803234687925133458861659855664084927606298794799856265539336t
+--R       + 
+--R                                                                       10
+--R         7338202759292865165994622349207516400662174302614595173333825t
+--R       + 
+--R                                                                       9
+--R         1308004628480367351164369613111971668880538855640917200187108t
+--R       + 
+--R                                                                       8
+--R         4268059455741255498880229598973705747098216067697754352634748t
+--R       + 
+--R                                                                      7
+--R         892893526858514095791318775904093300103045601514470613580600t
+--R       + 
+--R                                                                       6
+--R         1679152575460683956631925852181341501981598137465328797013652t
+--R       + 
+--R                                                                      5
+--R         269757415767922980378967154143357835544113158280591408043936t
+--R       + 
+--R                                                                      4
+--R         380951527864657529033580829801282724081345372680202920198224t
+--R       + 
+--R                                                                     3
+--R         19785545294228495032998826937601341132725035339452913286656t
+--R       + 
+--R                                                                     2
+--R         36477412057384782942366635303396637763303928174935079178528t
+--R       + 
+--R         - 3722212879279038648713080422224976273210890229485838670848t
+--R       + 
+--R         89079724853114348361230634484013862024728599906874105856
+--R       ,
+--R         3      2                  3       2
+--R      (3z  - 11z  + 8z + 4)y + 2t z  + 4t z  - 5t z - t,
+--R                  2
+--R      (z + 1)x + z  - 4z + 1}
+--R     ]
+--RType: List RegularTriangularSet(Integer,IndexedExponents OrderedVariableList [x,y,z,t],OrderedVariableList [x,y,z,t],NewSparseMultivariatePolynomial(Integer,OrderedVariableList [x,y,z,t]))
+--E 34
+)spool
+)lisp (bye)
+@
+<<RegularTriangularSet.help>>=
+====================================================================
+RegularTriangularSet examples
+====================================================================
+
+The 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 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 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 SquareFreeRegularTriangularSet 
+domain constructor or the LazardSetSolvingPackage package constructor.  
+See also the LexTriangularPackage and 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.  This allows
+to perform with multivariate polynomials the same kind of operations
+as one can do in an EuclideanDomain.
+
+The RegularTriangularSet constructor takes four arguments.  The first
+one, R, is the coefficient ring of the polynomials; it must belong to
+the category GcdDomain.  The second one, E, is the exponent monoid of
+the polynomials; it must belong to the category OrderedAbelianMonoidSup.  
+The third one, V, is the ordered set of variables; it must belong to the 
+category OrderedSet.  The last one is the polynomial ring; it must belong 
+to the category RecursivePolynomialCategory(R,E,V).  The abbreviation for
+RegularTriangularSet is REGSET.  See also the constructor RegularChain
+which only takes two arguments, the coefficient ring and the ordered
+set of variables; in that case, polynomials are necessarily built with
+the NewSparseMultivariatePolynomial domain constructor.
+
+We shall explain now how to use the constructor 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 REGSET constructor.
+
+Define the coefficient ring.
+
+  R := Integer
+    Integer
+                               Type: Domain
+
+Define the list of variables,
+
+  ls : List Symbol := [x,y,z,t]
+    [x,y,z,t]
+                               Type: List Symbol
+
+and make it an ordered set;
+
+  V := OVAR(ls)
+    OrderedVariableList [x,y,z,t]
+                               Type: Domain
+
+then define the exponent monoid.
+
+  E := IndexedExponents V
+    IndexedExponents OrderedVariableList [x,y,z,t]
+                               Type: Domain
+
+Define the polynomial ring.
+
+  P := NSMP(R, V)
+    NewSparseMultivariatePolynomial(Integer,OrderedVariableList [x,y,z,t])
+                               Type: Domain
+
+Let the variables be polynomial.
+
+  x: P := 'x
+    x
+             Type: NewSparseMultivariatePolynomial(Integer,
+                                   OrderedVariableList [x,y,z,t])
+  y: P := 'y
+    y
+             Type: NewSparseMultivariatePolynomial(Integer,
+                                   OrderedVariableList [x,y,z,t])
+
+  z: P := 'z
+    z
+             Type: NewSparseMultivariatePolynomial(Integer,
+                                   OrderedVariableList [x,y,z,t])
+
+  t: P := 't
+   t
+             Type: NewSparseMultivariatePolynomial(Integer,
+                                   OrderedVariableList [x,y,z,t])
+
+Now call the RegularTriangularSet domain constructor.
+
+  T := REGSET(R,E,V,P)
+  RegularTriangularSet(Integer,IndexedExponents OrderedVariableList [x,y,z,t],O
+  rderedVariableList [x,y,z,t],NewSparseMultivariatePolynomial(Integer,OrderedV
+  ariableList [x,y,z,t]))
+                               Type: Domain
+
+Define a polynomial system.
+
+  p1 := x ** 31 - x ** 6 - x - y 
+      31    6
+     x   - x  - x - y
+             Type: NewSparseMultivariatePolynomial(Integer,
+                                   OrderedVariableList [x,y,z,t])
+
+  p2 := x ** 8  - z 
+     8
+    x  - z
+             Type: NewSparseMultivariatePolynomial(Integer,
+                                   OrderedVariableList [x,y,z,t])
+
+  p3 := x ** 10 - t 
+     10
+    x   - t
+             Type: NewSparseMultivariatePolynomial(Integer,
+                                   OrderedVariableList [x,y,z,t])
+
+  lp := [p1, p2, p3]
+      31    6          8      10
+    [x   - x  - x - y,x  - z,x   - t]
+             Type: List NewSparseMultivariatePolynomial(Integer,
+                                       OrderedVariableList [x,y,z,t])
+
+First of all, let us solve this system in the sense of Kalkbrener.
+
+  zeroSetSplit(lp)$T
+       5    4      2     3     8     5    3    2   4                2
+    [{z  - t ,t z y  + 2z y - t  + 2t  + t  - t ,(t  - t)x - t y - z }]
+        Type: List RegularTriangularSet(Integer,
+                    IndexedExponents OrderedVariableList [x,y,z,t],
+                    OrderedVariableList [x,y,z,t],
+                    NewSparseMultivariatePolynomial(Integer,
+                        OrderedVariableList [x,y,z,t]))
+
+And now in the sense of Lazard (or Wu and other authors).
+
+  lts := zeroSetSplit(lp,false)$T
+      5    4      2     3     8     5    3    2   4                2
+   [{z  - t ,t z y  + 2z y - t  + 2t  + t  - t ,(t  - t)x - t y - z },
+      3      5          2     3         2
+    {t  - 1,z  - t,t z y  + 2z y + 1,z x  - t}, {t,z,y,x}]
+        Type: List RegularTriangularSet(Integer,
+                    IndexedExponents OrderedVariableList [x,y,z,t],
+                    OrderedVariableList [x,y,z,t],
+                    NewSparseMultivariatePolynomial(Integer,
+                        OrderedVariableList [x,y,z,t]))
+
+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 
+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 y and its initial
+(i.e. its leading coefficient w.r.t. its main variable) is t z.
+
+Now let us explain how to read the second decomposition.  Note that
+the non-constant initials of the first set are t^4-t and t z. Then 
+the solutions described by this first set are the common zeros of
+its polynomials that do not cancel the polynomials t^4-t and ty z.
+Now the solutions of the input system 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.
+
+We can get the dimensions of each component of a decomposition as follows.
+
+  [coHeight(ts) for ts in lts]
+    [1,0,0]
+                             Type: List NonNegativeInteger
+
+Thus the first set has dimension one.  Indeed t can take any value,
+except 0 or any third root of 1, whereas z is completely determined
+from t, y is given by z and t, and finally x is given by the other
+three variables.  In the second and the third sets of the second
+decomposition the four variables are completely determined and thus
+these sets have dimension zero.
+
+We give now the precise specifications of each decomposition.  This
+assume some mathematical knowledge.  However, for the non-expert user,
+the above explanations will be sufficient to understand the other
+features of the RSEGSET constructor.
+
+The input system lp is decomposed in the sense of Kalkbrener as
+finitely many regular sets T1,...,Ts such that the radical ideal
+generated by lp is the intersection of the radicals of the saturated
+ideals of T1,...,Ts.  In other words, the affine variety associated
+with lp is the union of the closures (w.r.t. Zarisky topology) of the
+regular-zeros sets of T1,...,Ts.
+
+N. B. The prime ideals associated with the radical of the saturated
+ideal of a regular triangular set have all the same dimension;
+moreover these prime ideals can be given by characteristic sets with
+the same main variables.  Thus a decomposition in the sense of
+Kalkbrener is unmixed dimensional.  Then it can be viewed as a lazy
+decomposition into prime ideals (some of these prime ideals being
+merged into unmixed dimensional ideals).
+
+Now we explain the other way of solving by means of regular triangular
+sets.  The input system lp is decomposed in the sense of Lazard as
+finitely many regular triangular sets T1,...,Ts such that the affine
+variety associated with lp is the union of the regular-zeros sets of
+T1,...,Ts.  Thus a decomposition in the sense of Lazard is also a
+decomposition in the sense of Kalkbrener; the converse is false as we
+have seen before.
+
+When the input system has a finite number of solutions, both ways of
+solving provide similar decompositions as we shall see with this
+second example (Caprasse).
+
+Define a polynomial system.
+
+  f1 := y**2*z+2*x*y*t-2*x-z
+                     2
+    (2t y - 2)x + z y  - z
+           Type: NewSparseMultivariatePolynomial(Integer,
+                    OrderedVariableList [x,y,z,t])
+
+  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
+         3              2        2              3      2
+    - z x  + (4t y + 4)x  + (4z y  + 4z)x + 2t y  - 10y  - 10t y + 2
+           Type: NewSparseMultivariatePolynomial(Integer,
+                    OrderedVariableList [x,y,z,t])
+
+  f3 :=  2*y*z*t+x*t**2-x-2*z 
+      2
+    (t  - 1)x + 2t z y - 2z
+           Type: NewSparseMultivariatePolynomial(Integer,
+                    OrderedVariableList [x,y,z,t])
+
+  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
+        3      2                2     3             2      2
+    (- z  + (4t  + 4)z)x + (4t z  + 2t  - 10t)y + 4z  - 10t  + 2
+           Type: NewSparseMultivariatePolynomial(Integer,
+                    OrderedVariableList [x,y,z,t])
+
+  lf := [f1, f2, f3, f4]
+                     2
+   [(2t y - 2)x + z y  - z,
+         3              2        2              3      2
+    - z x  + (4t y + 4)x  + (4z y  + 4z)x + 2t y  - 10y  - 10t y + 2,
+      2
+    (t  - 1)x + 2t z y - 2z,
+        3      2                2     3             2      2
+    (- z  + (4t  + 4)z)x + (4t z  + 2t  - 10t)y + 4z  - 10t  + 2]
+           Type: List NewSparseMultivariatePolynomial(Integer,
+                            OrderedVariableList [x,y,z,t])
+
+First of all, let us solve this system in the sense of Kalkbrener.
+
+  zeroSetSplit(lf)$T
+      2      8      6       2                 3            2
+   [{t  - 1,z  - 16z  + 256z  - 256,t y - 1,(z  - 8z)x - 8z  + 16},
+       2      2     2
+    {3t  + 1,z  - 7t  - 1,y + t,x + z},
+      8      6      2         3            2
+    {t  - 10t  + 10t  - 1,z,(t  - 5t)y - 5t  + 1,x},
+      2      2
+    {t  + 3,z  - 4,y + t,x - z}]
+      Type: List RegularTriangularSet(Integer,
+                  IndexedExponents OrderedVariableList [x,y,z,t],
+                  OrderedVariableList [x,y,z,t],
+                  NewSparseMultivariatePolynomial(Integer,
+                      OrderedVariableList [x,y,z,t]))
+
+And now in the sense of Lazard (or Wu and other authors).
+
+  lts2 := zeroSetSplit(lf,false)$T
+      8      6      2         3            2
+   [{t  - 10t  + 10t  - 1,z,(t  - 5t)y - 5t  + 1,x},
+      2      8      6       2                 3            2
+    {t  - 1,z  - 16z  + 256z  - 256,t y - 1,(z  - 8z)x - 8z  + 16},
+       2      2     2                     2      2
+    {3t  + 1,z  - 7t  - 1,y + t,x + z}, {t  + 3,z  - 4,y + t,x - z}]
+       Type: List RegularTriangularSet(Integer,
+                   IndexedExponents OrderedVariableList [x,y,z,t],
+                   OrderedVariableList [x,y,z,t],
+                   NewSparseMultivariatePolynomial(Integer,
+                       OrderedVariableList [x,y,z,t]))
+
+Up to the ordering of the components, both decompositions are identical.
+
+Let us check that each component has a finite number of solutions.
+
+  [coHeight(ts) for ts in lts2]
+    [0,0,0,0]
+                        Type: List NonNegativeInteger
+
+Let us count the degrees of each component,
+
+  degrees := [degree(ts) for ts in lts2]
+    [8,16,4,4]
+                        Type: List NonNegativeInteger
+
+and compute their sum.
+
+  reduce(+,degrees)
+    32
+                        Type: PositiveInteger
+
+We study now the options of the zeroSetSplit operation.  As we have seen 
+yet, there is an optional second argument which is a boolean value. If this 
+value is true (this is the default) then the decomposition is computed in 
+the sense of Kalkbrener, otherwise it is computed in the sense of Lazard.
+
+There is a second boolean optional argument that can be used (in that
+case the first optional 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 true the second
+argument.  Then a lot of numbers and letters are displayed.  Between a
+[ and a ] one has the state of the processes at a given time.  Just
+after [ one can see the number of processes.  Then each process is
+represented by two numbers between < and >.  A process consists of a
+list of polynomial ps and a triangular set ts; its goal is to compute
+the common zeros of ps that belong to the regular-zeros set of ts.
+After the processes, the number between pipes gives the total number
+of polynomials in all the sets 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 this
+information is displayed.
+
+Define a polynomial system.
+
+  u : R := 2 
+    2
+                            Type: Integer
+
+  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}
+       2           2  2        2                            2           2
+     (y  - 2t y + t )x  + (- 2y  + ((2t + 4)z + 2t)y + (- 2t  + 2)z - 4t  - 2)x
+   + 
+      2                      2       2          2
+     y  + (- 2t z - 4t)y + (t  + 10)z  - 8z + 4t  + 2
+       Type: NewSparseMultivariatePolynomial(Integer,
+               OrderedVariableList [x,y,z,t])
+
+  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}
+    (- 3z y + 2t z + t)x + (z + 4)y + 4t z  - 7t z
+       Type: NewSparseMultivariatePolynomial(Integer,
+               OrderedVariableList [x,y,z,t])
+
+  q3 := -u**2*(z-1)**2+ 2*z*(z-x)-2*(x-1)
+    (- 2z - 2)x - 2z  + 8z - 2
+       Type: NewSparseMultivariatePolynomial(Integer,
+               OrderedVariableList [x,y,z,t])
+
+  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)}
+       2     2      2        2                      2        2
+    (3y  - 3t  - 4)x  + (- 6y  + (12t z + 12t)y + 6t z)x + 3y  + (12t z - 12t)y
+   + 
+       2      2         2            2
+    (9t  + 4)z  + (- 24t  - 4)z + 12t  + 4
+        Type: NewSparseMultivariatePolynomial(Integer,
+                OrderedVariableList [x,y,z,t])
+
+  lq := [q1, q2, q3, q4]
+   [
+         2           2  2
+       (y  - 2t y + t )x
+     + 
+            2                            2           2          2
+       (- 2y  + ((2t + 4)z + 2t)y + (- 2t  + 2)z - 4t  - 2)x + y
+     + 
+                          2       2          2
+       (- 2t z - 4t)y + (t  + 10)z  - 8z + 4t  + 2
+     ,
+                                          2                         2
+    (- 3z y + 2t z + t)x + (z + 4)y + 4t z  - 7t z, (- 2z - 2)x - 2z  + 8z - 2,
+
+          2     2      2        2                      2        2
+       (3y  - 3t  - 4)x  + (- 6y  + (12t z + 12t)y + 6t z)x + 3y
+     + 
+                           2      2         2            2
+       (12t z - 12t)y + (9t  + 4)z  + (- 24t  - 4)z + 12t  + 4
+     ]
+        Type: List NewSparseMultivariatePolynomial(Integer,
+                     OrderedVariableList [x,y,z,t])
+
+Let us try the information option.  N.B. The timing should be between
+1 and 10 minutes, depending on your machine.
+
+  zeroSetSplit(lq,true,true)$T
+     [1 <4,0> -> |4|; {0}]W[2 <5,0>,<3,1> -> |8|; {0}]
+     [2 <4,1>,<3,1> -> |7|; {0}]
+     [1 <3,1> -> |3|; {0}]G
+     [2 <4,1>,<4,1> -> |8|; {0}]W
+     [3 <5,1>,<4,1>,<3,2> -> |12|; {0}]GI
+     [3 <4,2>,<4,1>,<3,2> -> |11|; {0}]GWw
+     [3 <4,1>,<3,2>,<5,2> -> |12|; {0}]
+     [3 <3,2>,<3,2>,<5,2> -> |11|; {0}]GIwWWWw
+     [4 <3,2>,<4,2>,<5,2>,<2,3> -> |14|; {0}]
+     [4 <2,2>,<4,2>,<5,2>,<2,3> -> |13|; {0}]Gwww
+     [5 <3,2>,<3,2>,<4,2>,<5,2>,<2,3> -> |17|; {0}]Gwwwwww
+     [8 <3,2>,<4,2>,<4,2>,<4,2>,<4,2>,<4,2>,<5,2>,<2,3> -> |30|; {0}]Gwwwwww
+     [8 <4,2>,<4,2>,<4,2>,<4,2>,<4,2>,<4,2>,<5,2>,<2,3> -> |31|; {0}]
+     [8 <3,3>,<4,2>,<4,2>,<4,2>,<4,2>,<4,2>,<5,2>,<2,3> -> |30|; {0}]
+     [8 <2,3>,<4,2>,<4,2>,<4,2>,<4,2>,<4,2>,<5,2>,<2,3> -> |29|; {0}]
+     [8 <1,3>,<4,2>,<4,2>,<4,2>,<4,2>,<4,2>,<5,2>,<2,3> -> |28|; {0}]
+     [7 <4,2>,<4,2>,<4,2>,<4,2>,<4,2>,<5,2>,<2,3> -> |27|; {0}]
+     [6 <4,2>,<4,2>,<4,2>,<4,2>,<5,2>,<2,3> -> |23|; {0}]
+     [5 <4,2>,<4,2>,<4,2>,<5,2>,<2,3> -> |19|; {0}]GIGIWwww
+     [6 <5,2>,<4,2>,<4,2>,<5,2>,<3,3>,<2,3> -> |23|; {0}]
+     [6 <4,3>,<4,2>,<4,2>,<5,2>,<3,3>,<2,3> -> |22|; {0}]GIGI
+     [6 <3,4>,<4,2>,<4,2>,<5,2>,<3,3>,<2,3> -> |21|; {0}]
+     [6 <2,4>,<4,2>,<4,2>,<5,2>,<3,3>,<2,3> -> |20|; {0}]GGG
+     [5 <4,2>,<4,2>,<5,2>,<3,3>,<2,3> -> |18|; {0}]GIGIWwwwW
+     [6 <5,2>,<4,2>,<5,2>,<3,3>,<3,3>,<2,3> -> |22|; {0}]
+     [6 <4,3>,<4,2>,<5,2>,<3,3>,<3,3>,<2,3> -> |21|; {0}]
+     GIwwWwWWWWWWWwWWWWwwwww
+     [8 <4,2>,<5,2>,<3,3>,<3,3>,<4,3>,<2,3>,<3,4>,<3,4> -> |27|; {0}]
+     [8 <3,3>,<5,2>,<3,3>,<3,3>,<4,3>,<2,3>,<3,4>,<3,4> -> |26|; {0}]
+     [8 <2,3>,<5,2>,<3,3>,<3,3>,<4,3>,<2,3>,<3,4>,<3,4> -> |25|; {0}]
+     Gwwwwwwwwwwwwwwwwwwww
+     [9 <5,2>,<3,3>,<3,3>,<4,3>,<3,3>,<3,3>,<2,3>,<3,4>,<3,4> -> |29|; {0}]GI
+     [9 <4,3>,<3,3>,<3,3>,<4,3>,<3,3>,<3,3>,<2,3>,<3,4>,<3,4> -> |28|; {0}]
+     [9 <3,3>,<3,3>,<3,3>,<4,3>,<3,3>,<3,3>,<2,3>,<3,4>,<3,4> -> |27|; {0}]
+     [9 <2,3>,<3,3>,<3,3>,<4,3>,<3,3>,<3,3>,<2,3>,<3,4>,<3,4> -> |26|; {0}]
+     GGwwwwwwwwwwwwWWwwwwwwww
+     [11 <3,3>,<3,3>,<3,3>,<3,3>,<4,3>,<2,3>,<3,3>,<3,3>,<3,3>,<3,4>,<3,4>
+        -> |33|; {0}]
+     [11 <2,3>,<3,3>,<3,3>,<3,3>,<4,3>,<2,3>,<3,3>,<3,3>,<3,3>,<3,4>,<3,4> 
+       -> |32|; {0}]
+     [11 <1,3>,<3,3>,<3,3>,<3,3>,<4,3>,<2,3>,<3,3>,<3,3>,<3,3>,<3,4>,<3,4> 
+       -> |31|; {0}]GGGwwwwwwwwwwwww
+     [12 <2,3>,<2,3>,<3,3>,<3,3>,<4,3>,<3,3>,<2,3>,<3,3>,<3,3>,<3,3>,<3,4>,
+       <3,4> -> |34|; {0}]GGwwwwwwwwwwwww
+     [13 <3,3>,<2,3>,<3,3>,<3,3>,<3,3>,<3,3>,<4,3>,<2,3>,<3,3>,<3,3>,<3,3>,
+       <3,4>,<3,4> -> |38|; {0}]Gwwwwwwwwwwwww
+     [13 <2,3>,<3,3>,<4,3>,<3,3>,<4,3>,<3,3>,<3,3>,<2,3>,<3,3>,<3,3>,<3,3>,
+       <3,4>,<3,4> -> |39|; {0}]GGGwwwwwwwwwwwww
+     [15 <3,3>,<4,3>,<3,3>,<3,3>,<3,3>,<3,3>,<3,3>,<3,3>,<4,3>,<2,3>,<3,3>,
+       <3,3>,<3,3>,<3,4>,<3,4> -> |46|; {0}]
+     [14 <4,3>,<3,3>,<3,3>,<3,3>,<3,3>,<3,3>,<3,3>,<4,3>,<2,3>,<3,3>,<3,3>,
+       <3,3>,<3,4>,<3,4> -> |43|; {0}]GIGGGGIGGI
+     [14 <3,4>,<3,3>,<3,3>,<3,3>,<3,3>,<3,3>,<3,3>,<4,3>,<2,3>,<3,3>,<3,3>,
+       <3,3>,<3,4>,<3,4> -> |42|; {0}]GGG
+     [14 <2,4>,<3,3>,<3,3>,<3,3>,<3,3>,<3,3>,<3,3>,<4,3>,<2,3>,<3,3>,<3,3>,
+       <3,3>,<3,4>,<3,4> -> |41|; {0}]
+     [14 <1,4>,<3,3>,<3,3>,<3,3>,<3,3>,<3,3>,<3,3>,<4,3>,<2,3>,<3,3>,<3,3>,
+       <3,3>,<3,4>,<3,4> -> |40|; {0}]GGG
+     [13 <3,3>,<3,3>,<3,3>,<3,3>,<3,3>,<3,3>,<4,3>,<2,3>,<3,3>,<3,3>,<3,3>,
+       <3,4>,<3,4> -> |39|; {0}]Gwwwwwwwwwwwww
+     [15 <3,3>,<3,3>,<4,3>,<4,3>,<4,3>,<3,3>,<3,3>,<4,3>,<3,3>,<2,3>,<3,3>,
+       <3,3>,<3,3>,<3,4>,<3,4> -> |48|; {0}]Gwwwwwwwwwwwww
+     [15 <4,3>,<4,3>,<3,3>,<4,3>,<4,3>,<3,3>,<4,3>,<3,3>,<3,3>,<2,3>,<3,3>,
+       <3,3>,<3,3>,<3,4>,<3,4> -> |49|; {0}]GIGI
+     [15 <3,4>,<4,3>,<3,3>,<4,3>,<4,3>,<3,3>,<4,3>,<3,3>,<3,3>,<2,3>,<3,3>,
+       <3,3>,<3,3>,<3,4>,<3,4> -> |48|; {0}]G
+     [14 <4,3>,<3,3>,<4,3>,<4,3>,<3,3>,<4,3>,<3,3>,<3,3>,<2,3>,<3,3>,<3,3>,
+       <3,3>,<3,4>,<3,4> -> |45|; {0}]
+     [13 <3,3>,<4,3>,<4,3>,<3,3>,<4,3>,<3,3>,<3,3>,<2,3>,<3,3>,<3,3>,<3,3>,
+       <3,4>,<3,4> -> |41|; {0}]Gwwwwwwwwwwwww
+     [13 <4,3>,<4,3>,<4,3>,<3,3>,<3,3>,<4,3>,<3,3>,<2,3>,<3,3>,<3,3>,<3,3>,
+       <3,4>,<3,4> -> |42|; {0}]GIGGGGIGGI
+     [13 <3,4>,<4,3>,<4,3>,<3,3>,<3,3>,<4,3>,<3,3>,<2,3>,<3,3>,<3,3>,<3,3>,
+       <3,4>,<3,4> -> |41|; {0}]GGGGGGGG
+     [13 <2,4>,<4,3>,<4,3>,<3,3>,<3,3>,<4,3>,<3,3>,<2,3>,<3,3>,<3,3>,<3,3>,
+       <3,4>,<3,4> -> |40|; {0}]
+     [13 <1,4>,<4,3>,<4,3>,<3,3>,<3,3>,<4,3>,<3,3>,<2,3>,<3,3>,<3,3>,<3,3>,
+       <3,4>,<3,4>  -> |39|; {0}]
+     [13 <0,4>,<4,3>,<4,3>,<3,3>,<3,3>,<4,3>,<3,3>,<2,3>,<3,3>,<3,3>,<3,3>,
+       <3,4>,<3,4> -> |38|; {0}]
+     [12 <4,3>,<4,3>,<3,3>,<3,3>,<4,3>,<3,3>,<2,3>,<3,3>,<3,3>,<3,3>,<3,4>,
+       <3,4> -> |38|; {1}]
+     [11 <4,3>,<3,3>,<3,3>,<4,3>,<3,3>,<2,3>,<3,3>,<3,3>,<3,3>,<3,4>,<3,4> 
+       -> |34|; {1}]
+     [10 <3,3>,<3,3>,<4,3>,<3,3>,<2,3>,<3,3>,<3,3>,<3,3>,<3,4>,<3,4> 
+       -> |30|; {1}]
+     [10 <2,3>,<3,3>,<4,3>,<3,3>,<2,3>,<3,3>,<3,3>,<3,3>,<3,4>,<3,4> 
+       -> |29|; {1}]GGGwwwwwwwwwwwww
+     [11 <3,3>,<3,3>,<4,3>,<3,3>,<3,3>,<2,3>,<3,3>,<3,3>,<3,3>,<3,4>,<3,4> 
+       -> |33|; {1}]GGGwwwwwwwwwwwww
+     [12 <4,3>,<3,3>,<4,3>,<3,3>,<3,3>,<4,3>,<2,3>,<3,3>,<3,3>,<3,3>,<3,4>,
+       <3,4> -> |38|; {1}]Gwwwwwwwwwwwww
+     [12 <3,3>,<4,3>,<5,3>,<3,3>,<4,3>,<3,3>,<2,3>,<3,3>,<3,3>,<3,3>,<3,4>,
+       <3,4> -> |39|; {1}]GGwwwwwwwwwwwww
+     [13 <5,3>,<4,3>,<4,3>,<4,3>,<3,3>,<3,3>,<4,3>,<2,3>,<3,3>,<3,3>,<3,3>,
+       <3,4>,<3,4> -> |44|; {1}]GIGGGGIGGIW
+     [13 <4,4>,<4,3>,<4,3>,<4,3>,<3,3>,<3,3>,<4,3>,<2,3>,<3,3>,<3,3>,<3,3>,
+       <3,4>,<3,4> -> |43|; {1}]GGW
+     [13 <3,4>,<4,3>,<4,3>,<4,3>,<3,3>,<3,3>,<4,3>,<2,3>,<3,3>,<3,3>,<3,3>,
+       <3,4>,<3,4> -> |42|; {1}]GGG
+     [12 <4,3>,<4,3>,<4,3>,<3,3>,<3,3>,<4,3>,<2,3>,<3,3>,<3,3>,<3,3>,<3,4>,
+       <3,4> -> |39|; {1}]Gwwwwwwwwwwwww
+     [12 <4,3>,<4,3>,<5,3>,<3,3>,<4,3>,<3,3>,<2,3>,<3,3>,<3,3>,<3,3>,<3,4>,
+       <3,4> -> |40|; {1}]Gwwwwwwwwwwwww
+     [13 <5,3>,<5,3>,<4,3>,<5,3>,<3,3>,<3,3>,<4,3>,<2,3>,<3,3>,<3,3>,<3,3>,
+       <3,4>,<3,4> -> |46|; {1}]GIGIW
+     [13 <4,4>,<5,3>,<4,3>,<5,3>,<3,3>,<3,3>,<4,3>,<2,3>,<3,3>,<3,3>,<3,3>,
+       <3,4>,<3,4> -> |45|; {1}]
+     [13 <3,4>,<5,3>,<4,3>,<5,3>,<3,3>,<3,3>,<4,3>,<2,3>,<3,3>,<3,3>,<3,3>,
+       <3,4>,<3,4> -> |44|; {1}]
+     [13 <2,4>,<5,3>,<4,3>,<5,3>,<3,3>,<3,3>,<4,3>,<2,3>,<3,3>,<3,3>,<3,3>,
+       <3,4>,<3,4> -> |43|; {1}]GG
+     [12 <5,3>,<4,3>,<5,3>,<3,3>,<3,3>,<4,3>,<2,3>,<3,3>,<3,3>,<3,3>,<3,4>,
+       <3,4> -> |41|; {1}]GIGGGGIGGIW
+     [12 <4,4>,<4,3>,<5,3>,<3,3>,<3,3>,<4,3>,<2,3>,<3,3>,<3,3>,<3,3>,<3,4>,
+       <3,4> -> |40|; {1}]GGGGGGW
+     [12 <3,4>,<4,3>,<5,3>,<3,3>,<3,3>,<4,3>,<2,3>,<3,3>,<3,3>,<3,3>,<3,4>,
+       <3,4> -> |39|; {1}]
+     [12 <2,4>,<4,3>,<5,3>,<3,3>,<3,3>,<4,3>,<2,3>,<3,3>,<3,3>,<3,3>,<3,4>,
+       <3,4> -> |38|; {1}]
+     [12 <1,4>,<4,3>,<5,3>,<3,3>,<3,3>,<4,3>,<2,3>,<3,3>,<3,3>,<3,3>,<3,4>,
+       <3,4> -> |37|; {1}]GGG
+     [11 <4,3>,<5,3>,<3,3>,<3,3>,<4,3>,<2,3>,<3,3>,<3,3>,<3,3>,<3,4>,<3,4> 
+       -> |36|; {1}]
+     [10 <5,3>,<3,3>,<3,3>,<4,3>,<2,3>,<3,3>,<3,3>,<3,3>,<3,4>,<3,4> 
+       -> |32|; {1}]
+     [9 <3,3>,<3,3>,<4,3>,<2,3>,<3,3>,<3,3>,<3,3>,<3,4>,<3,4> -> |27|; {1}]W
+     [9 <2,4>,<3,3>,<4,3>,<2,3>,<3,3>,<3,3>,<3,3>,<3,4>,<3,4> -> |26|; {1}]
+     [9 <1,4>,<3,3>,<4,3>,<2,3>,<3,3>,<3,3>,<3,3>,<3,4>,<3,4> -> |25|; {1}]
+     [8 <3,3>,<4,3>,<2,3>,<3,3>,<3,3>,<3,3>,<3,4>,<3,4> -> |24|; {1}]W
+     [8 <2,4>,<4,3>,<2,3>,<3,3>,<3,3>,<3,3>,<3,4>,<3,4> -> |23|; {1}]
+     [8 <1,4>,<4,3>,<2,3>,<3,3>,<3,3>,<3,3>,<3,4>,<3,4> -> |22|; {1}]
+     [7 <4,3>,<2,3>,<3,3>,<3,3>,<3,3>,<3,4>,<3,4> -> |21|; {1}]w
+     [7 <3,4>,<2,3>,<3,3>,<3,3>,<3,3>,<3,4>,<3,4> -> |20|; {1}]
+     [7 <2,4>,<2,3>,<3,3>,<3,3>,<3,3>,<3,4>,<3,4> -> |19|; {1}]
+     [7 <1,4>,<2,3>,<3,3>,<3,3>,<3,3>,<3,4>,<3,4> -> |18|; {1}]
+     [6 <2,3>,<3,3>,<3,3>,<3,3>,<3,4>,<3,4> -> |17|; {1}]GGwwwwww
+     [7 <3,3>,<3,3>,<3,3>,<3,3>,<3,3>,<3,4>,<3,4> -> |21|; {1}]GIW
+     [7 <2,4>,<3,3>,<3,3>,<3,3>,<3,3>,<3,4>,<3,4> -> |20|; {1}]GG
+     [6 <3,3>,<3,3>,<3,3>,<3,3>,<3,4>,<3,4> -> |18|; {1}]Gwwwwww
+     [7 <4,3>,<4,3>,<3,3>,<3,3>,<3,3>,<3,4>,<3,4> -> |23|; {1}]GIW
+     [7 <3,4>,<4,3>,<3,3>,<3,3>,<3,3>,<3,4>,<3,4> -> |22|; {1}]
+     [6 <4,3>,<3,3>,<3,3>,<3,3>,<3,4>,<3,4> -> |19|; {1}]GIW
+     [6 <3,4>,<3,3>,<3,3>,<3,3>,<3,4>,<3,4> -> |18|; {1}]GGW
+     [6 <2,4>,<3,3>,<3,3>,<3,3>,<3,4>,<3,4> -> |17|; {1}]
+     [6 <1,4>,<3,3>,<3,3>,<3,3>,<3,4>,<3,4> -> |16|; {1}]GGG
+     [5 <3,3>,<3,3>,<3,3>,<3,4>,<3,4> -> |15|; {1}]GIW
+     [5 <2,4>,<3,3>,<3,3>,<3,4>,<3,4> -> |14|; {1}]GG
+     [4 <3,3>,<3,3>,<3,4>,<3,4> -> |12|; {1}]
+     [3 <3,3>,<3,4>,<3,4> -> |9|; {1}]W
+     [3 <2,4>,<3,4>,<3,4> -> |8|; {1}]
+     [3 <1,4>,<3,4>,<3,4> -> |7|; {1}]G
+     [2 <3,4>,<3,4> -> |6|; {1}]G
+     [1 <3,4> -> |3|; {1}]
+     [1 <2,4> -> |2|; {1}]
+     [1 <1,4> -> |1|; {1}]
+   *** QCMPACK Statistics ***
+      Table     size:  36
+      Entries reused:  255
+
+   *** REGSETGCD: Gcd Statistics ***
+      Table     size:  125
+      Entries reused:  0
+
+   *** REGSETGCD: Inv Set Statistics ***
+      Table     size:  30
+      Entries reused:  0
+
+   [
+     {
+                         24                   23                    22
+         960725655771966t   + 386820897948702t   + 8906817198608181t
+       + 
+                          21                     20                    19
+         2704966893949428t   + 37304033340228264t   + 7924782817170207t
+       + 
+                           18                     17                      16
+         93126799040354990t   + 13101273653130910t   + 156146250424711858t
+       + 
+                           15                      14                     13
+         16626490957259119t   + 190699288479805763t   + 24339173367625275t
+       + 
+                            12                     11                      10
+         180532313014960135t   + 35288089030975378t   + 135054975747656285t
+       + 
+                           9                     8                     7
+         34733736952488540t  + 75947600354493972t  + 19772555692457088t
+       + 
+                           6                    5                    4
+         28871558573755428t  + 5576152439081664t  + 6321711820352976t
+       + 
+                       3                   2
+       438314209312320t  + 581105748367008t  - 60254467992576t + 1449115951104
+       ,
+
+                                                                         23
+             26604210869491302385515265737052082361668474181372891857784t
+           + 
+                                                                          22
+             443104378424686086067294899528296664238693556855017735265295t
+           + 
+                                                                          21
+             279078393286701234679141342358988327155321305829547090310242t
+           + 
+                                                                           20
+             3390276361413232465107617176615543054620626391823613392185226t
+           + 
+                                                                          19
+             941478179503540575554198645220352803719793196473813837434129t
+           + 
+                                                                            18
+             11547855194679475242211696749673949352585747674184320988144390t
+           + 
+                                                                           17
+             1343609566765597789881701656699413216467215660333356417241432t
+           + 
+                                                                            16
+             23233813868147873503933551617175640859899102987800663566699334t
+           + 
+                                                                          15
+             869574020537672336950845440508790740850931336484983573386433t
+           + 
+                                                                            14
+             31561554305876934875419461486969926554241750065103460820476969t
+           + 
+                                                                           13
+             1271400990287717487442065952547731879554823889855386072264931t
+           + 
+                                                                            12
+             31945089913863736044802526964079540198337049550503295825160523t
+           + 
+                                                                           11
+             3738735704288144509871371560232845884439102270778010470931960t
+           + 
+                                                                            10
+             25293997512391412026144601435771131587561905532992045692885927t
+           + 
+                                                                           9
+             5210239009846067123469262799870052773410471135950175008046524t
+           + 
+                                                                            8
+             15083887986930297166259870568608270427403187606238713491129188t
+           + 
+                                                                           7
+             3522087234692930126383686270775779553481769125670839075109000t
+           + 
+                                                                           6
+             6079945200395681013086533792568886491101244247440034969288588t
+           + 
+                                                                           5
+             1090634852433900888199913756247986023196987723469934933603680t
+           + 
+                                                                           4
+             1405819430871907102294432537538335402102838994019667487458352t
+           + 
+                                                                         3
+             88071527950320450072536671265507748878347828884933605202432t
+           + 
+                                                                          2
+             135882489433640933229781177155977768016065765482378657129440t
+           + 
+             - 13957283442882262230559894607400314082516690749975646520320t
+           + 
+             334637692973189299277258325709308472592117112855749713920
+        *
+           z
+       + 
+                                                                    23
+         8567175484043952879756725964506833932149637101090521164936t
+       + 
+                                                                      22
+         149792392864201791845708374032728942498797519251667250945721t
+       + 
+                                                                     21
+         77258371783645822157410861582159764138123003074190374021550t
+       + 
+                                                                       20
+         1108862254126854214498918940708612211184560556764334742191654t
+       + 
+                                                                      19
+         213250494460678865219774480106826053783815789621501732672327t
+       + 
+                                                                       18
+         3668929075160666195729177894178343514501987898410131431699882t
+       + 
+                                                                      17
+         171388906471001872879490124368748236314765459039567820048872t
+       + 
+                                                                       16
+         7192430746914602166660233477331022483144921771645523139658986t
+       + 
+                                                                        15
+         - 128798674689690072812879965633090291959663143108437362453385t
+       + 
+                                                                       14
+         9553010858341425909306423132921134040856028790803526430270671t
+       + 
+                                                                       13
+         - 13296096245675492874538687646300437824658458709144441096603t
+       + 
+                                                                       12
+         9475806805814145326383085518325333106881690568644274964864413t
+       + 
+                                                                      11
+         803234687925133458861659855664084927606298794799856265539336t
+       + 
+                                                                       10
+         7338202759292865165994622349207516400662174302614595173333825t
+       + 
+                                                                       9
+         1308004628480367351164369613111971668880538855640917200187108t
+       + 
+                                                                       8
+         4268059455741255498880229598973705747098216067697754352634748t
+       + 
+                                                                      7
+         892893526858514095791318775904093300103045601514470613580600t
+       + 
+                                                                       6
+         1679152575460683956631925852181341501981598137465328797013652t
+       + 
+                                                                      5
+         269757415767922980378967154143357835544113158280591408043936t
+       + 
+                                                                      4
+         380951527864657529033580829801282724081345372680202920198224t
+       + 
+                                                                     3
+         19785545294228495032998826937601341132725035339452913286656t
+       + 
+                                                                     2
+         36477412057384782942366635303396637763303928174935079178528t
+       + 
+         - 3722212879279038648713080422224976273210890229485838670848t
+       + 
+         89079724853114348361230634484013862024728599906874105856
+       ,
+         3      2                  3       2
+      (3z  - 11z  + 8z + 4)y + 2t z  + 4t z  - 5t z - t,
+                  2
+      (z + 1)x + z  - 4z + 1}
+     ]
+       Type: List RegularTriangularSet(Integer,
+                   IndexedExponents OrderedVariableList [x,y,z,t],
+                   OrderedVariableList [x,y,z,t],
+                   NewSparseMultivariatePolynomial(Integer,
+                     OrderedVariableList [x,y,z,t]))
+
+Between a sequence of processes, thus between a ] and a [ you can see
+capital letters W, G, I and lower case letters 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 RSEGSET constructor from using these hash-tables.  In that
+case you will be using the zeroSetSplit with five arguments.  The
+first one is the input system lp as above.  The second one is a
+boolean value hash?  which is true iff you want to use hash-tables.
+The third one is boolean value clos? which is 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 info? which is
+true iff you want to display information during the computations.  The
+last one is boolean value prep? which is 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 true when you are using
+zeroSetSplit with less than five arguments.  Note that there is no
+available signature for 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 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 Primeidealkettensatz is used.  Thus just try both,
+with the various options, before concluding that you cannot solve your
+favorite system with zeroSetSplit.  There exist more options at the
+development level that are not currently available in this public
+version.
+
+See Also:
+o )help GcdDomain
+o )help OrderedAbelianMonoidSup
+o )help OrderedSet
+o )help RecursivePolynomialCategory
+o )help RegularChain
+o )help NewSparseMultivariatePolynomial
+o )help ZeroDimensionalSolvePackage
+o )help LexTriangularPackage
+o )help LazardSetSolvingPackage
+o )help SquareFreeRegularTriangularSet
+o )show RegularTriangularSet
+o $AXIOM/doc/src/algebra/regset.spad.dvi
+
+@
 <<domain REGSET RegularTriangularSet>>=
 )abbrev domain REGSET RegularTriangularSet
 ++ Author: Marc Moreno Maza
diff --git a/src/algebra/seg.spad.pamphlet b/src/algebra/seg.spad.pamphlet
index 63036d6..7d6026b 100644
--- a/src/algebra/seg.spad.pamphlet
+++ b/src/algebra/seg.spad.pamphlet
@@ -88,6 +88,176 @@ SegmentExpansionCategory(S: OrderedRing, L: StreamAggregate(S)): Category ==
 
 @
 \section{domain SEG Segment}
+<<Segment.input>>=
+-- seg.spad.pamphlet Segment.input
+)spool Segment.output
+)set message test on
+)set message auto off
+)clear all
+--S 1 of 10
+s := 3..10
+--R 
+--R
+--R   (1)  3..10
+--R                                                Type: Segment PositiveInteger
+--E 1
+
+--S 2 of 10
+lo s
+--R 
+--R
+--R   (2)  3
+--R                                                        Type: PositiveInteger
+--E 2
+
+--S 3 of 10
+hi s
+--R 
+--R
+--R   (3)  10
+--R                                                        Type: PositiveInteger
+--E 3
+
+--S 4 of 10
+t := 10..3 by -2
+--R 
+--R
+--R   (4)  10..3 by - 2
+--R                                                Type: Segment PositiveInteger
+--E 4
+
+--S 5 of 10
+incr s
+--R 
+--R
+--R   (5)  1
+--R                                                        Type: PositiveInteger
+--E 5
+
+--S 6 of 10
+incr t
+--R 
+--R
+--R   (6)  - 2
+--R                                                                Type: Integer
+--E 6
+
+--S 7 of 10
+l := [1..3, 5, 9, 15..11 by -1]
+--R 
+--R
+--R   (7)  [1..3,5..5,9..9,15..11 by - 1]
+--R                                           Type: List Segment PositiveInteger
+--E 7
+
+--S 8 of 10
+expand s
+--R 
+--R
+--R   (8)  [3,4,5,6,7,8,9,10]
+--R                                                           Type: List Integer
+--E 8
+
+--S 9 of 10
+expand t
+--R 
+--R
+--R   (9)  [10,8,6,4]
+--R                                                           Type: List Integer
+--E 9
+
+--S 10 of 10
+expand l
+--R 
+--R
+--R   (10)  [1,2,3,5,9,15,14,13,12,11]
+--R                                                           Type: List Integer
+--E 10
+)spool
+)lisp (bye)
+@
+<<Segment.help>>=
+====================================================================
+Segment examples
+====================================================================
+
+The Segment domain provides a generalized interval type.
+
+Segments are created using the .. construct by indicating the
+(included) end points.
+
+  s := 3..10
+    3..10
+                             Type: Segment PositiveInteger
+
+The first end point is called the lo and the second is called hi.
+
+  lo s
+    3
+                             Type: PositiveInteger
+
+These names are used even though the end points might belong to an
+unordered set.
+
+  hi s
+    10
+                              Type: PositiveInteger
+
+In addition to the end points, each segment has an integer "increment".
+An increment can be specified using the "by" construct.
+
+  t := 10..3 by -2
+    10..3 by - 2
+                              Type: Segment PositiveInteger
+
+This part can be obtained using the incr function.
+
+  incr s
+    1
+                              Type: PositiveInteger
+
+Unless otherwise specified, the increment is 1.
+
+  incr t
+    - 2
+                              Type: Integer
+
+A single value can be converted to a segment with equal end points.
+This happens if segments and single values are mixed in a list.
+
+  l := [1..3, 5, 9, 15..11 by -1]
+    [1..3,5..5,9..9,15..11 by - 1]
+                               Type: List Segment PositiveInteger
+
+If the underlying type is an ordered ring, it is possible to perform
+additional operations.  The expand operation creates a list of points
+in a segment.
+
+  expand s
+    [3,4,5,6,7,8,9,10]
+                               Type: List Integer
+
+If k > 0, then expand(l..h by k) creates the list [l, l+k, ..., lN]
+where lN <= h < lN+k.  If k < 0, then lN >= h > lN+k.
+
+  expand t
+    [10,8,6,4]
+                               Type: List Integer
+
+It is also possible to expand a list of segments.  This is equivalent
+to appending lists obtained by expanding each segment individually.
+
+  expand l
+    [1,2,3,5,9,15,14,13,12,11]
+                                Type: List Integer
+
+See Also:
+o )help UniversalSegment
+o )help SegmentBinding
+o )show Segment
+o $AXIOM/doc/src/algebra/seg.spad.dvi
+
+@
 <<domain SEG Segment>>=
 )abbrev domain SEG Segment
 ++ Author:  Stephen M. Watt
@@ -216,6 +386,118 @@ SegmentFunctions2(R:Type, S:Type): public == private where
 
 @
 \section{domain SEGBIND SegmentBinding}
+<<SegmentBinding.input>>=
+-- seg.spad.pamphlet SegmentBinding.input
+)spool SegmentBinding.output
+)set message test on
+)set message auto off
+)clear all
+--S 1 of 5
+x = a..b
+--R 
+--R
+--R   (1)  x= a..b
+--R                                                  Type: SegmentBinding Symbol
+--E 1
+
+--S 2 of 5
+sum(i**2, i = 0..n)
+--R 
+--R
+--R          3     2
+--R        2n  + 3n  + n
+--R   (2)  -------------
+--R              6
+--R                                            Type: Fraction Polynomial Integer
+--E 2
+
+--S 3 of 5
+sb := y = 1/2..3/2
+--R 
+--R
+--R            1    3
+--R   (3)  y= (-)..(-)
+--R            2    2
+--R                                        Type: SegmentBinding Fraction Integer
+--E 3
+
+--S 4 of 5
+variable(sb)
+--R 
+--R
+--R   (4)  y
+--R                                                                 Type: Symbol
+--E 4
+
+--S 5 of 5
+segment(sb)
+--R 
+--R
+--R         1    3
+--R   (5)  (-)..(-)
+--R         2    2
+--R                                               Type: Segment Fraction Integer
+--E 5
+)spool
+)lisp (bye)
+@
+<<SegmentBinding.help>>=
+====================================================================
+SegmentBinding examples
+====================================================================
+
+The SegmentBinding type is used to indicate a range for a named symbol.
+
+First give the symbol, then an = and finally a segment of values.
+
+  x = a..b
+    x= a..b
+                            Type: SegmentBinding Symbol
+
+This is used to provide a convenient syntax for arguments to certain
+operations.
+
+  sum(i**2, i = 0..n)
+      3     2
+    2n  + 3n  + n
+    -------------
+          6
+                            Type: Fraction Polynomial Integer
+
+  draw(x**2, x = -2..2)
+    TwoDimensionalViewport: "x*x"
+                            Type: TwoDimensionalViewport
+
+
+The left-hand side must be of type Symbol but the right-hand side can
+be a segment over any type.
+
+  sb := y = 1/2..3/2
+        1    3
+    y= (-)..(-)
+        2    2
+                            Type: SegmentBinding Fraction Integer
+
+The left- and right-hand sides can be obtained using the variable and
+segment operations.
+
+  variable(sb)
+    y
+                            Type: Symbol
+
+  segment(sb)
+     1    3
+    (-)..(-)
+     2    2
+                            Type: Segment Fraction Integer
+
+See Also:
+o )help Segment
+o )help UniversalSegment
+o )show SegmentBinding
+o $AXIOM/doc/src/algebra/seg.spad.dvi
+
+@
 <<domain SEGBIND SegmentBinding>>=
 )abbrev domain SEGBIND SegmentBinding
 ++ Author:
diff --git a/src/algebra/sets.spad.pamphlet b/src/algebra/sets.spad.pamphlet
index 5f373d4..0a348b4 100644
--- a/src/algebra/sets.spad.pamphlet
+++ b/src/algebra/sets.spad.pamphlet
@@ -10,6 +10,314 @@
 \tableofcontents
 \eject
 \section{domain SET Set}
+<<Set.input>>=
+-- sets.spad.pamphlet Set.input
+)spool Set.output
+)set message test on
+)set message auto off
+)clear all
+--S 1 of 20
+s := set [x**2-1, y**2-1, z**2-1]
+--R 
+--R
+--R          2      2      2
+--R   (1)  {x  - 1,y  - 1,z  - 1}
+--R                                                 Type: Set Polynomial Integer
+--E 1
+
+--S 2 of 20
+t := set [x**i - i+1 for i in 2..10 | prime? i]
+--R 
+--R
+--R          2      3      5      7
+--R   (2)  {x  - 1,x  - 2,x  - 4,x  - 6}
+--R                                                 Type: Set Polynomial Integer
+--E 2
+
+--S 3 of 20
+i := intersect(s,t)
+--R 
+--R
+--R          2
+--R   (3)  {x  - 1}
+--R                                                 Type: Set Polynomial Integer
+--E 3
+
+--S 4 of 20
+u := union(s,t)
+--R 
+--R
+--R          2      3      5      7      2      2
+--R   (4)  {x  - 1,x  - 2,x  - 4,x  - 6,y  - 1,z  - 1}
+--R                                                 Type: Set Polynomial Integer
+--E 4
+
+--S 5 of 20
+difference(s,t)
+--R 
+--R
+--R          2      2
+--R   (5)  {y  - 1,z  - 1}
+--R                                                 Type: Set Polynomial Integer
+--E 5
+
+--S 6 of 20
+symmetricDifference(s,t)
+--R 
+--R
+--R          3      5      7      2      2
+--R   (6)  {x  - 2,x  - 4,x  - 6,y  - 1,z  - 1}
+--R                                                 Type: Set Polynomial Integer
+--E 6
+
+--S 7 of 20
+member?(y, s)
+--R 
+--R
+--R   (7)  false
+--R                                                                Type: Boolean
+--E 7
+
+--S 8 of 20
+member?((y+1)*(y-1), s)
+--R 
+--R
+--R   (8)  true
+--R                                                                Type: Boolean
+--E 8
+
+--S 9 of 20
+subset?(i, s)
+--R 
+--R
+--R   (9)  true
+--R                                                                Type: Boolean
+--E 9
+
+--S 10 of 20
+subset?(u, s)
+--R 
+--R
+--R   (10)  false
+--R                                                                Type: Boolean
+--E 10
+
+--S 11 of 20
+gs := set [g for i in 1..11 | primitive?(g := i::PF 11)] 
+--R 
+--R
+--R   (11)  {2,6,7,8}
+--R                                                      Type: Set PrimeField 11
+--E 11
+
+--S 12 of 20
+complement gs 
+--R 
+--R
+--R   (12)  {1,3,4,5,9,10,0}
+--R                                                      Type: Set PrimeField 11
+--E 12
+
+--S 13 of 20
+a := set [i**2 for i in 1..5]
+--R 
+--R
+--R   (13)  {1,4,9,16,25}
+--R                                                    Type: Set PositiveInteger
+--E 13
+
+--S 14 of 20
+insert!(32, a)
+--R 
+--R
+--R   (14)  {1,4,9,16,25,32}
+--R                                                    Type: Set PositiveInteger
+--E 14
+
+--S 15 of 20
+remove!(25, a)
+--R 
+--R
+--R   (15)  {1,4,9,16,32}
+--R                                                    Type: Set PositiveInteger
+--E 15
+
+--S 16 of 20
+a
+--R 
+--R
+--R   (16)  {1,4,9,16,32}
+--R                                                    Type: Set PositiveInteger
+--E 16
+
+--S 17 of 20
+b := b0 := set [i**2 for i in 1..5]
+--R 
+--R
+--R   (17)  {1,4,9,16,25}
+--R                                                    Type: Set PositiveInteger
+--E 17
+
+--S 18 of 20
+b := union(b, {32})
+--R 
+--R
+--R   (18)  {1,4,9,16,25,32}
+--R                                                    Type: Set PositiveInteger
+--E 18
+
+--S 19 of 20
+b := difference(b, {25})
+--R 
+--R
+--R   (19)  {1,4,9,16,32}
+--R                                                    Type: Set PositiveInteger
+--E 19
+
+--S 20 of 20
+b0
+--R 
+--R
+--R   (20)  {1,4,9,16,25}
+--R                                                    Type: Set PositiveInteger
+--E 20
+)spool
+)lisp (bye)
+@
+<<Set.help>>=
+====================================================================
+Set examples
+====================================================================
+
+The Set domain allows one to represent explicit finite sets of values.
+These are similar to lists, but duplicate elements are not allowed.
+
+Sets can be created by giving a fixed set of values ...
+
+  s := set [x**2-1, y**2-1, z**2-1]
+      2      2      2
+    {x  - 1,y  - 1,z  - 1}
+                           Type: Set Polynomial Integer
+
+or by using a collect form, just as for lists.  In either case, the
+set is formed from a finite collection of values.
+
+  t := set [x**i - i+1 for i in 2..10 | prime? i]
+      2      3      5      7
+    {x  - 1,x  - 2,x  - 4,x  - 6}
+                           Type: Set Polynomial Integer
+
+The basic operations on sets are intersect, union, difference, and
+symmetricDifference.
+
+  i := intersect(s,t)
+      2
+    {x  - 1}
+                           Type: Set Polynomial Integer
+
+  u := union(s,t)
+      2      3      5      7      2      2
+    {x  - 1,x  - 2,x  - 4,x  - 6,y  - 1,z  - 1}
+                           Type: Set Polynomial Integer
+
+The set difference(s,t) contains those members of s which are not in t.
+
+  difference(s,t)
+      2      2
+    {y  - 1,z  - 1}
+                           Type: Set Polynomial Integer
+
+The set symmetricDifference(s,t) contains those elements which are
+in s or t but not in both.
+
+  symmetricDifference(s,t)
+      3      5      7      2      2
+    {x  - 2,x  - 4,x  - 6,y  - 1,z  - 1}
+                           Type: Set Polynomial Integer
+
+Set membership is tested using the member? operation.
+
+  member?(y, s)
+    false
+                           Type: Boolean
+
+  member?((y+1)*(y-1), s)
+    true
+                           Type: Boolean
+
+The subset? function determines whether one set is a subset of another.
+
+  subset?(i, s)
+    true
+                           Type: Boolean
+
+  subset?(u, s)
+    false
+                           Type: Boolean
+
+When the base type is finite, the absolute complement of a set is
+defined.  This finds the set of all multiplicative generators of 
+PrimeField 11---the integers mod 11.
+
+  gs := set [g for i in 1..11 | primitive?(g := i::PF 11)] 
+    {2,6,7,8}
+                           Type: Set PrimeField 11
+
+The following values are not generators.
+
+  complement gs 
+    {1,3,4,5,9,10,0}
+                           Type: Set PrimeField 11
+
+Often the members of a set are computed individually; in addition,
+values can be inserted or removed from a set over the course of a
+computation.
+
+There are two ways to do this:
+
+  a := set [i**2 for i in 1..5]
+    {1,4,9,16,25}
+                           Type: Set PositiveInteger
+
+One is to view a set as a data structure and to apply updating operations.
+
+  insert!(32, a)
+    {1,4,9,16,25,32}
+                           Type: Set PositiveInteger
+
+  remove!(25, a)
+    {1,4,9,16,32}
+                           Type: Set PositiveInteger
+
+  a
+    {1,4,9,16,32}
+                           Type: Set PositiveInteger
+
+The other way is to view a set as a mathematical entity and to
+create new sets from old.
+
+  b := b0 := set [i**2 for i in 1..5]
+    {1,4,9,16,25}
+                           Type: Set PositiveInteger
+
+  b := union(b, {32})
+    {1,4,9,16,25,32}
+                           Type: Set PositiveInteger
+
+  b := difference(b, {25})
+    {1,4,9,16,32}
+                           Type: Set PositiveInteger
+
+  b0
+    {1,4,9,16,25}
+                           Type: Set PositiveInteger
+
+See Also:
+o )help List
+o )show Set
+o $AXIOM/doc/src/algebra/sets.spad.dvi
+
+@
 <<domain SET Set>>=
 )abbrev domain SET Set
 ++ Author: Michael Monagan; revised by Richard Jenks
diff --git a/src/algebra/variable.spad.pamphlet b/src/algebra/variable.spad.pamphlet
index 0f50171..994aa3b 100644
--- a/src/algebra/variable.spad.pamphlet
+++ b/src/algebra/variable.spad.pamphlet
@@ -10,6 +10,101 @@
 \tableofcontents
 \eject
 \section{domain OVAR OrderedVariableList}
+<<OrderedVariableList.input>>=
+-- variable.spad.pamphlet OrderedVariableList.input
+)spool OrderedVariableList.output
+)set message test on
+)set message auto off
+)clear all
+--S 1
+ls:List Symbol:=['x,'a,'z]
+--R 
+--R
+--R   (1)  [x,a,z]
+--R                                                            Type: List Symbol
+--E 1
+
+--S 2
+Z:=OVAR ls
+--R 
+--R
+--R   (2)  OrderedVariableList [x,a,z]
+--R                                                                 Type: Domain
+--E 2
+
+--S 3
+size()$Z
+--R 
+--R
+--R   (3)  3
+--R                                                     Type: NonNegativeInteger
+--E 3
+
+--S 4
+lv:=[index(i::PI)$Z for i in 1..size()$Z]
+--R 
+--R   Compiling function G1408 with type Integer -> Boolean 
+--R   Compiling function G1572 with type NonNegativeInteger -> Boolean 
+--R
+--R   (4)  [x,a,z]
+--R                                       Type: List OrderedVariableList [x,a,z]
+--E 4
+
+--S 5
+sorted?(>,lv)
+--R 
+--R
+--R   (5)  true
+--R                                                                Type: Boolean
+--E 5
+)spool
+)lisp (bye)
+@
+<<OrderedVariableList.help>>=
+====================================================================
+OrderedVariableList examples
+====================================================================
+
+The domain OrderedVariableList provides symbols which are restricted
+to a particular list and have a definite ordering. Those two features
+are specified by a List Symbol object that is the argument to the
+domain.
+
+This is a sample ordering of three symbols.
+
+  ls:List Symbol:=['x,'a,'z]
+    [x,a,z]
+                                Type: List Symbol
+
+Let's build the domain
+
+  Z:=OVAR ls
+    OrderedVariableList [x,a,z]
+                                Type: Domain
+
+How many variables does it have?
+
+  size()$Z
+    3
+                                Type: NonNegativeInteger
+
+They are (in the imposed order)
+
+  lv:=[index(i::PI)$Z for i in 1..size()$Z]
+    [x,a,z]
+                                Type: List OrderedVariableList [x,a,z]
+
+Check that the ordering is right
+
+  sorted?(>,lv)
+    true
+                                Type: Boolean
+
+See Also:
+o )show OrderedVariableList
+o $AXIOM/doc/src/algebra/variable.spad.dvi
+
+@
 <<domain OVAR OrderedVariableList>>=
 )abbrev domain OVAR OrderedVariableList
 ++ Description:
diff --git a/src/doc/spadhelp.pamphlet b/src/doc/spadhelp.pamphlet
index 024164b..3275622 100644
--- a/src/doc/spadhelp.pamphlet
+++ b/src/doc/spadhelp.pamphlet
@@ -1513,9 +1513,15 @@ MappingPackage1 (MAPPKG1)        MappingPackage2 (MAPPKG2)
 MappingPackage3 (MAPPKG3)        Matrix (MATRIX)
 Multiset (MSET)                  MultivariatePolynomial (MPOLY)
 None (NONE)                      Octonion (OCT)
-OneDimensionalArray (ARRAY1)
+OneDimensionalArray (ARRAY1)     Operator (OP)
+OrderedVariableList (OVAR)       OrderlyDifferentialPolynomial (ODPOL)
+PartialFraction (PFR)            Permanent (PERMAN)
+Polynomial (POLY)                Quaternion (QUAT)
+RadixExpansion (RADIX)           RealClosure (RECLOS)
 PlaneAlgebraicCurvePlot (ACPLOT) RealSolvePackage (REALSOLV)
-RomanNumeral (ROMAN)             TwoDimensionalViewport (VIEW2D)
+RegularTriangularSet (REGSET)    RomanNumeral (ROMAN)
+Segment (SEG)                    SegmentBinding (SEGBIND)
+Set (SET)                        TwoDimensionalViewport (VIEW2D)
 
 @ 
 
\start
Date: Wed, 5 Sep 2007 13:00:55 +0000 (GMT)
From: Dave Feustel
To: list
Subject: Axiom for 64-bit AMD OpenBSD 4.1 

I'm trying to configure Axiom for OpenBSD, but
configure says it doesn't know how.

OpenBSD is like FreeBSD and NetBSD, but with a few tweaks.
Can Axiom be built on OpenBSD?

\start
Date: Thu, 6 Sep 2007 14:03:42 -0400
From: Bill Page
To: Dave Feustel
Subject: Re: Axiom for 64-bit AMD OpenBSD 4.1

On 9/5/07, Dave Feustel Dave Feustel wrote:
>
> Hi!
>
> I'm trying to configure Axiom for OpenBSD, but
> configure says it doesn't know how.
>
> OpenBSD is like FreeBSD and NetBSD, but with a few tweaks.
> Can Axiom be built on OpenBSD?
>
> Thanks,
> Dave Feustel
> --

For building Axiom on less common architectures I strongly recommend
the FriCAS or OpenAxiom forks of the Axiom project.

\start
Date: Thu, 6 Sep 2007 13:29:39 -0500
From: Tim Daly
To: Dave Feustel
Subject: Axiom for 64-bit AMD OpenBSD 4.1

When you check out axiom where does the build fail?
Can you post a console log?
Can you tell me where you got your OpenBSD distro?

\start
Date: Thu, 6 Sep 2007 17:46:33 -0500
From: Tim Daly
To: Dave Feustel
Subject: Axiom on OpenBSD

Ok. I'll try to build a new machine with OpenBSD and see what it
takes to generate an axiom build on it. There will be a bit of a
lag as I'm traveling for work this week.

\start
Date: Thu, 6 Sep 2007 18:16:59 -0500
From: Tim Daly
To: Bill Page
Subject: Mailing List Etiquette

Bill,

> For building Axiom on less common architectures I strongly recommend
> the FriCAS or OpenAxiom forks of the Axiom project.

I strongly object to your suggestion that someone who has requested
information, help, or porting assistance on this mailing list should
go to another project.

Please do not do that again on this list.

\start
Date: Thu, 6 Sep 2007 22:01:05 -0400
From: Bill Page
To: Tim Daly
Subject: Re: Mailing List Etiquette

Tim,

Ok. I honestly do not understand your point of view on this; nor on
many other aspects of what you narrowly call the "Axiom" project, as
our other recent failures to communicate both on-list and off-list now
document ad nauseam. But this is your project and the Internet is a
big place, so in future emails to this list (if any) I will try harder
not to offend your sense of what kind of project you want this one to
be.

Regards,
Bill Page.

On 9/6/07, Tim Daly wrote:
> Bill,
>
> > For building Axiom on less common architectures I strongly recommend
> > the FriCAS or OpenAxiom forks of the Axiom project.
>
> I strongly object to your suggestion that someone who has requested
> information, help, or porting assistance on this mailing list should
> go to another project.
>
> Please do not do that again on this list.

\start
Date: Fri, 7 Sep 2007 23:48:20 -0500
From: Tim Daly
To: list
Subject: 20070907.01.tpd.patch

This patch fixes the 'make install' command.

The problem was that the axiom command has been inserted into a
pamphlet file (bookvol6) and fully documented. However it was not
being extracted to int and copied properly.

===================================================================
diff --git a/Makefile.pamphlet b/Makefile.pamphlet
index af8ef5f..9579f8f 100644
--- a/Makefile.pamphlet
+++ b/Makefile.pamphlet
@@ -568,7 +568,7 @@ install:
 	@echo export AXIOM >>${COMMAND}
 	@echo PATH='$${AXIOM}/bin':'$${PATH}' >>${COMMAND}
 	@echo export PATH >>${COMMAND}
-	@cat ${SRC}/etc/axiom >>${COMMAND}
+	@cat ${INT}/sman/axiom >>${COMMAND}
 	@chmod +x ${COMMAND}
 	@echo 79 Axiom installation finished.
 	@echo
diff --git a/changelog b/changelog
index 753235b..4d7f421 100644
--- a/changelog
+++ b/changelog
@@ -1,3 +1,5 @@
+20070906 tpd Makefile int/sman/axiom command to target command for install
+20070906 tpd src/sman/Makefile copy axiom command to int
 20070906 tpd merge help files branch
 20070906 tpd src/doc/spadhelp add ZeroDimensionalSolvePackage
 20070906 tpd src/algebra/Makefile add ZeroDimensionalSolvePackage.help 
diff --git a/src/sman/Makefile.pamphlet b/src/sman/Makefile.pamphlet
index f95a511..9973ef1 100644
--- a/src/sman/Makefile.pamphlet
+++ b/src/sman/Makefile.pamphlet
@@ -46,6 +46,7 @@ ${OUT}/axiom: ${IN}/bookvol6.pamphlet
 	@ (cd ${OUT} ; \
            ${TANGLE} -R"axiomcmd" ${IN}/bookvol6.pamphlet >axiom )
 	@chmod +x ${OUT}/axiom
+	@ cp ${OUT}/axiom ${MID}
 
 @
 \section{session}

\start
Date: Sat, 8 Sep 2007 20:07:14 -0500
From: Tim Daly
To: William Sit
Subject: bug #361

William,

I notice that you're running a version of Axiom from Nov 2004.
In the latest version I get:


Starts dribbling to bug361.input (2007/9/8, 20:55:12).
(1) -> )set mes auto off
(1) -> integrate(1/(-3+v^3)*v/(-4*v^3)^(1/2),v)

   (1)
       -
             6+---+ +-+
            4\|- 1 \|3
         *
            atan
                  6+---+ +-+
                 3\|- 1 \|3
              /
                           +--------------------------------------------+
                           |   6+---+6+---+ +---+     6+---+2    6+---+2
                    6+---+ |- 3\|- 1 \|243 \|- v  - v \|243   + 9\|- 1
                   2\|243  |--------------------------------------------
                           |                   6+---+2
                          \|                   \|243
                 + 
                    6+---+ +---+    6+---+
                   2\|243 \|- v  - 3\|- 1
     + 
       -
             6+---+ +-+
            4\|- 1 \|3
         *
            atan
                  6+---+ +-+
                 3\|- 1 \|3
              /
                           +------------------------------------------+
                           | 6+---+6+---+ +---+     6+---+2    6+---+2
                    6+---+ |3\|- 1 \|243 \|- v  - v \|243   + 9\|- 1
                   2\|243  |------------------------------------------
                           |                  6+---+2
                          \|                  \|243
                 + 
                    6+---+ +---+    6+---+
                   2\|243 \|- v  + 3\|- 1
     + 
       6+---+     6+---+6+---+ +---+     6+---+2    6+---+2
       \|- 1 log(3\|- 1 \|243 \|- v  - v \|243   + 9\|- 1  )
     + 
        6+---+    6+---+ +---+    6+---+     6+---+    6+---+ +---+    6+---+
       2\|- 1 log(\|243 \|- v  + 3\|- 1 ) - 2\|- 1 log(\|243 \|- v  - 3\|- 1 )
     + 
         6+---+       6+---+6+---+ +---+     6+---+2    6+---+2
       - \|- 1 log(- 3\|- 1 \|243 \|- v  - v \|243   + 9\|- 1  )
  /
       6+---+
     12\|243
                                          Type: Union(Expression Integer,...)
(2) -> )spool



\start
Date: Sat, 08 Sep 2007 21:40:01 -0400
From: William Sit
To: Tim Daly
Subject: Re: bug #361

Thanks. In that case, the report file should be closed (assuming the integral is
correct).

William

Tim Daly wrote:

> William,
>
> I notice that you're running a version of Axiom from Nov 2004.
> In the latest version I get:
>
> Starts dribbling to bug361.input (2007/9/8, 20:55:12).
> (1) -> )set mes auto off
> (1) -> integrate(1/(-3+v^3)*v/(-4*v^3)^(1/2),v)
>
>    (1)
>        -
>              6+---+ +-+
>             4\|- 1 \|3
>          *
>             atan
>                   6+---+ +-+
>                  3\|- 1 \|3
>               /
>                            +--------------------------------------------+
>                            |   6+---+6+---+ +---+     6+---+2    6+---+2
>                     6+---+ |- 3\|- 1 \|243 \|- v  - v \|243   + 9\|- 1
>                    2\|243  |--------------------------------------------
>                            |                   6+---+2
>                           \|                   \|243
>                  +
>                     6+---+ +---+    6+---+
>                    2\|243 \|- v  - 3\|- 1
>      +
>        -
>              6+---+ +-+
>             4\|- 1 \|3
>          *
>             atan
>                   6+---+ +-+
>                  3\|- 1 \|3
>               /
>                            +------------------------------------------+
>                            | 6+---+6+---+ +---+     6+---+2    6+---+2
>                     6+---+ |3\|- 1 \|243 \|- v  - v \|243   + 9\|- 1
>                    2\|243  |------------------------------------------
>                            |                  6+---+2
>                           \|                  \|243
>                  +
>                     6+---+ +---+    6+---+
>                    2\|243 \|- v  + 3\|- 1
>      +
>        6+---+     6+---+6+---+ +---+     6+---+2    6+---+2
>        \|- 1 log(3\|- 1 \|243 \|- v  - v \|243   + 9\|- 1  )
>      +
>         6+---+    6+---+ +---+    6+---+     6+---+    6+---+ +---+    6+---+
>        2\|- 1 log(\|243 \|- v  + 3\|- 1 ) - 2\|- 1 log(\|243 \|- v  - 3\|- 1 )
>      +
>          6+---+       6+---+6+---+ +---+     6+---+2    6+---+2
>        - \|- 1 log(- 3\|- 1 \|243 \|- v  - v \|243   + 9\|- 1  )
>   /
>        6+---+
>      12\|243
>                                           Type: Union(Expression Integer,...)
> (2) -> )spool

\start
Date: Sat, 8 Sep 2007 23:01:24 -0400
From: Bill Page
To: Tim Daly
Subject: re: bug #361

Tim,

No. You are integrating the wrong expression. You wrote:

integrate(1/(-3+v^3)*v/(-4*v^3)^(1/2),v)

but William wrote:

integrate(1/(-3+v^3)*v/(-4+v^3)^(1/2),v)

When you re-keyed it you changed + to * in the following sub-expression, i.e.

(-4+v^3) to
(-4*v^3)

The integral presented in issue #361 still fails in newer versions of Axiom.

Regards,
Bill Page.

On 9/8/07, William Sit wrote:
> Thanks. In that case, the report file should be closed (assuming the integral is
> correct).
>
> William
>
> Tim Daly wrote:
>
> > William,
> >
> > I notice that you're running a version of Axiom from Nov 2004.
> > In the latest version I get:
> >
> > Starts dribbling to bug361.input (2007/9/8, 20:55:12).
> > (1) -> )set mes auto off
> > (1) -> integrate(1/(-3+v^3)*v/(-4*v^3)^(1/2),v)
> > ...

\start
Date: Sun, 09 Sep 2007 01:22:11 -0400
From: William Sit
To: Bill Page
Subject: re: bug #361

Bill:

Thanks for your "eagle eyes".

William

Bill Page wrote:

> Tim,
>
> No. You are integrating the wrong expression. You wrote:
>
> integrate(1/(-3+v^3)*v/(-4*v^3)^(1/2),v)
>
> but William wrote:
>
> integrate(1/(-3+v^3)*v/(-4+v^3)^(1/2),v)
>
> When you re-keyed it you changed + to * in the following sub-expression, i.e.
>
> (-4+v^3) to
> (-4*v^3)
>
> The integral presented in issue #361 still fails in newer versions of Axiom.
>
> Regards,
> Bill Page.
>
> On 9/8/07, William Sit wrote:
> > Thanks. In that case, the report file should be closed (assuming the integral is
> > correct).
> >
> > William
> >
> > Tim Daly wrote:
> >
> > > William,
> > >
> > > I notice that you're running a version of Axiom from Nov 2004.
> > > In the latest version I get:
> > >
> > > Starts dribbling to bug361.input (2007/9/8, 20:55:12).
> > > (1) -> )set mes auto off
> > > (1) -> integrate(1/(-3+v^3)*v/(-4*v^3)^(1/2),v)
> > > ...


\start
Date: Sun, 9 Sep 2007 10:39:46 -0500
From: Tim Daly
To: list
Subject: 20070907.02.tpd.patch

This patch changes the regression testing to respect the NOISE variable.

During a standard 'make' the NOISE variable points to ${TMP}/noise and
puts all of the output into that file. By default, TMP is in the obj
directory (not /tmp as that is outside the build tree and axiom never
writes outside the build tree). So (myaxiom)/obj/noise holds the output
of the last command run.

Output is normally suppressed and only echo lines are printed.
Every Makefile stanza starts with a line:
    @ echo (number) what this stanza does
so it is possible to look at the failing build and look upward for the
    (number) what this stanza does 
line. The (number) is unique within the current running Makefile.
Next, look upward for the 
    make[NN] entering directory 'foo'
look at the foo/Makefile.pamphlet, search for (number). That is
the failing stanza.

By default, typing 
    make
will suppress most output, cutting the resulting output to 
about 10% of the full console log.

You can see the full console log typing
    make NOISE=
and you will see the results of the compiles and tests.

Test output is cached in int/input/*.output and the regression
result logs are cached in int/input/*.regress

Tim



==========================================================================
diff --git a/changelog b/changelog
index 4d7f421..7d3f2df 100644
--- a/changelog
+++ b/changelog
@@ -1,3 +1,6 @@
+20070907 tpd src/algebra/acplot.spad fix PlaneAlgebraicCurvePlot.help NOISE
+20070907 tpd src/algebra/Makefile make regression respect NOISE variable
+20070907 tpd src/input/Makefile make regression respect NOISE variable
 20070906 tpd Makefile int/sman/axiom command to target command for install
 20070906 tpd src/sman/Makefile copy axiom command to int
 20070906 tpd merge help files branch
diff --git a/src/algebra/Makefile.pamphlet b/src/algebra/Makefile.pamphlet
index ba8b53f..445aac8 100644
--- a/src/algebra/Makefile.pamphlet
+++ b/src/algebra/Makefile.pamphlet
@@ -2057,10 +2057,23 @@ single stanza:
 \begin{verbatim}
 %.regress: %.input
 	@ echo algebra regression testing $*
-	@ rm -f $*.output
-	@ echo ')read $*.input' | ${TESTSYS} 
-	@ echo ')lisp (regress "$*.output")' | ${TESTSYS} \
-                | egrep -v '(Timestamp|Version)' | tee $*.regress
+	@ (cd ${MID} ; \
+	  rm -f $*.output ; \
+	  if [ -z "${NOISE}" ] ; then \
+           echo ')read $*.input' | ${TESTSYS} ; \
+	  else \
+           echo ')read $*.input' | ${TESTSYS} >${TMP}/trace ; \
+	  fi ; \
+	  rm $*.input ; \
+	  if [ -z "${NOISE}" ] ; then \
+           echo ')lisp (regress "$*.output")' | ${TESTSYS} \
+                | egrep -v '(Timestamp|Version)' | tee $*.regress ; \
+	  else \
+           echo ')lisp (regress "$*.output")' | ${TESTSYS} \
+                | egrep -v '(Timestamp|Version)' > $*.regress ; \
+	  fi ; \
+	  fgrep "regression result" $*.regress )
+
 \end{verbatim}
 The input Makefile extracts {\bf algebra.regress} and then calls 
 make to process this file.
@@ -2191,10 +2204,21 @@ REGRESS=\
 
 %.regress: %.input
 	@ echo algebra regression testing $*
-	@ rm -f $*.output
-	@ echo ')read $*.input' | ${TESTSYS} 
-	@ echo ')lisp (regress "$*.output")' | ${TESTSYS} \
-                | egrep -v '(Timestamp|Version)' | tee $*.regress
+	@ rm -f $*.output 
+	@ if [ -z "${NOISE}" ] ; then \
+           echo ')read $*.input' | ${TESTSYS} ; \
+	  else \
+           echo ')read $*.input' | ${TESTSYS} >${TMP}/trace ; \
+	  fi 
+	@ rm $*.input 
+	@ if [ -z "${NOISE}" ] ; then \
+           echo ')lisp (regress "$*.output")' | ${TESTSYS} \
+                | egrep -v '(Timestamp|Version)' | tee $*.regress ; \
+	  else \
+           echo ')lisp (regress "$*.output")' | ${TESTSYS} \
+                | egrep -v '(Timestamp|Version)' > $*.regress ; \
+	  fi 
+	@ fgrep "regression result" $*.regress 
 
 all: ${REGRESS}
 	@echo algebra test cases complete.
diff --git a/src/algebra/acplot.spad.pamphlet b/src/algebra/acplot.spad.pamphlet
index b43e587..8a1ad4a 100644
--- a/src/algebra/acplot.spad.pamphlet
+++ b/src/algebra/acplot.spad.pamphlet
@@ -218,6 +218,10 @@ RealSolvePackage(): _
 \section{domain ACPLOT PlaneAlgebraicCurvePlot}
 <<PlaneAlgebraicCurvePlot.input>>=
 -- acplot.spad.pamphlet PlaneAlgebraicCurvePlot.input
+)spool PlaneAlgebraicCurvePlot.output
+)set message test on
+)set message auto off
+)clear all
 --S 1 of 1
 makeSketch(x+y,x,y,-1/2..1/2,-1/2..1/2)$ACPLOT
 --R   (1)                    ACPLOT
@@ -228,6 +232,8 @@ makeSketch(x+y,x,y,-1/2..1/2,-1/2..1/2)$ACPLOT
 --R                        [-0.5,0.5]
 --R                                                Type: PlaneAlgebraicCurvePlot
 --E 1
+)spool
+)lisp (bye)
 @
 <<PlaneAlgebraicCurvePlot.help>>=
 ====================================================================
diff --git a/src/input/Makefile.pamphlet b/src/input/Makefile.pamphlet
index 38b647a..2123928 100644
--- a/src/input/Makefile.pamphlet
+++ b/src/input/Makefile.pamphlet
@@ -383,8 +383,13 @@ identical output.
 	@ echo ')set message auto off' >> tmp.input 
 	@ echo ')read $*' >> tmp.input 
 	@ echo ')lisp (bye)' >> tmp.input 
-	@ echo 'systemCommand "read tmp.input"' | ${TESTSYS} \
-                | egrep -v '(Timestamp|Version)' | tee $*.output 
+	@ if [ -z "${NOISE}" ] ; then \
+	   echo 'systemCommand "read tmp.input"' | ${TESTSYS} \
+                | egrep -v '(Timestamp|Version)' | tee $*.output ; \
+	  else \
+	   echo 'systemCommand "read tmp.input"' | ${TESTSYS} \
+                | egrep -v '(Timestamp|Version)' > $*.output ; \
+	  fi 
 	@ rm tmp.input 
 
 @
@@ -402,14 +407,22 @@ the built-in gclweb function (see src/interp/gclweb.lisp)
 <<regression tests>>=
 %.regress: %.input
 	@ echo regression testing $*
-	@ rm -f $*.output
-	@ cp ${IN}/$*.input.pamphlet ${MID}
-	@ echo ')read $*.input' | ${TESTSYS} 
-	@ rm ${MID}/$*.input.pamphlet 
-	@ rm $*.input
-	@ echo ')lisp (regress "$*.output")' | ${TESTSYS} \
-                | egrep -v '(Timestamp|Version)' | tee $*.regress
-
+	@ (cd ${MID} ; \
+	  rm -f $*.output ; \
+	  if [ -z "${NOISE}" ] ; then \
+           echo ')read $*.input' | ${TESTSYS} ; \
+	  else \
+           echo ')read $*.input' | ${TESTSYS} >${TMP}/trace ; \
+	  fi ; \
+	  rm $*.input ; \
+	  if [ -z "${NOISE}" ] ; then \
+           echo ')lisp (regress "$*.output")' | ${TESTSYS} \
+                | egrep -v '(Timestamp|Version)' | tee $*.regress ; \
+	  else \
+           echo ')lisp (regress "$*.output")' | ${TESTSYS} \
+                | egrep -v '(Timestamp|Version)' > $*.regress ; \
+	  fi ; \
+	  fgrep "regression result" $*.regress )
 
 @
 \section{The Makefile}

\start
Date: Sun, 9 Sep 2007 18:34:01 -0500
From: Tim Daly
To: list
Subject: 20070909.01.tpd.patch

The file newton.spad contains the NEWTON domain which also exists
in duplicate form in fffg.spad. The newton.spad file is removed
by this patch.

Tim

===================================================================
diff --git a/changelog b/changelog
index 7d3f2df..6ff3473 100644
--- a/changelog
+++ b/changelog
@@ -1,3 +1,5 @@
+20070909 tpd src/algebra/newton.spad included in fffg.spad
+20070909 tpd src/algebra/Makefile remove newton.spad (duplicate)
 20070907 tpd src/algebra/acplot.spad fix PlaneAlgebraicCurvePlot.help NOISE
 20070907 tpd src/algebra/Makefile make regression respect NOISE variable
 20070907 tpd src/input/Makefile make regression respect NOISE variable
diff --git a/src/algebra/Makefile.pamphlet b/src/algebra/Makefile.pamphlet
index 445aac8..1e47325 100644
--- a/src/algebra/Makefile.pamphlet
+++ b/src/algebra/Makefile.pamphlet
@@ -1265,7 +1265,7 @@ SPADFILES= \
  ${OUTSRC}/mts.spad ${OUTSRC}/multfact.spad ${OUTSRC}/multpoly.spad \
  ${OUTSRC}/multsqfr.spad \
  ${OUTSRC}/naalgc.spad ${OUTSRC}/naalg.spad \
- ${OUTSRC}/newdata.spad ${OUTSRC}/newpoint.spad ${OUTSRC}/newton.spad \
+ ${OUTSRC}/newdata.spad ${OUTSRC}/newpoint.spad \
  ${OUTSRC}/newpoly.spad ${OUTSRC}/nlinsol.spad ${OUTSRC}/nlode.spad \
  ${OUTSRC}/npcoef.spad \
  ${OUTSRC}/nregset.spad \
@@ -1427,7 +1427,6 @@ DOCFILES= \
  ${DOC}/multsqfr.spad.dvi \
  ${DOC}/naalgc.spad.dvi ${DOC}/naalg.spad.dvi ${DOC}/ndftip.as.dvi \
  ${DOC}/nepip.as.dvi ${DOC}/newdata.spad.dvi ${DOC}/newpoint.spad.dvi \
- ${DOC}/newton.spad.dvi \
  ${DOC}/newpoly.spad.dvi ${DOC}/nlinsol.spad.dvi ${DOC}/nlode.spad.dvi \
  ${DOC}/noptip.as.dvi ${DOC}/npcoef.spad.dvi ${DOC}/nqip.as.dvi \
  ${DOC}/nrc.as.dvi ${DOC}/nregset.spad.dvi ${DOC}/nsfip.as.dvi \
diff --git a/src/algebra/newton.spad.pamphlet b/src/algebra/newton.spad.pamphlet
deleted file mode 100644
index 6f588bc..0000000
--- a/src/algebra/newton.spad.pamphlet
+++ /dev/null
@@ -1,46 +0,0 @@
-\documentclass{article}
-\usepackage{amsthm,amsmath,axiom}
-\begin{document}
-\title{newton.spad}
-\author{Martin Rubey}
-\maketitle
-\begin{abstract}
-\end{abstract}
-\tableofcontents
-\section{package NEWTON NewtonInterpolation}
-<<package NEWTON NewtonInterpolation>>=
-)abbrev package NEWTON NewtonInterpolation
-++ Description:
-++ This package exports Newton interpolation for the special case where the
-++ result is known to be in the original integral domain
-NewtonInterpolation F: Exports == Implementation where
-    F: IntegralDomain
-    Exports == with
-      newton: List F -> SparseUnivariatePolynomial F
-
-    Implementation == add
-
-      differences(yl: List F): List F == 
-        [y2-y1 for y1 in yl for y2 in rest yl]
-
-      z:SparseUnivariatePolynomial(F) := monomial(1,1)
-
--- we assume x=[1,2,3,...,n]
-      newtonAux(k: F, fact: F, yl: List F): SparseUnivariatePolynomial(F) ==
-        if empty? rest yl 
-        then ((yl.1) exquo fact)::F::SparseUnivariatePolynomial(F)
-        else ((yl.1) exquo fact)::F::SparseUnivariatePolynomial(F) 
-             + (z-k::SparseUnivariatePolynomial(F)) _
-               * newtonAux(k+1$F, fact*k, differences yl)
-
-
-      newton yl == newtonAux(1$F, 1$F, yl)
-@
-<<*>>=
-<<package NEWTON NewtonInterpolation>>
-@
-\eject
-\begin{thebibliography}{99}
-\bibitem{1} nothing
-\end{thebibliography}
-\end{document}

\start
Date: Sun, 9 Sep 2007 22:34:33 -0400
From: Bill Page
To: William Sit
Subject: re: bug #361

On 9/9/07, William Sit wrote:
> Bill:
>
> Thanks for your "eagle eyes".
>

Thank you "cut-and-paste" :-)

\start
Date: Fri, 7 Sep 2007 20:53:12 -0500
From: Tim Daly
To: list
Subject: 20070906.01.tpd.patch

This patch adds help files and regression test files for these
algebra files and their abbreviations:

 o ZeroDimensionalSolvePackage (ZDSOLVE)
 o XPolynomialRing (XPR)
 o XPolynomial (XPOLY)
 o XPBWPolynomial (XPBWPOLY)
 o WuWenTsunTriangularSet (WUTSET)
 o Void (VOID)
 o Vector (VECTOR)
 o UniversalSegment (UNISEG)
 o UnivariatePolynomial (UP)
 o TwoDimensionalArray (ARRAY2)
 o TextFile (TEXTFILE)
 o Table (TABLE)
 o StringTable (STRTBL)
 o String (STRING)
 o Stream (STREAM)
 o SquareFreeRegularTriangularSet (SREGSET)
 o SquareMatrix (SQMATRIX)
 o SparseTable (STBL)
 o SingleInteger (SINT)
 o Set (SET)

Tim

====================================================================
diff --git a/changelog b/changelog
index 6ffd80a..753235b 100644
--- a/changelog
+++ b/changelog
@@ -1,3 +1,81 @@
+20070906 tpd merge help files branch
+20070906 tpd src/doc/spadhelp add ZeroDimensionalSolvePackage
+20070906 tpd src/algebra/Makefile add ZeroDimensionalSolvePackage.help 
+20070906 tpd src/algebra/zerodim.spad add ZeroDimensionalSolvePackage.help
+20070906 tpd src/algebra/zerodim.spad ZeroDimensionalSolvePackage.input
+20070906 tpd src/doc/spadhelp add XPolynomialRing
+20070906 tpd src/algebra/Makefile add XPolynomialRing.help 
+20070906 tpd src/algebra/xpoly.spad add XPolynomialRing.help (XPR)
+20070906 tpd src/algebra/xpoly.spad XPolynomialRing.input
+20070906 tpd src/doc/spadhelp add XPolynomial
+20070906 tpd src/algebra/Makefile add XPolynomial.help 
+20070906 tpd src/algebra/xpoly.spad add XPolynomial.help (XPOLY)
+20070906 tpd src/algebra/xpoly.spad XPolynomial.input
+20070906 tpd src/doc/spadhelp add XPBWPolynomial
+20070906 tpd src/algebra/Makefile add XPBWPolynomial.help 
+20070906 tpd src/algebra/xlpoly.spad add XPBWPolynomial.help (XPBWPOLY)
+20070906 tpd src/algebra/xlpoly.spad XPBWPolynomial.input
+20070905 tpd src/doc/spadhelp add WuWenTsunTriangularSet
+20070905 tpd src/algebra/Makefile add WuWenTsunTriangularSet.help 
+20070905 tpd src/algebra/triset.spad add WuWenTsunTriangularSet.help (WUTSET)
+20070905 tpd src/algebra/triset.spad WuWenTsunTriangularSet.input
+20070905 tpd src/doc/spadhelp add Void
+20070905 tpd src/algebra/Makefile add Void.help 
+20070905 tpd src/algebra/void.spad add Void.help (VOID)
+20070905 tpd src/algebra/void.spad Void.input
+20070905 tpd src/doc/spadhelp add Vector
+20070905 tpd src/algebra/Makefile add Vector.help 
+20070905 tpd src/algebra/vector.spad add Vector.help (Vector)
+20070905 tpd src/algebra/vector.spad Vector.input
+20070905 tpd src/doc/spadhelp add UniversalSegment
+20070905 tpd src/algebra/Makefile add UniversalSegment.help 
+20070905 tpd src/algebra/seg.spad add UniversalSegment.help (UNISEG)
+20070905 tpd src/algebra/seg.spad UniversalSegment.input
+20070905 tpd src/doc/spadhelp add UnivariatePolynomial
+20070905 tpd src/algebra/Makefile add UnivariatePolynomial.help 
+20070905 tpd src/algebra/poly.spad add UnivariatePolynomial.help (UP)
+20070905 tpd src/algebra/poly.spad UnivariatePolynomial.input
+20070905 tpd src/doc/spadhelp add TwoDimensionalArray
+20070905 tpd src/algebra/Makefile add TwoDimensionalArray.help 
+20070905 tpd src/algebra/array2.spad add TwoDimensionalArray.help (ARRAY2)
+20070905 tpd src/algebra/array2.spad TwoDimensionalArray.input
+20070905 tpd src/doc/spadhelp add TextFile
+20070905 tpd src/algebra/Makefile add TextFile.help 
+20070905 tpd src/algebra/files.spad add TextFile.help (TEXTFILE)
+20070905 tpd src/algebra/files.spad TextFile.input
+20070905 tpd src/doc/spadhelp add Table
+20070905 tpd src/algebra/Makefile add Table.help 
+20070905 tpd src/algebra/table.spad add Table.help (TABLE)
+20070905 tpd src/algebra/table.spad Table.input
+20070905 tpd src/doc/spadhelp add StringTable
+20070905 tpd src/algebra/Makefile add StringTable.help 
+20070905 tpd src/algebra/table.spad add StringTable.help (STRTBL)
+20070905 tpd src/algebra/table.spad StringTable.input
+20070905 tpd src/doc/spadhelp add String
+20070905 tpd src/algebra/Makefile add String.help 
+20070905 tpd src/algebra/stream.spad add String.help (STRING)
+20070905 tpd src/algebra/stream.spad String.input
+20070905 tpd src/doc/book remove duplicate upperCase, lowerCase typo
+20070905 tpd src/doc/spadhelp add Stream
+20070905 tpd src/algebra/Makefile add Stream.help 
+20070905 tpd src/algebra/stream.spad add Stream.help (STREAM)
+20070905 tpd src/algebra/stream.spad Stream.input
+20070905 tpd src/doc/spadhelp add SquareFreeRegularTriangularSet
+20070905 tpd src/algebra/Makefile add SquareFreeRegularTriangularSet.help 
+20070905 tpd src/algebra/sregset.spad add SquareFreeRegularTriangularSet.help
+20070905 tpd src/algebra/sregset.spad SquareFreeRegularTriangularSet.input
+20070905 tpd src/doc/spadhelp add SquareMatrix
+20070905 tpd src/algebra/Makefile add SquareMatrix.help 
+20070905 tpd src/algebra/matrix.spad add SquareMatrix.help (SQMATRIX)
+20070905 tpd src/algebra/matrix.spad SquareMatrix.input
+20070905 tpd src/doc/spadhelp add SparseTable
+20070905 tpd src/algebra/Makefile add SparseTable.help 
+20070905 tpd src/algebra/table.spad add SparseTable.help (STBL)
+20070905 tpd src/algebra/table.spad SparseTable.input
+20070905 tpd src/doc/spadhelp add SingleInteger
+20070905 tpd src/algebra/Makefile add SingleInteger.help 
+20070905 tpd src/algebra/si.spad add SingleInteger.help (SINT)
+20070905 tpd src/algebra/si.spad SingleInteger.input
 20070905 tpd src/doc/spadhelp add Set
 20070905 tpd src/algebra/Makefile add Set.help 
 20070905 tpd src/algebra/sets.spad add Set.help (SET)
diff --git a/src/algebra/Makefile.pamphlet b/src/algebra/Makefile.pamphlet
index 8c50591..ba8b53f 100644
--- a/src/algebra/Makefile.pamphlet
+++ b/src/algebra/Makefile.pamphlet
@@ -2069,46 +2069,60 @@ This keeps the regression test list in the algebra Makefile.
 
 <<environment>>=
 SPADHELP=\
- ${HELP}/AssociationList.help  ${HELP}/BalancedBinaryTree.help \
- ${HELP}/BasicOperator.help    ${HELP}/BinaryExpansion.help \
- ${HELP}/BinarySearchTree.help ${HELP}/CardinalNumber.help \
- ${HELP}/CartesianTensor.help  ${HELP}/Character.help \
- ${HELP}/CharacterClass.help   ${HELP}/CliffordAlgebra.help \
- ${HELP}/Complex.help          ${HELP}/ContinuedFraction.help \
- ${HELP}/CycleIndicators.help  ${HELP}/DeRhamComplex.help \
- ${HELP}/DecimalExpansion.help ${HELP}/DoubleFloat.help \
- ${HELP}/EqTable.help          ${HELP}/Equation.help \
+ ${HELP}/AssociationList.help        ${HELP}/BalancedBinaryTree.help \
+ ${HELP}/BasicOperator.help          ${HELP}/BinaryExpansion.help \
+ ${HELP}/BinarySearchTree.help       ${HELP}/CardinalNumber.help \
+ ${HELP}/CartesianTensor.help        ${HELP}/Character.help \
+ ${HELP}/CharacterClass.help         ${HELP}/CliffordAlgebra.help \
+ ${HELP}/Complex.help                ${HELP}/ContinuedFraction.help \
+ ${HELP}/CycleIndicators.help        ${HELP}/DeRhamComplex.help \
+ ${HELP}/DecimalExpansion.help       ${HELP}/DoubleFloat.help \
+ ${HELP}/EqTable.help                ${HELP}/Equation.help \
  ${HELP}/DistributedMultivariatePolynomial.help \
- ${HELP}/Factored.help         ${HELP}/Fraction.help \
+ ${HELP}/Factored.help               ${HELP}/FactoredFunctions2.help \
+ ${HELP}/File.help                   ${HELP}/FileName.help \
+ ${HELP}/FlexibleArray.help          ${HELP}/Float.help \
+ ${HELP}/Fraction.help \
+ ${HELP}/FullPartialFractionExpansion.help \
  ${HELP}/GeneralDistributedMultivariatePolynomial.help \
  ${HELP}/GeneralSparseTable.help ${HELP}/GroebnerFactorizationPackage.help \
- ${HELP}/Heap.help             ${HELP}/HexadecimalExpansion.help \
+ ${HELP}/Heap.help                   ${HELP}/HexadecimalExpansion.help \
  ${HELP}/HomogeneousDistributedMultivariatePolynomial.help \
- ${HELP}/Integer.help          ${HELP}/IntegerLinearDependence.help \
- ${HELP}/IntegerNumberTheoryFunctions.help ${HELP}/Kernel.help \
- ${HELP}/KeyedAccessFile.help  ${HELP}/LexTriangularPackage.help \
- ${HELP}/Library.help          ${HELP}/LieExponentials.help \
- ${HELP}/LiePolynomial.help   \
+ ${HELP}/Integer.help                ${HELP}/IntegerLinearDependence.help \
+ ${HELP}/IntegerNumberTheoryFunctions.help \
+ ${HELP}/Kernel.help                 ${HELP}/KeyedAccessFile.help \
+ ${HELP}/LexTriangularPackage.help   ${HELP}/Library.help \
+ ${HELP}/LieExponentials.help        ${HELP}/LiePolynomial.help  \
  ${HELP}/LinearOrdinaryDifferentialOperator.help \
  ${HELP}/LinearOrdinaryDifferentialOperator1.help \
  ${HELP}/LinearOrdinaryDifferentialOperator2.help ${HELP}/List.help \
- ${HELP}/LyndonWord.help       ${HELP}/Magma.help \
- ${HELP}/MakeFunction.help     ${HELP}/MappingPackage1.help \
- ${HELP}/MappingPackage2.help  ${HELP}/MappingPackage3.help \
- ${HELP}/Matrix.help           ${HELP}/Multiset.help \
+ ${HELP}/LyndonWord.help             ${HELP}/Magma.help \
+ ${HELP}/MakeFunction.help           ${HELP}/MappingPackage1.help \
+ ${HELP}/MappingPackage2.help        ${HELP}/MappingPackage3.help \
+ ${HELP}/Matrix.help                 ${HELP}/Multiset.help \
  ${HELP}/MultivariatePolynomial.help ${HELP}/None.help \
- ${HELP}/Octonion.help         ${HELP}/OneDimensionalArray.help \
- ${HELP}/Operator.help         ${HELP}/OrderedVariableList.help \
+ ${HELP}/Octonion.help               ${HELP}/OneDimensionalArray.help \
+ ${HELP}/Operator.help               ${HELP}/OrderedVariableList.help \
  ${HELP}/OrderlyDifferentialPolynomial.help \
  ${HELP}/PlaneAlgebraicCurvePlot.help \
- ${HELP}/Permutation.help      ${HELP}/PartialFraction.help \
- ${HELP}/Permanent.help        ${HELP}/Polynomial.help \
- ${HELP}/Quaternion.help       ${HELP}/RadixExpansion.help \
- ${HELP}/RealClosure.help      ${HELP}/RealSolvePackage.help \
- ${HELP}/RegularTriangularSet.help \
- ${HELP}/RomanNumeral.help     ${HELP}/Segment.help \
- ${HELP}/Set.help \
- ${HELP}/TwoDimensionalViewport.help
+ ${HELP}/PartialFraction.help \
+ ${HELP}/Permanent.help              ${HELP}/Permutation.help \
+ ${HELP}/Polynomial.help             ${HELP}/Quaternion.help \
+ ${HELP}/RadixExpansion.help         ${HELP}/RealClosure.help \
+ ${HELP}/RealSolvePackage.help       ${HELP}/RegularTriangularSet.help \
+ ${HELP}/RomanNumeral.help           ${HELP}/Segment.help \
+ ${HELP}/Set.help                    ${HELP}/SingleInteger.help \
+ ${HELP}/SparseTable.help            ${HELP}/SquareMatrix.help \
+ ${HELP}/SquareFreeRegularTriangularSet.help \
+ ${HELP}/Stream.help                 ${HELP}/String.help \
+ ${HELP}/StringTable.help            ${HELP}/Symbol.help \
+ ${HELP}/Table.help                  ${HELP}/TextFile.help \
+ ${HELP}/TwoDimensionalArray.help    ${HELP}/TwoDimensionalViewport.help \
+ ${HELP}/UnivariatePolynomial.help   ${HELP}/UniversalSegment.help \
+ ${HELP}/Vector.help                 ${HELP}/Void.help \
+ ${HELP}/WuWenTsunTriangularSet.help ${HELP}/XPBWPolynomial.help \
+ ${HELP}/XPolynomial.help            ${HELP}/XPolynomialRing.help \
+ ${HELP}/ZeroDimensionalSolvePackage.help
 
 @
 The algebra files contain input chunks in regress format.
@@ -2119,46 +2133,60 @@ is put into a int/Makefile.algebra and then executed by make.
 TESTSYS=  ${OBJ}/${SYS}/bin/interpsys
 
 REGRESS=\
- AssociationList.regress  BalancedBinaryTree.regress \
- BasicOperator.regress    BinaryExpansion.regress \
- BinarySearchTree.regress CardinalNumber.regress \
- CartesianTensor.regress  Character.regress \
- CharacterClass.regress   CliffordAlgebra.regress \
- Complex.regress          ContinuedFraction.regress \
- CycleIndicators.regress  DeRhamComplex.regress \
- DecimalExpansion.regress DoubleFloat.regress \
- EqTable.regress          Equation.regress \
+ AssociationList.regress        BalancedBinaryTree.regress \
+ BasicOperator.regress          BinaryExpansion.regress \
+ BinarySearchTree.regress       CardinalNumber.regress \
+ CartesianTensor.regress        Character.regress \
+ CharacterClass.regress         CliffordAlgebra.regress \
+ Complex.regress                ContinuedFraction.regress \
+ CycleIndicators.regress        DeRhamComplex.regress \
+ DecimalExpansion.regress       DoubleFloat.regress \
+ EqTable.regress                Equation.regress \
  DistributedMultivariatePolynomial.regress \
- Factored.regress         Fraction.regress \
+ Factored.regress               FactoredFunctions2.regress \
+ File.regress                   FileName.regress \
+ FlexibleArray.regress          Float.regress \
+ Fraction.regress               FullPartialFractionExpansion.regress \
  GeneralDistributedMultivariatePolynomial.regress \
- GeneralSparseTable.regress GroebnerFactorizationPackage.regress \
- Heap.regress             HexadecimalExpansion.regress \
+ GeneralSparseTable.regress     GroebnerFactorizationPackage.regress \
+ Heap.regress                   HexadecimalExpansion.regress \
  HomogeneousDistributedMultivariatePolynomial.regress \
- Integer.regress          IntegerLinearDependence.regress \
+ Integer.regress                IntegerLinearDependence.regress \
  IntegerNumberTheoryFunctions.regress \
- Kernel.regress           KeyedAccessFile.regress \
- LexTriangularPackage.regress Library.regress \
- LieExponentials.regress  LiePolynomial.regress \
+ Kernel.regress                 KeyedAccessFile.regress \
+ LexTriangularPackage.regress   Library.regress \
+ LieExponentials.regress        LiePolynomial.regress \
  LinearOrdinaryDifferentialOperator.regress \
  LinearOrdinaryDifferentialOperator1.regress \
  LinearOrdinaryDifferentialOperator2.regress List.regress \
- LyndonWord.regress        Magma.regress \
- MakeFunction.regress      MappingPackage1.regress \
- MappingPackage2.regress   MappingPackage3.regress \
- Matrix.regress            Multiset.regress \
+ LyndonWord.regress             Magma.regress \
+ MakeFunction.regress           MappingPackage1.regress \
+ MappingPackage2.regress        MappingPackage3.regress \
+ Matrix.regress                 Multiset.regress \
  MultivariatePolynomial.regress None.regress \
- Octonion.regress          OneDimensionalArray.regress \
- Operator.regress          OrderedVariableList.regress \
- OrderlyDifferentialPolynomial.regress PartialFraction.regress \
- Permanent.regress         Permutation.regress \
+ Octonion.regress               OneDimensionalArray.regress \
+ Operator.regress               OrderedVariableList.regress \
+ OrderlyDifferentialPolynomial.regress \
+ PartialFraction.regress \
+ Permanent.regress              Permutation.regress \
  PlaneAlgebraicCurvePlot.regress \
- Polynomial.regress        Quaternion.regress \
- RadixExpansion.regress    RealClosure.regress \
- RealSolvePackage.regress  RegularTriangularSet.regress \
- RomanNumeral.regress      Segment.regress \
- Set.regress
-
-# this requires graphics
+ Polynomial.regress             Quaternion.regress \
+ RadixExpansion.regress         RealClosure.regress \
+ RealSolvePackage.regress       RegularTriangularSet.regress \
+ RomanNumeral.regress           Segment.regress \
+ Set.regress                    SingleInteger.regress \
+ SparseTable.regress            SquareMatrix.regress \
+ SquareFreeRegularTriangularSet.regress \
+ Stream.regress                 String.regress \
+ StringTable.regress            Symbol.regress \
+ Table.regress                  TextFile.regress \
+ TwoDimensionalArray.regress \
+ UnivariatePolynomial.regress   UniversalSegment.regress \
+ Vector.regress                 Void.regress \
+ WuWenTsunTriangularSet.regress XPBWPolynomial.regress \
+ XPolynomial.regress            XPolynomialRing.regress \
+ ZeroDimensionalSolvePackage.regress
+# these requires graphics
 # TwoDimensionalViewport
 
 %.regress: %.input
@@ -2339,8 +2367,48 @@ ${HELP}/Factored.help: ${IN}/fr.spad.pamphlet
 	@${TANGLE} -R"Factored.input" ${IN}/fr.spad.pamphlet \
             >${INPUT}/Factored.input
 
+${HELP}/FactoredFunctions2.help: ${IN}/fr.spad.pamphlet
+	@echo 7020 create FactoredFunctions2.help from ${IN}/fr.spad.pamphlet
+	@${TANGLE} -R"FactoredFunctions2.help" ${IN}/fr.spad.pamphlet \
+            >${HELP}/FactoredFunctions2.help
+	@cp ${HELP}/FactoredFunctions2.help ${HELP}/FR2.help
+	@${TANGLE} -R"FactoredFunctions2.input" ${IN}/fr.spad.pamphlet \
+            >${INPUT}/FactoredFunctions2.input
+
+${HELP}/File.help: ${IN}/files.spad.pamphlet
+	@echo 7021 create File.help from ${IN}/files.spad.pamphlet
+	@${TANGLE} -R"File.help" ${IN}/files.spad.pamphlet \
+           >${HELP}/File.help
+	@cp ${HELP}/File.help ${HELP}/FILE.help
+	@${TANGLE} -R"File.input" ${IN}/files.spad.pamphlet \
+            >${INPUT}/File.input
+
+${HELP}/FileName.help: ${IN}/fname.spad.pamphlet
+	@echo 7022 create FileName.help from ${IN}/fname.spad.pamphlet
+	@${TANGLE} -R"FileName.help" ${IN}/fname.spad.pamphlet \
+           >${HELP}/FileName.help
+	@cp ${HELP}/FileName.help ${HELP}/FNAME.help
+	@${TANGLE} -R"FileName.input" ${IN}/fname.spad.pamphlet \
+            >${INPUT}/FileName.input
+
+${HELP}/FlexibleArray.help: ${IN}/array1.spad.pamphlet
+	@echo 7023 create FlexibleArray.help from ${IN}/array1.spad.pamphlet
+	@${TANGLE} -R"FlexibleArray.help" ${IN}/array1.spad.pamphlet \
+           >${HELP}/FlexibleArray.help
+	@cp ${HELP}/FlexibleArray.help ${HELP}/FARRAY.help
+	@${TANGLE} -R"FlexibleArray.input" ${IN}/array1.spad.pamphlet \
+            >${INPUT}/FlexibleArray.input
+
+${HELP}/Float.help: ${IN}/float.spad.pamphlet
+	@echo 7024 create Float.help from ${IN}/float.spad.pamphlet
+	@${TANGLE} -R"Float.help" ${IN}/float.spad.pamphlet \
+           >${HELP}/Float.help
+	@cp ${HELP}/Float.help ${HELP}/FLOAT.help
+	@${TANGLE} -R"Float.input" ${IN}/float.spad.pamphlet \
+            >${INPUT}/Float.input
+
 ${HELP}/Fraction.help: ${IN}/fraction.spad.pamphlet
-	@echo 7020 create Fraction.help from ${IN}/fraction.spad.pamphlet
+	@echo 7025 create Fraction.help from ${IN}/fraction.spad.pamphlet
 	@${TANGLE} -R"Fraction.help" ${IN}/fraction.spad.pamphlet \
             >${HELP}/Fraction.help
 	@cp ${HELP}/Fraction.help ${HELP}/FR.help
@@ -2348,7 +2416,7 @@ ${HELP}/Fraction.help: ${IN}/fraction.spad.pamphlet
             >${INPUT}/Fraction.input
 
 ${HELP}/FullPartialFractionExpansion.help: ${IN}/fparfrac.spad.pamphlet
-	@echo 7021 create FullPartialFractionExpansion.help from \
+	@echo 7026 create FullPartialFractionExpansion.help from \
             ${IN}/fparfrac.spad.pamphlet
 	@${TANGLE} -R"FullPartialFractionExpansion.help" \
            ${IN}/fparfrac.spad.pamphlet \
@@ -2360,7 +2428,7 @@ ${HELP}/FullPartialFractionExpansion.help: ${IN}/fparfrac.spad.pamphlet
 
 ${HELP}/GeneralDistributedMultivariatePolynomial.help: \
             ${IN}/gdpoly.spad.pamphlet
-	@echo 7022 create GeneralDistributedMultivariatePolynomial.help \
+	@echo 7027 create GeneralDistributedMultivariatePolynomial.help \
             from ${IN}/gdpoly.spad.pamphlet
 	@${TANGLE} -R"GeneralDistributedMultivariatePolynomial.help" \
            ${IN}/gdpoly.spad.pamphlet \
@@ -2372,7 +2440,7 @@ ${HELP}/GeneralDistributedMultivariatePolynomial.help: \
             >${INPUT}/GeneralDistributedMultivariatePolynomial.input
 
 ${HELP}/GeneralSparseTable.help: ${IN}/table.spad.pamphlet
-	@echo 7023 create GeneralSparseTable.help from \
+	@echo 7028 create GeneralSparseTable.help from \
             ${IN}/table.spad.pamphlet
 	@${TANGLE} -R"GeneralSparseTable.help" ${IN}/table.spad.pamphlet \
             >${HELP}/GeneralSparseTable.help
@@ -2381,7 +2449,7 @@ ${HELP}/GeneralSparseTable.help: ${IN}/table.spad.pamphlet
             >${INPUT}/GeneralSparseTable.input
 
 ${HELP}/GroebnerFactorizationPackage.help: ${IN}/groebf.spad.pamphlet
-	@echo 7024 create GroebnerFactorizationPackage.help \
+	@echo 7029 create GroebnerFactorizationPackage.help \
             from ${IN}/groebf.spad.pamphlet
 	@${TANGLE} -R"GroebnerFactorizationPackage.help" \
            ${IN}/groebf.spad.pamphlet \
@@ -2392,14 +2460,14 @@ ${HELP}/GroebnerFactorizationPackage.help: ${IN}/groebf.spad.pamphlet
             >${INPUT}/GroebnerFactorizationPackage.input
 
 ${HELP}/Heap.help: ${IN}/bags.spad.pamphlet
-	@echo 7025 create Heap.help from ${IN}/bags.spad.pamphlet
+	@echo 7030 create Heap.help from ${IN}/bags.spad.pamphlet
 	@${TANGLE} -R"Heap.help" ${IN}/bags.spad.pamphlet >${HELP}/Heap.help
 	@cp ${HELP}/Heap.help ${HELP}/HEAP.help
 	@${TANGLE} -R"Heap.input" ${IN}/bags.spad.pamphlet \
             >${INPUT}/Heap.input
 
 ${HELP}/HexadecimalExpansion.help: ${IN}/radix.spad.pamphlet
-	@echo 7026 create HexadecimalExpansion.help \
+	@echo 7031 create HexadecimalExpansion.help \
             from ${IN}/radix.spad.pamphlet
 	@${TANGLE} -R"HexadecimalExpansion.help" ${IN}/radix.spad.pamphlet \
             >${HELP}/HexadecimalExpansion.help
@@ -2409,7 +2477,7 @@ ${HELP}/HexadecimalExpansion.help: ${IN}/radix.spad.pamphlet
 
 ${HELP}/HomogeneousDistributedMultivariatePolynomial.help: \
             ${IN}/gdpoly.spad.pamphlet
-	@echo 7027 create HomogeneousDistributedMultivariatePolynomial.help \
+	@echo 7032 create HomogeneousDistributedMultivariatePolynomial.help \
             from ${IN}/gdpoly.spad.pamphlet
 	@${TANGLE} -R"HomogeneousDistributedMultivariatePolynomial.help" \
            ${IN}/gdpoly.spad.pamphlet \
@@ -2421,7 +2489,7 @@ ${HELP}/HomogeneousDistributedMultivariatePolynomial.help: \
             >${INPUT}/HomogeneousDistributedMultivariatePolynomial.input
 
 ${HELP}/Integer.help: ${IN}/integer.spad.pamphlet
-	@echo 7028 create Integer.help from ${IN}/integer.spad.pamphlet
+	@echo 7033 create Integer.help from ${IN}/integer.spad.pamphlet
 	@${TANGLE} -R"Integer.help" ${IN}/integer.spad.pamphlet \
            >${HELP}/Integer.help
 	@cp ${HELP}/Integer.help ${HELP}/INT.help
@@ -2429,7 +2497,7 @@ ${HELP}/Integer.help: ${IN}/integer.spad.pamphlet
             >${INPUT}/Integer.input
 
 ${HELP}/IntegerLinearDependence.help: ${IN}/lindep.spad.pamphlet
-	@echo 7029 create IntegerLinearDependence.help from \
+	@echo 7034 create IntegerLinearDependence.help from \
            ${IN}/lindep.spad.pamphlet
 	@${TANGLE} -R"IntegerLinearDependence.help" \
            ${IN}/lindep.spad.pamphlet \
@@ -2440,7 +2508,7 @@ ${HELP}/IntegerLinearDependence.help: ${IN}/lindep.spad.pamphlet
             >${INPUT}/IntegerLinearDependence.input
 
 ${HELP}/IntegerNumberTheoryFunctions.help: ${IN}/numtheor.spad.pamphlet
-	@echo 7030 create IntegerNumberTheoryFunctions.help \
+	@echo 7035 create IntegerNumberTheoryFunctions.help \
             from ${IN}/numtheor.spad.pamphlet
 	@${TANGLE} -R"IntegerNumberTheoryFunctions.help" \
            ${IN}/numtheor.spad.pamphlet \
@@ -2452,7 +2520,7 @@ ${HELP}/IntegerNumberTheoryFunctions.help: ${IN}/numtheor.spad.pamphlet
             >${INPUT}/IntegerNumberTheoryFunctions.input
 
 ${HELP}/Kernel.help: ${IN}/kl.spad.pamphlet
-	@echo 7031 create Kernel.help from ${IN}/kl.spad.pamphlet
+	@echo 7036 create Kernel.help from ${IN}/kl.spad.pamphlet
 	@${TANGLE} -R"Kernel.help" ${IN}/kl.spad.pamphlet \
            >${HELP}/Kernel.help
 	@cp ${HELP}/Kernel.help ${HELP}/KERNEL.help
@@ -2460,7 +2528,7 @@ ${HELP}/Kernel.help: ${IN}/kl.spad.pamphlet
             >${INPUT}/Kernel.input
 
 ${HELP}/KeyedAccessFile.help: ${IN}/files.spad.pamphlet
-	@echo 7032 create KeyedAccessFile.help from ${IN}/files.spad.pamphlet
+	@echo 7037 create KeyedAccessFile.help from ${IN}/files.spad.pamphlet
 	@${TANGLE} -R"KeyedAccessFile.help" ${IN}/files.spad.pamphlet \
            >${HELP}/KeyedAccessFile.help
 	@cp ${HELP}/KeyedAccessFile.help ${HELP}/KAFILE.help
@@ -2468,7 +2536,7 @@ ${HELP}/KeyedAccessFile.help: ${IN}/files.spad.pamphlet
             >${INPUT}/KeyedAccessFile.input
 
 ${HELP}/LexTriangularPackage.help: ${IN}/zerodim.spad.pamphlet
-	@echo 7033 create LexTriangularPackage.help from \
+	@echo 7038 create LexTriangularPackage.help from \
            ${IN}/zerodim.spad.pamphlet
 	@${TANGLE} -R"LexTriangularPackage.help" ${IN}/zerodim.spad.pamphlet \
            >${HELP}/LexTriangularPackage.help
@@ -2477,7 +2545,7 @@ ${HELP}/LexTriangularPackage.help: ${IN}/zerodim.spad.pamphlet
             >${INPUT}/LexTriangularPackage.input
 
 ${HELP}/Library.help: ${IN}/files.spad.pamphlet
-	@echo 7034 create Library.help from ${IN}/files.spad.pamphlet
+	@echo 7039 create Library.help from ${IN}/files.spad.pamphlet
 	@${TANGLE} -R"Library.help" ${IN}/files.spad.pamphlet \
            >${HELP}/Library.help
 	@cp ${HELP}/Library.help ${HELP}/LIB.help
@@ -2485,7 +2553,7 @@ ${HELP}/Library.help: ${IN}/files.spad.pamphlet
             >${INPUT}/Library.input
 
 ${HELP}/LieExponentials.help: ${IN}/xlpoly.spad.pamphlet
-	@echo 7035 create LieExponentials.help from ${IN}/xlpoly.spad.pamphlet
+	@echo 7040 create LieExponentials.help from ${IN}/xlpoly.spad.pamphlet
 	@${TANGLE} -R"LieExponentials.help" ${IN}/xlpoly.spad.pamphlet \
            >${HELP}/LieExponentials.help
 	@cp ${HELP}/LieExponentials.help ${HELP}/LEXP.help
@@ -2493,7 +2561,7 @@ ${HELP}/LieExponentials.help: ${IN}/xlpoly.spad.pamphlet
             >${INPUT}/LieExponentials.input
 
 ${HELP}/LiePolynomial.help: ${IN}/xlpoly.spad.pamphlet
-	@echo 7035 create LiePolynomial.help from ${IN}/xlpoly.spad.pamphlet
+	@echo 7041 create LiePolynomial.help from ${IN}/xlpoly.spad.pamphlet
 	@${TANGLE} -R"LiePolynomial.help" ${IN}/xlpoly.spad.pamphlet \
            >${HELP}/LiePolynomial.help
 	@cp ${HELP}/LiePolynomial.help ${HELP}/LPOLY.help
@@ -2501,7 +2569,7 @@ ${HELP}/LiePolynomial.help: ${IN}/xlpoly.spad.pamphlet
             >${INPUT}/LiePolynomial.input
 
 ${HELP}/LinearOrdinaryDifferentialOperator.help: ${IN}/lodo.spad.pamphlet
-	@echo 7037 create LinearOrdinaryDifferentialOperator.help \
+	@echo 7042 create LinearOrdinaryDifferentialOperator.help \
            from ${IN}/lodo.spad.pamphlet
 	@${TANGLE} -R"LinearOrdinaryDifferentialOperator.help" \
           ${IN}/lodo.spad.pamphlet \
@@ -2512,7 +2580,7 @@ ${HELP}/LinearOrdinaryDifferentialOperator.help: ${IN}/lodo.spad.pamphlet
             >${INPUT}/LinearOrdinaryDifferentialOperator.input
 
 ${HELP}/LinearOrdinaryDifferentialOperator1.help: ${IN}/lodo.spad.pamphlet
-	@echo 7038 create LinearOrdinaryDifferentialOperator1.help \
+	@echo 7043 create LinearOrdinaryDifferentialOperator1.help \
            from ${IN}/lodo.spad.pamphlet
 	@${TANGLE} -R"LinearOrdinaryDifferentialOperator1.help" \
           ${IN}/lodo.spad.pamphlet \
@@ -2523,7 +2591,7 @@ ${HELP}/LinearOrdinaryDifferentialOperator1.help: ${IN}/lodo.spad.pamphlet
             >${INPUT}/LinearOrdinaryDifferentialOperator1.input
 
 ${HELP}/LinearOrdinaryDifferentialOperator2.help: ${IN}/lodo.spad.pamphlet
-	@echo 7039 create LinearOrdinaryDifferentialOperator2.help \
+	@echo 7044 create LinearOrdinaryDifferentialOperator2.help \
            from ${IN}/lodo.spad.pamphlet
 	@${TANGLE} -R"LinearOrdinaryDifferentialOperator2.help" \
           ${IN}/lodo.spad.pamphlet \
@@ -2534,7 +2602,7 @@ ${HELP}/LinearOrdinaryDifferentialOperator2.help: ${IN}/lodo.spad.pamphlet
             >${INPUT}/LinearOrdinaryDifferentialOperator2.input
 
 ${HELP}/List.help: ${IN}/list.spad.pamphlet
-	@echo 7040 create List.help from ${IN}/list.spad.pamphlet
+	@echo 7045 create List.help from ${IN}/list.spad.pamphlet
 	@${TANGLE} -R"List.help" ${IN}/list.spad.pamphlet \
            >${HELP}/List.help
 	@cp ${HELP}/List.help ${HELP}/LIST.help
@@ -2542,7 +2610,7 @@ ${HELP}/List.help: ${IN}/list.spad.pamphlet
             >${INPUT}/List.input
 
 ${HELP}/LyndonWord.help: ${IN}/xlpoly.spad.pamphlet
-	@echo 7041 create LyndonWord.help from ${IN}/xlpoly.spad.pamphlet
+	@echo 7046 create LyndonWord.help from ${IN}/xlpoly.spad.pamphlet
 	@${TANGLE} -R"LyndonWord.help" ${IN}/xlpoly.spad.pamphlet \
             >${HELP}/LyndonWord.help
 	@cp ${HELP}/LyndonWord.help ${HELP}/LWORD.help
@@ -2550,7 +2618,7 @@ ${HELP}/LyndonWord.help: ${IN}/xlpoly.spad.pamphlet
             >${INPUT}/LyndonWord.input
 
 ${HELP}/Magma.help: ${IN}/xlpoly.spad.pamphlet
-	@echo 7042 create Magma.help from ${IN}/xlpoly.spad.pamphlet
+	@echo 7047 create Magma.help from ${IN}/xlpoly.spad.pamphlet
 	@${TANGLE} -R"Magma.help" ${IN}/xlpoly.spad.pamphlet \
             >${HELP}/Magma.help
 	@cp ${HELP}/Magma.help ${HELP}/MAGMA.help
@@ -2558,7 +2626,7 @@ ${HELP}/Magma.help: ${IN}/xlpoly.spad.pamphlet
             >${INPUT}/Magma.input
 
 ${HELP}/MakeFunction.help: ${IN}/mkfunc.spad.pamphlet
-	@echo 7043 create MakeFunction.help from ${IN}/mkfunc.spad.pamphlet
+	@echo 7048 create MakeFunction.help from ${IN}/mkfunc.spad.pamphlet
 	@${TANGLE} -R"MakeFunction.help" ${IN}/mkfunc.spad.pamphlet \
            >${HELP}/MakeFunction.help
 	@cp ${HELP}/MakeFunction.help ${HELP}/MKFUNC.help
@@ -2566,7 +2634,7 @@ ${HELP}/MakeFunction.help: ${IN}/mkfunc.spad.pamphlet
             >${INPUT}/MakeFunction.input
 
 ${HELP}/MappingPackage1.help: ${IN}/mappkg.spad.pamphlet
-	@echo 7044 create MappingPackage1.help from ${IN}/mappkg.spad.pamphlet
+	@echo 7049 create MappingPackage1.help from ${IN}/mappkg.spad.pamphlet
 	@${TANGLE} -R"MappingPackage1.help" ${IN}/mappkg.spad.pamphlet \
            >${HELP}/MappingPackage1.help
 	@cp ${HELP}/MappingPackage1.help ${HELP}/MAPPKG1.help
@@ -2574,7 +2642,7 @@ ${HELP}/MappingPackage1.help: ${IN}/mappkg.spad.pamphlet
             >${INPUT}/MappingPackage1.input
 
 ${HELP}/MappingPackage2.help: ${IN}/mappkg.spad.pamphlet
-	@echo 7045 create MappingPackage2.help from ${IN}/mappkg.spad.pamphlet
+	@echo 7050 create MappingPackage2.help from ${IN}/mappkg.spad.pamphlet
 	@${TANGLE} -R"MappingPackage2.help" ${IN}/mappkg.spad.pamphlet \
            >${HELP}/MappingPackage2.help
 	@cp ${HELP}/MappingPackage2.help ${HELP}/MAPPKG2.help
@@ -2582,7 +2650,7 @@ ${HELP}/MappingPackage2.help: ${IN}/mappkg.spad.pamphlet
             >${INPUT}/MappingPackage2.input
 
 ${HELP}/MappingPackage3.help: ${IN}/mappkg.spad.pamphlet
-	@echo 7046 create MappingPackage3.help from ${IN}/mappkg.spad.pamphlet
+	@echo 7051 create MappingPackage3.help from ${IN}/mappkg.spad.pamphlet
 	@${TANGLE} -R"MappingPackage3.help" ${IN}/mappkg.spad.pamphlet \
            >${HELP}/MappingPackage3.help
 	@cp ${HELP}/MappingPackage3.help ${HELP}/MAPPKG3.help
@@ -2590,7 +2658,7 @@ ${HELP}/MappingPackage3.help: ${IN}/mappkg.spad.pamphlet
             >${INPUT}/MappingPackage3.input
 
 ${HELP}/Matrix.help: ${IN}/matrix.spad.pamphlet
-	@echo 7047 create Matrix.help from ${IN}/matrix.spad.pamphlet
+	@echo 7052 create Matrix.help from ${IN}/matrix.spad.pamphlet
 	@${TANGLE} -R"Matrix.help" ${IN}/matrix.spad.pamphlet \
            >${HELP}/Matrix.help
 	@cp ${HELP}/Matrix.help ${HELP}/MATRIX.help
@@ -2598,7 +2666,7 @@ ${HELP}/Matrix.help: ${IN}/matrix.spad.pamphlet
             >${INPUT}/Matrix.input
 
 ${HELP}/Multiset.help: ${IN}/mset.spad.pamphlet
-	@echo 7048 create Multiset.help from ${IN}/mset.spad.pamphlet
+	@echo 7053 create Multiset.help from ${IN}/mset.spad.pamphlet
 	@${TANGLE} -R"Multiset.help" ${IN}/mset.spad.pamphlet \
            >${HELP}/Multiset.help
 	@cp ${HELP}/Multiset.help ${HELP}/MSET.help
@@ -2606,7 +2674,7 @@ ${HELP}/Multiset.help: ${IN}/mset.spad.pamphlet
             >${INPUT}/Multiset.input
 
 ${HELP}/MultivariatePolynomial.help: ${IN}/multpoly.spad.pamphlet
-	@echo 7049 create MultivariatePolynomial.help from \
+	@echo 7054 create MultivariatePolynomial.help from \
            ${IN}/multpoly.spad.pamphlet
 	@${TANGLE} -R"MultivariatePolynomial.help" \
            ${IN}/multpoly.spad.pamphlet \
@@ -2617,13 +2685,13 @@ ${HELP}/MultivariatePolynomial.help: ${IN}/multpoly.spad.pamphlet
             >${INPUT}/MultivariatePolynomial.input
 
 ${HELP}/None.help: ${IN}/any.spad.pamphlet
-	@echo 7050 create None.help from ${IN}/any.spad.pamphlet
+	@echo 7055 create None.help from ${IN}/any.spad.pamphlet
 	@${TANGLE} -R"None.help" ${IN}/any.spad.pamphlet >${HELP}/None.help
 	@cp ${HELP}/None.help ${HELP}/NONE.help
 	@${TANGLE} -R"None.input" ${IN}/any.spad.pamphlet >${INPUT}/None.input
 
 ${HELP}/Octonion.help: ${IN}/oct.spad.pamphlet
-	@echo 7051 create Octonion.help from ${IN}/oct.spad.pamphlet
+	@echo 7056 create Octonion.help from ${IN}/oct.spad.pamphlet
 	@${TANGLE} -R"Octonion.help" ${IN}/oct.spad.pamphlet \
            >${HELP}/Octonion.help
 	@cp ${HELP}/Octonion.help ${HELP}/OCT.help
@@ -2631,7 +2699,7 @@ ${HELP}/Octonion.help: ${IN}/oct.spad.pamphlet
             >${INPUT}/Octonion.input
 
 ${HELP}/OneDimensionalArray.help: ${IN}/array1.spad.pamphlet
-	@echo 7052 create OneDimensionalArray.help from \
+	@echo 7057 create OneDimensionalArray.help from \
            ${IN}/array1.spad.pamphlet
 	@${TANGLE} -R"OneDimensionalArray.help" ${IN}/array1.spad.pamphlet \
            >${HELP}/OneDimensionalArray.help
@@ -2640,7 +2708,7 @@ ${HELP}/OneDimensionalArray.help: ${IN}/array1.spad.pamphlet
             >${INPUT}/OneDimensionalArray.input
 
 ${HELP}/Operator.help: ${IN}/opalg.spad.pamphlet
-	@echo 7053 create Operator.help from ${IN}/opalg.spad.pamphlet
+	@echo 7058 create Operator.help from ${IN}/opalg.spad.pamphlet
 	@${TANGLE} -R"Operator.help" ${IN}/opalg.spad.pamphlet \
            >${HELP}/Operator.help
 	@cp ${HELP}/Operator.help ${HELP}/OP.help
@@ -2648,7 +2716,7 @@ ${HELP}/Operator.help: ${IN}/opalg.spad.pamphlet
             >${INPUT}/Operator.input
 
 ${HELP}/OrderedVariableList.help: ${IN}/variable.spad.pamphlet
-	@echo 7054 create OrderedVariableList.help from \
+	@echo 7059 create OrderedVariableList.help from \
            ${IN}/variable.spad.pamphlet
 	@${TANGLE} -R"OrderedVariableList.help" ${IN}/variable.spad.pamphlet \
            >${HELP}/OrderedVariableList.help
@@ -2657,7 +2725,7 @@ ${HELP}/OrderedVariableList.help: ${IN}/variable.spad.pamphlet
             >${INPUT}/OrderedVariableList.input
 
 ${HELP}/OrderlyDifferentialPolynomial.help: ${IN}/dpolcat.spad.pamphlet
-	@echo 7055 create OrderlyDifferentialPolynomial.help from \
+	@echo 7060 create OrderlyDifferentialPolynomial.help from \
            ${IN}/dpolcat.spad.pamphlet
 	@${TANGLE} -R"OrderlyDifferentialPolynomial.help" \
            ${IN}/dpolcat.spad.pamphlet \
@@ -2668,7 +2736,7 @@ ${HELP}/OrderlyDifferentialPolynomial.help: ${IN}/dpolcat.spad.pamphlet
             >${INPUT}/OrderlyDifferentialPolynomial.input
 
 ${HELP}/PartialFraction.help: ${IN}/pfr.spad.pamphlet
-	@echo 7056 create PartialFraction.help from ${IN}/pfr.spad.pamphlet
+	@echo 7061 create PartialFraction.help from ${IN}/pfr.spad.pamphlet
 	@${TANGLE} -R"PartialFraction.help" ${IN}/pfr.spad.pamphlet \
            >${HELP}/PartialFraction.help
 	@cp ${HELP}/PartialFraction.help ${HELP}/PFR.help
@@ -2676,23 +2744,23 @@ ${HELP}/PartialFraction.help: ${IN}/pfr.spad.pamphlet
             >${INPUT}/PartialFraction.input
 
 ${HELP}/Permanent.help: ${IN}/perman.spad.pamphlet
-	@echo 7057 create Permanent.help from ${IN}/perman.spad.pamphlet
+	@echo 7062 create Permanent.help from ${IN}/perman.spad.pamphlet
 	@${TANGLE} -R"Permanent.help" ${IN}/perman.spad.pamphlet \
            >${HELP}/Permanent.help
 	@cp ${HELP}/Permanent.help ${HELP}/PERMAN.help
 	@${TANGLE} -R"Permanent.input" ${IN}/perman.spad.pamphlet \
             >${INPUT}/Permanent.input
 
-${HELP}/Polynomial.help: ${IN}/multpoly.spad.pamphlet
-	@echo 7058 create Polynomial.help from ${IN}/multpoly.spad.pamphlet
-	@${TANGLE} -R"Polynomial.help" ${IN}/multpoly.spad.pamphlet \
-           >${HELP}/Polynomial.help
-	@cp ${HELP}/Polynomial.help ${HELP}/POLY.help
-	@${TANGLE} -R"Polynomial.input" ${IN}/multpoly.spad.pamphlet \
-            >${INPUT}/Polynomial.input
+${HELP}/Permutation.help: ${IN}/perm.spad.pamphlet
+	@echo 7063 create Permutation.help from ${IN}/perm.spad.pamphlet
+	@${TANGLE} -R"Permutation.help" ${IN}/perm.spad.pamphlet \
+           >${HELP}/Permutation.help
+	@cp ${HELP}/Permutation.help ${HELP}/PERM.help
+	@${TANGLE} -R"Permutation.input" ${IN}/perm.spad.pamphlet \
+            >${INPUT}/Permutation.input
 
 ${HELP}/PlaneAlgebraicCurvePlot.help: ${IN}/acplot.spad.pamphlet
-	@echo 7059 create PlaneAlgebraicCurvePlot.help from \
+	@echo 7064 create PlaneAlgebraicCurvePlot.help from \
             ${IN}/acplot.spad.pamphlet
 	@${TANGLE} -R"PlaneAlgebraicCurvePlot.help" \
           ${IN}/acplot.spad.pamphlet \
@@ -2702,16 +2770,16 @@ ${HELP}/PlaneAlgebraicCurvePlot.help: ${IN}/acplot.spad.pamphlet
            ${IN}/acplot.spad.pamphlet \
             >${INPUT}/PlaneAlgebraicCurvePlot.input
 
-${HELP}/Permutation.help: ${IN}/perm.spad.pamphlet
-	@echo 7060 create Permutation.help from ${IN}/perm.spad.pamphlet
-	@${TANGLE} -R"Permutation.help" ${IN}/perm.spad.pamphlet \
-           >${HELP}/Permutation.help
-	@cp ${HELP}/Permutation.help ${HELP}/PERM.help
-	@${TANGLE} -R"Permutation.input" ${IN}/perm.spad.pamphlet \
-            >${INPUT}/Permutation.input
+${HELP}/Polynomial.help: ${IN}/multpoly.spad.pamphlet
+	@echo 7065 create Polynomial.help from ${IN}/multpoly.spad.pamphlet
+	@${TANGLE} -R"Polynomial.help" ${IN}/multpoly.spad.pamphlet \
+           >${HELP}/Polynomial.help
+	@cp ${HELP}/Polynomial.help ${HELP}/POLY.help
+	@${TANGLE} -R"Polynomial.input" ${IN}/multpoly.spad.pamphlet \
+            >${INPUT}/Polynomial.input
 
 ${HELP}/Quaternion.help: ${IN}/quat.spad.pamphlet
-	@echo 7061 create Quaternion.help from ${IN}/quat.spad.pamphlet
+	@echo 7066 create Quaternion.help from ${IN}/quat.spad.pamphlet
 	@${TANGLE} -R"Quaternion.help" ${IN}/quat.spad.pamphlet \
            >${HELP}/Quaternion.help
 	@cp ${HELP}/Quaternion.help ${HELP}/QUAT.help
@@ -2719,7 +2787,7 @@ ${HELP}/Quaternion.help: ${IN}/quat.spad.pamphlet
             >${INPUT}/Quaternion.input
 
 ${HELP}/RadixExpansion.help: ${IN}/radix.spad.pamphlet
-	@echo 7062 create RadixExpansion.help from ${IN}/radix.spad.pamphlet
+	@echo 7067 create RadixExpansion.help from ${IN}/radix.spad.pamphlet
 	@${TANGLE} -R"RadixExpansion.help" ${IN}/radix.spad.pamphlet \
            >${HELP}/RadixExpansion.help
 	@cp ${HELP}/RadixExpansion.help ${HELP}/RADIX.help
@@ -2727,7 +2795,7 @@ ${HELP}/RadixExpansion.help: ${IN}/radix.spad.pamphlet
             >${INPUT}/RadixExpansion.input
 
 ${HELP}/RealClosure.help: ${IN}/reclos.spad.pamphlet
-	@echo 7063 create RealClosure.help from ${IN}/reclos.spad.pamphlet
+	@echo 7068 create RealClosure.help from ${IN}/reclos.spad.pamphlet
 	@${TANGLE} -R"RealClosure.help" ${IN}/reclos.spad.pamphlet \
            >${HELP}/RealClosure.help
 	@cp ${HELP}/RealClosure.help ${HELP}/RECLOS.help
@@ -2735,7 +2803,7 @@ ${HELP}/RealClosure.help: ${IN}/reclos.spad.pamphlet
             >${INPUT}/RealClosure.input
 
 ${HELP}/RealSolvePackage.help: ${IN}/acplot.spad.pamphlet
-	@echo 7064 create RealSolvePackage.help from ${IN}/acplot.spad.pamphlet
+	@echo 7069 create RealSolvePackage.help from ${IN}/acplot.spad.pamphlet
 	@${TANGLE} -R"RealSolvePackage.help" ${IN}/acplot.spad.pamphlet \
            >${HELP}/RealSolvePackage.help
 	@cp ${HELP}/RealSolvePackage.help ${HELP}/REALSOLV.help
@@ -2743,7 +2811,7 @@ ${HELP}/RealSolvePackage.help: ${IN}/acplot.spad.pamphlet
             >${INPUT}/RealSolvePackage.input
 
 ${HELP}/RegularTriangularSet.help: ${IN}/regset.spad.pamphlet
-	@echo 7065 create RegularTriangularSet.help from \
+	@echo 7070 create RegularTriangularSet.help from \
           ${IN}/regset.spad.pamphlet
 	@${TANGLE} -R"RegularTriangularSet.help" ${IN}/regset.spad.pamphlet \
            >${HELP}/RegularTriangularSet.help
@@ -2752,7 +2820,7 @@ ${HELP}/RegularTriangularSet.help: ${IN}/regset.spad.pamphlet
             >${INPUT}/RegularTriangularSet.input
 
 ${HELP}/RomanNumeral.help: ${IN}/integer.spad.pamphlet
-	@echo 7066 create RomanNumeral.help from ${IN}/integer.spad.pamphlet
+	@echo 7071 create RomanNumeral.help from ${IN}/integer.spad.pamphlet
 	@${TANGLE} -R"RomanNumeral.help" ${IN}/integer.spad.pamphlet \
            >${HELP}/RomanNumeral.help
 	@cp ${HELP}/RomanNumeral.help ${HELP}/ROMAN.help
@@ -2760,7 +2828,7 @@ ${HELP}/RomanNumeral.help: ${IN}/integer.spad.pamphlet
             >${INPUT}/RomanNumeral.input
 
 ${HELP}/Segment.help: ${IN}/seg.spad.pamphlet
-	@echo 7067 create Segment.help from ${IN}/seg.spad.pamphlet
+	@echo 7072 create Segment.help from ${IN}/seg.spad.pamphlet
 	@${TANGLE} -R"Segment.help" ${IN}/seg.spad.pamphlet \
            >${HELP}/Segment.help
 	@cp ${HELP}/Segment.help ${HELP}/SEG.help
@@ -2768,15 +2836,107 @@ ${HELP}/Segment.help: ${IN}/seg.spad.pamphlet
             >${INPUT}/Segment.input
 
 ${HELP}/Set.help: ${IN}/sets.spad.pamphlet
-	@echo 7068 create Set.help from ${IN}/sets.spad.pamphlet
+	@echo 7073 create Set.help from ${IN}/sets.spad.pamphlet
 	@${TANGLE} -R"Set.help" ${IN}/sets.spad.pamphlet \
            >${HELP}/Set.help
 	@cp ${HELP}/Set.help ${HELP}/SET.help
 	@${TANGLE} -R"Set.input" ${IN}/sets.spad.pamphlet \
             >${INPUT}/Set.input
 
+${HELP}/SingleInteger.help: ${IN}/si.spad.pamphlet
+	@echo 7074 create SingleInteger.help from ${IN}/si.spad.pamphlet
+	@${TANGLE} -R"SingleInteger.help" ${IN}/si.spad.pamphlet \
+           >${HELP}/SingleInteger.help
+	@cp ${HELP}/SingleInteger.help ${HELP}/SINT.help
+	@${TANGLE} -R"SingleInteger.input" ${IN}/si.spad.pamphlet \
+            >${INPUT}/SingleInteger.input
+
+${HELP}/SparseTable.help: ${IN}/table.spad.pamphlet
+	@echo 7075 create SparseTable.help from ${IN}/table.spad.pamphlet
+	@${TANGLE} -R"SparseTable.help" ${IN}/table.spad.pamphlet \
+           >${HELP}/SparseTable.help
+	@cp ${HELP}/SparseTable.help ${HELP}/STBL.help
+	@${TANGLE} -R"SparseTable.input" ${IN}/table.spad.pamphlet \
+            >${INPUT}/SparseTable.input
+
+${HELP}/SquareMatrix.help: ${IN}/matrix.spad.pamphlet
+	@echo 7076 create SquareMatrix.help from ${IN}/matrix.spad.pamphlet
+	@${TANGLE} -R"SquareMatrix.help" ${IN}/matrix.spad.pamphlet \
+           >${HELP}/SquareMatrix.help
+	@cp ${HELP}/SquareMatrix.help ${HELP}/SQMATRIX.help
+	@${TANGLE} -R"SquareMatrix.input" ${IN}/matrix.spad.pamphlet \
+            >${INPUT}/SquareMatrix.input
+
+${HELP}/SquareFreeRegularTriangularSet.help: ${IN}/sregset.spad.pamphlet
+	@echo 7077 create SquareFreeRegularTriangularSet.help from \
+           ${IN}/sregset.spad.pamphlet
+	@${TANGLE} -R"SquareFreeRegularTriangularSet.help" \
+           ${IN}/sregset.spad.pamphlet \
+           >${HELP}/SquareFreeRegularTriangularSet.help
+	@cp ${HELP}/SquareFreeRegularTriangularSet.help ${HELP}/SREGSET.help
+	@${TANGLE} -R"SquareFreeRegularTriangularSet.input" \
+            ${IN}/sregset.spad.pamphlet \
+            >${INPUT}/SquareFreeRegularTriangularSet.input
+
+${HELP}/Stream.help: ${IN}/stream.spad.pamphlet
+	@echo 7078 create Stream.help from ${IN}/stream.spad.pamphlet
+	@${TANGLE} -R"Stream.help" ${IN}/stream.spad.pamphlet \
+           >${HELP}/Stream.help
+	@cp ${HELP}/Stream.help ${HELP}/STREAM.help
+	@${TANGLE} -R"Stream.input" ${IN}/stream.spad.pamphlet \
+            >${INPUT}/Stream.input
+
+${HELP}/String.help: ${IN}/string.spad.pamphlet
+	@echo 7079 create String.help from ${IN}/string.spad.pamphlet
+	@${TANGLE} -R"String.help" ${IN}/string.spad.pamphlet \
+           >${HELP}/String.help
+	@cp ${HELP}/String.help ${HELP}/STRING.help
+	@${TANGLE} -R"String.input" ${IN}/string.spad.pamphlet \
+            >${INPUT}/String.input
+
+${HELP}/StringTable.help: ${IN}/table.spad.pamphlet
+	@echo 7080 create StringTable.help from ${IN}/table.spad.pamphlet
+	@${TANGLE} -R"StringTable.help" ${IN}/table.spad.pamphlet \
+           >${HELP}/StringTable.help
+	@cp ${HELP}/StringTable.help ${HELP}/STRTBL.help
+	@${TANGLE} -R"StringTable.input" ${IN}/table.spad.pamphlet \
+            >${INPUT}/StringTable.input
+
+${HELP}/Symbol.help: ${IN}/symbol.spad.pamphlet
+	@echo 7081 create Symbol.help from ${IN}/symbol.spad.pamphlet
+	@${TANGLE} -R"Symbol.help" ${IN}/symbol.spad.pamphlet \
+           >${HELP}/Symbol.help
+	@cp ${HELP}/Symbol.help ${HELP}/SYMBOL.help
+	@${TANGLE} -R"Symbol.input" ${IN}/symbol.spad.pamphlet \
+            >${INPUT}/Symbol.input
+
+${HELP}/Table.help: ${IN}/table.spad.pamphlet
+	@echo 7082 create Table.help from ${IN}/table.spad.pamphlet
+	@${TANGLE} -R"Table.help" ${IN}/table.spad.pamphlet \
+           >${HELP}/Table.help
+	@cp ${HELP}/Table.help ${HELP}/TABLE.help
+	@${TANGLE} -R"Table.input" ${IN}/table.spad.pamphlet \
+            >${INPUT}/Table.input
+
+${HELP}/TextFile.help: ${IN}/files.spad.pamphlet
+	@echo 7083 create TextFile.help from ${IN}/files.spad.pamphlet
+	@${TANGLE} -R"TextFile.help" ${IN}/files.spad.pamphlet \
+           >${HELP}/TextFile.help
+	@cp ${HELP}/TextFile.help ${HELP}/TEXTFILE.help
+	@${TANGLE} -R"TextFile.input" ${IN}/files.spad.pamphlet \
+            >${INPUT}/TextFile.input
+
+${HELP}/TwoDimensionalArray.help: ${IN}/array2.spad.pamphlet
+	@echo 7084 create TwoDimensionalArray.help from \
+           ${IN}/array2.spad.pamphlet
+	@${TANGLE} -R"TwoDimensionalArray.help" ${IN}/array2.spad.pamphlet \
+           >${HELP}/TwoDimensionalArray.help
+	@cp ${HELP}/TwoDimensionalArray.help ${HELP}/ARRAY2.help
+	@${TANGLE} -R"TwoDimensionalArray.input" ${IN}/array2.spad.pamphlet \
+            >${INPUT}/TwoDimensionalArray.input
+
 ${HELP}/TwoDimensionalViewport.help: ${IN}/view2d.spad.pamphlet
-	@echo 7069 create TwoDimensionalViewport.help from \
+	@echo 7085 create TwoDimensionalViewport.help from \
            ${IN}/view2d.spad.pamphlet
 	@${TANGLE} -R"TwoDimensionalViewport.help" \
            ${IN}/view2d.spad.pamphlet \
@@ -2784,6 +2944,86 @@ ${HELP}/TwoDimensionalViewport.help: ${IN}/view2d.spad.pamphlet
 	@cp ${HELP}/TwoDimensionalViewport.help ${HELP}/VIEW2D.help
 # Note:no input regression file due to graphics
 
+${HELP}/UnivariatePolynomial.help: ${IN}/poly.spad.pamphlet
+	@echo 7086 create UnivariatePolynomial.help from \
+           ${IN}/poly.spad.pamphlet
+	@${TANGLE} -R"UnivariatePolynomial.help" ${IN}/poly.spad.pamphlet \
+           >${HELP}/UnivariatePolynomial.help
+	@cp ${HELP}/UnivariatePolynomial.help ${HELP}/UP.help
+	@${TANGLE} -R"UnivariatePolynomial.input" ${IN}/poly.spad.pamphlet \
+            >${INPUT}/UnivariatePolynomial.input
+
+${HELP}/UniversalSegment.help: ${IN}/seg.spad.pamphlet
+	@echo 7087 create UniversalSegment.help from ${IN}/seg.spad.pamphlet
+	@${TANGLE} -R"UniversalSegment.help" ${IN}/seg.spad.pamphlet \
+           >${HELP}/UniversalSegment.help
+	@cp ${HELP}/UniversalSegment.help ${HELP}/UNISEG.help
+	@${TANGLE} -R"UniversalSegment.input" ${IN}/seg.spad.pamphlet \
+            >${INPUT}/UniversalSegment.input
+
+${HELP}/Vector.help: ${IN}/vector.spad.pamphlet
+	@echo 7088 create Vector.help from ${IN}/vector.spad.pamphlet
+	@${TANGLE} -R"Vector.help" ${IN}/vector.spad.pamphlet \
+           >${HELP}/Vector.help
+	@cp ${HELP}/Vector.help ${HELP}/VECTOR.help
+	@${TANGLE} -R"Vector.input" ${IN}/vector.spad.pamphlet \
+            >${INPUT}/Vector.input
+
+${HELP}/Void.help: ${IN}/void.spad.pamphlet
+	@echo 7089 create Void.help from ${IN}/void.spad.pamphlet
+	@${TANGLE} -R"Void.help" ${IN}/void.spad.pamphlet >${HELP}/Void.help
+	@cp ${HELP}/Void.help ${HELP}/VOID.help
+	@${TANGLE} -R"Void.input" ${IN}/void.spad.pamphlet >${INPUT}/Void.input
+
+${HELP}/WuWenTsunTriangularSet.help: ${IN}/triset.spad.pamphlet
+	@echo 7090 create WuWenTsunTriangularSet.help from \
+           ${IN}/triset.spad.pamphlet
+	@${TANGLE} -R"WuWenTsunTriangularSet.help" \
+           ${IN}/triset.spad.pamphlet \
+           >${HELP}/WuWenTsunTriangularSet.help
+	@cp ${HELP}/WuWenTsunTriangularSet.help ${HELP}/WUTSET.help
+	@${TANGLE} -R"WuWenTsunTriangularSet.input" \
+            ${IN}/triset.spad.pamphlet \
+            >${INPUT}/WuWenTsunTriangularSet.input
+
+${HELP}/XPBWPolynomial.help: ${IN}/xlpoly.spad.pamphlet
+	@echo 7091 create XPBWPolynomial.help from \
+           ${IN}/xlpoly.spad.pamphlet
+	@${TANGLE} -R"XPBWPolynomial.help" \
+           ${IN}/xlpoly.spad.pamphlet \
+           >${HELP}/XPBWPolynomial.help
+	@cp ${HELP}/XPBWPolynomial.help ${HELP}/XPBWPOLY.help
+	@${TANGLE} -R"XPBWPolynomial.input" \
+            ${IN}/xlpoly.spad.pamphlet \
+            >${INPUT}/XPBWPolynomial.input
+
+${HELP}/XPolynomial.help: ${IN}/xpoly.spad.pamphlet
+	@echo 7092 create XPolynomial.help from ${IN}/xpoly.spad.pamphlet
+	@${TANGLE} -R"XPolynomial.help" ${IN}/xpoly.spad.pamphlet \
+           >${HELP}/XPolynomial.help
+	@cp ${HELP}/XPolynomial.help ${HELP}/XPOLY.help
+	@${TANGLE} -R"XPolynomial.input" ${IN}/xpoly.spad.pamphlet \
+            >${INPUT}/XPolynomial.input
+
+${HELP}/XPolynomialRing.help: ${IN}/xpoly.spad.pamphlet
+	@echo 7093 create XPolynomialRing.help from ${IN}/xpoly.spad.pamphlet
+	@${TANGLE} -R"XPolynomialRing.help" ${IN}/xpoly.spad.pamphlet \
+           >${HELP}/XPolynomialRing.help
+	@cp ${HELP}/XPolynomialRing.help ${HELP}/XPR.help
+	@${TANGLE} -R"XPolynomialRing.input" ${IN}/xpoly.spad.pamphlet \
+            >${INPUT}/XPolynomialRing.input
+
+${HELP}/ZeroDimensionalSolvePackage.help: ${IN}/zerodim.spad.pamphlet
+	@echo 7094 create ZeroDimensionalSolvePackage.help from \
+           ${IN}/zerodim.spad.pamphlet
+	@${TANGLE} -R"ZeroDimensionalSolvePackage.help" \
+           ${IN}/zerodim.spad.pamphlet \
+           >${HELP}/ZeroDimensionalSolvePackage.help
+	@cp ${HELP}/ZeroDimensionalSolvePackage.help ${HELP}/ZDSOLVE.help
+	@${TANGLE} -R"ZeroDimensionalSolvePackage.input" \
+            ${IN}/zerodim.spad.pamphlet \
+            >${INPUT}/ZeroDimensionalSolvePackage.input
+
 @
 
 \section{The Makefile}
diff --git a/src/algebra/array2.spad.pamphlet b/src/algebra/array2.spad.pamphlet
index ef540c4..38f6ba0 100644
--- a/src/algebra/array2.spad.pamphlet
+++ b/src/algebra/array2.spad.pamphlet
@@ -387,6 +387,452 @@ IndexedTwoDimensionalArray(R,mnRow,mnCol):Exports == Implementation where
 
 @
 \section{domain ARRAY2 TwoDimensionalArray}
+<<TwoDimensionalArray.input>>=
+-- array2.spad.pamphlet TwoDimensionalArray.input
+)spool TwoDimensionalArray.output
+)set message test on
+)set message auto off
+)clear all
+--S 1 of 20
+arr : ARRAY2 INT := new(5,4,0)
+--R 
+--R
+--R        +0  0  0  0+
+--R        |          |
+--R        |0  0  0  0|
+--R        |          |
+--R   (1)  |0  0  0  0|
+--R        |          |
+--R        |0  0  0  0|
+--R        |          |
+--R        +0  0  0  0+
+--R                                            Type: TwoDimensionalArray Integer
+--E 1
+
+--S 2 of 20
+setelt(arr,1,1,17)
+--R 
+--R
+--R   (2)  17
+--R                                                        Type: PositiveInteger
+--E 2
+
+--S 3 of 20
+arr
+--R 
+--R
+--R        +17  0  0  0+
+--R        |           |
+--R        |0   0  0  0|
+--R        |           |
+--R   (3)  |0   0  0  0|
+--R        |           |
+--R        |0   0  0  0|
+--R        |           |
+--R        +0   0  0  0+
+--R                                            Type: TwoDimensionalArray Integer
+--E 3
+
+--S 4 of 20
+elt(arr,1,1)
+--R 
+--R
+--R   (4)  17
+--R                                                        Type: PositiveInteger
+--E 4
+
+--S 5 of 20
+arr(3,2) := 15
+--R 
+--R
+--R   (5)  15
+--R                                                        Type: PositiveInteger
+--E 5
+
+--S 6 of 20
+arr(3,2)
+--R 
+--R
+--R   (6)  15
+--R                                                        Type: PositiveInteger
+--E 6
+
+--S 7 of 20
+row(arr,1)
+--R 
+--R
+--R   (7)  [17,0,0,0]
+--R                                            Type: OneDimensionalArray Integer
+--E 7
+
+--S 8 of 20
+column(arr,1)
+--R 
+--R
+--R   (8)  [17,0,0,0,0]
+--R                                            Type: OneDimensionalArray Integer
+--E 8
+
+--S 9 of 20
+nrows(arr)
+--R 
+--R
+--R   (9)  5
+--R                                                        Type: PositiveInteger
+--E 9
+
+--S 10 of 20
+ncols(arr)
+--R 
+--R
+--R   (10)  4
+--R                                                        Type: PositiveInteger
+--E 10
+
+--S 11 of 20
+map(-,arr)
+--R 
+--R
+--R         +- 17   0    0  0+
+--R         |                |
+--R         | 0     0    0  0|
+--R         |                |
+--R   (11)  | 0    - 15  0  0|
+--R         |                |
+--R         | 0     0    0  0|
+--R         |                |
+--R         + 0     0    0  0+
+--R                                            Type: TwoDimensionalArray Integer
+--E 11
+
+--S 12 of 20
+map((x +-> x + x),arr)
+--R 
+--R
+--R         +34  0   0  0+
+--R         |            |
+--R         |0   0   0  0|
+--R         |            |
+--R   (12)  |0   30  0  0|
+--R         |            |
+--R         |0   0   0  0|
+--R         |            |
+--R         +0   0   0  0+
+--R                                            Type: TwoDimensionalArray Integer
+--E 12
+
+--S 13 of 20
+arrc := copy(arr)
+--R 
+--R
+--R         +17  0   0  0+
+--R         |            |
+--R         |0   0   0  0|
+--R         |            |
+--R   (13)  |0   15  0  0|
+--R         |            |
+--R         |0   0   0  0|
+--R         |            |
+--R         +0   0   0  0+
+--R                                            Type: TwoDimensionalArray Integer
+--E 13
+
+--S 14 of 20
+map!(-,arrc)
+--R 
+--R
+--R         +- 17   0    0  0+
+--R         |                |
+--R         | 0     0    0  0|
+--R         |                |
+--R   (14)  | 0    - 15  0  0|
+--R         |                |
+--R         | 0     0    0  0|
+--R         |                |
+--R         + 0     0    0  0+
+--R                                            Type: TwoDimensionalArray Integer
+--E 14
+
+--S 15 of 20
+arrc
+--R 
+--R
+--R         +- 17   0    0  0+
+--R         |                |
+--R         | 0     0    0  0|
+--R         |                |
+--R   (15)  | 0    - 15  0  0|
+--R         |                |
+--R         | 0     0    0  0|
+--R         |                |
+--R         + 0     0    0  0+
+--R                                            Type: TwoDimensionalArray Integer
+--E 15
+
+--S 16 of 20
+arr
+--R 
+--R
+--R         +17  0   0  0+
+--R         |            |
+--R         |0   0   0  0|
+--R         |            |
+--R   (16)  |0   15  0  0|
+--R         |            |
+--R         |0   0   0  0|
+--R         |            |
+--R         +0   0   0  0+
+--R                                            Type: TwoDimensionalArray Integer
+--E 16
+
+--S 17 of 20
+member?(17,arr)
+--R 
+--R
+--R   (17)  true
+--R                                                                Type: Boolean
+--E 17
+
+--S 18 of 20
+member?(10317,arr)
+--R 
+--R
+--R   (18)  false
+--R                                                                Type: Boolean
+--E 18
+
+--S 19 of 20
+count(17,arr)
+--R 
+--R
+--R   (19)  1
+--R                                                        Type: PositiveInteger
+--E 19
+
+--S 20 of 20
+count(0,arr)
+--R 
+--R
+--R   (20)  18
+--R                                                        Type: PositiveInteger
+--E 20
+)spool
+)lisp (bye)
+@
+<<TwoDimensionalArray.help>>=
+====================================================================
+TwoDimensionalArray examples
+====================================================================
+
+The TwoDimensionalArray domain is used for storing data in a two
+dimensional data structure indexed by row and by column.  Such an
+array is a homogeneous data structure in that all the entries of the
+array must belong to the same Axiom domain..  Each array has a fixed
+number of rows and columns specified by the user and arrays are not
+extensible.  In Axiom, the indexing of two-dimensional arrays is
+one-based.  This means that both the "first" row of an array and the
+"first" column of an array are given the index 1.  Thus, the entry
+in the upper left corner of an array is in position (1,1).
+
+The operation new creates an array with a specified number of rows and
+columns and fills the components of that array with a specified entry.
+The arguments of this operation specify the number of rows, the number
+of columns, and the entry.
+
+This creates a five-by-four array of integers, all of whose entries are
+zero.
+
+  arr : ARRAY2 INT := new(5,4,0)
+        +0  0  0  0+
+        |          |
+        |0  0  0  0|
+        |          |
+        |0  0  0  0|
+        |          |
+        |0  0  0  0|
+        |          |
+        +0  0  0  0+
+                         Type: TwoDimensionalArray Integer
+
+The entries of this array can be set to other integers using setelt.
+
+Issue this to set the element in the upper left corner of this array to 17.
+
+  setelt(arr,1,1,17)
+    17
+                         Type: PositiveInteger
+
+Now the first element of the array is 17.
+
+  arr
+        +17  0  0  0+
+        |           |
+        |0   0  0  0|
+        |           |
+        |0   0  0  0|
+        |           |
+        |0   0  0  0|
+        |           |
+        +0   0  0  0+
+                         Type: TwoDimensionalArray Integer
+
+Likewise, elements of an array are extracted using the operation elt.
+
+  elt(arr,1,1)
+    17
+                         Type: PositiveInteger
+
+Another way to use these two operations is as follows.  This sets the
+element in position (3,2) of the array to 15.
+
+  arr(3,2) := 15
+    15
+                         Type: PositiveInteger
+
+This extracts the element in position (3,2) of the array.
+
+  arr(3,2)
+    15
+                         Type: PositiveInteger
+
+The operations elt and setelt come equipped with an error check which
+verifies that the indices are in the proper ranges.  For example, the
+above array has five rows and four columns, so if you ask for the
+entry in position (6,2) with arr(6,2) Axiom displays an error message.
+If there is no need for an error check, you can call the operations qelt 
+and qsetelt which provide the same functionality but without the error 
+check. Typically, these operations are called in well-tested programs.
+
+The operations row and column extract rows and columns, respectively,
+and return objects of OneDimensionalArray with the same underlying
+element type.
+
+  row(arr,1)
+    [17,0,0,0]
+                         Type: OneDimensionalArray Integer
+
+  column(arr,1)
+    [17,0,0,0,0]
+                         Type: OneDimensionalArray Integer
+
+You can determine the dimensions of an array by calling the operations
+nrows and ncols, which return the number of rows and columns, respectively.
+
+  nrows(arr)
+    5
+                         Type: PositiveInteger
+
+  ncols(arr)
+    4
+                         Type: PositiveInteger
+
+To apply an operation to every element of an array, use map.  This
+creates a new array.  This expression negates every element.
+
+  map(-,arr)
+         +- 17   0    0  0+
+         |                |
+         | 0     0    0  0|
+         |                |
+         | 0    - 15  0  0|
+         |                |
+         | 0     0    0  0|
+         |                |
+         + 0     0    0  0+
+                         Type: TwoDimensionalArray Integer
+
+This creates an array where all the elements are doubled.
+
+  map((x +-> x + x),arr)
+         +34  0   0  0+
+         |            |
+         |0   0   0  0|
+         |            |
+         |0   30  0  0|
+         |            |
+         |0   0   0  0|
+         |            |
+         +0   0   0  0+
+                         Type: TwoDimensionalArray Integer
+
+To change the array destructively, use map instead of map.  If you
+need to make a copy of any array, use copy.
+
+  arrc := copy(arr)
+         +17  0   0  0+
+         |            |
+         |0   0   0  0|
+         |            |
+         |0   15  0  0|
+         |            |
+         |0   0   0  0|
+         |            |
+         +0   0   0  0+
+                         Type: TwoDimensionalArray Integer
+
+  map!(-,arrc)
+         +- 17   0    0  0+
+         |                |
+         | 0     0    0  0|
+         |                |
+         | 0    - 15  0  0|
+         |                |
+         | 0     0    0  0|
+         |                |
+         + 0     0    0  0+
+                         Type: TwoDimensionalArray Integer
+
+  arrc
+         +- 17   0    0  0+
+         |                |
+         | 0     0    0  0|
+         |                |
+         | 0    - 15  0  0|
+         |                |
+         | 0     0    0  0|
+         |                |
+         + 0     0    0  0+
+                         Type: TwoDimensionalArray Integer
+
+  arr
+         +17  0   0  0+
+         |            |
+         |0   0   0  0|
+         |            |
+         |0   15  0  0|
+         |            |
+         |0   0   0  0|
+         |            |
+         +0   0   0  0+
+                         Type: TwoDimensionalArray Integer
+
+Use member? to see if a given element is in an array.
+
+  member?(17,arr)
+    true
+                         Type: Boolean
+
+  member?(10317,arr)
+    false
+                         Type: Boolean
+
+To see how many times an element appears in an array, use count.
+
+  count(17,arr)
+    1
+                         Type: PositiveInteger
+
+  count(0,arr)
+    18
+                         Type: PositiveInteger
+
+See Also:
+o )help Matrix
+o )help OneDimensionalArray
+o )show TwoDimensionalArray
+o $AXIOM/doc/src/algebra/array2.spad.dvi
+
+@
 <<domain ARRAY2 TwoDimensionalArray>>=
 )abbrev domain ARRAY2 TwoDimensionalArray
 TwoDimensionalArray(R):Exports == Implementation where
diff --git a/src/algebra/files.spad.pamphlet b/src/algebra/files.spad.pamphlet
index ec29146..e13ed79 100644
--- a/src/algebra/files.spad.pamphlet
+++ b/src/algebra/files.spad.pamphlet
@@ -348,6 +348,173 @@ File(S:SetCategory): FileCategory(FileName, S) with
 
 @
 \section{domain TEXTFILE TextFile}
+<<TextFile.input>>=
+-- files.spad.pamphlet TextFile.input
+)spool TextFile.output
+)set message test on
+)set message auto off
+)clear all
+--S 1 of 10
+f1: TextFile := open("/etc/group", "input")
+--R 
+--R
+--R   (1)  "/etc/group"
+--R                                                               Type: TextFile
+--E 1
+
+--S 2 of 10
+f2: TextFile := open("MOTD", "output")
+--R 
+--R
+--R   (2)  "MOTD"
+--R                                                               Type: TextFile
+--E 2
+
+--S 3 of 10
+l := readLine! f1
+--R 
+--R
+--R   (3)  "root:x:0:root"
+--R                                                                 Type: String
+--E 3
+
+--S 4 of 10
+writeLine!(f2, upperCase l)
+--R 
+--R
+--R   (4)  "ROOT:X:0:ROOT"
+--R                                                                 Type: String
+--E 4
+
+--S 5 of 10
+while not endOfFile? f1 repeat
+  s := readLine! f1
+  writeLine!(f2, upperCase s)
+--R 
+--R                                                                   Type: Void
+--E 5
+
+--S 6 of 10
+close! f1
+--R 
+--R
+--R   (6)  "/etc/group"
+--R                                                               Type: TextFile
+--E 6
+
+--S 7 of 10
+write!(f2, "-The-")
+--R 
+--R
+--R   (7)  "-The-"
+--R                                                                 Type: String
+--E 7
+
+--S 8 of 10
+write!(f2, "-End-")
+--R 
+--R
+--R   (8)  "-End-"
+--R                                                                 Type: String
+--E 8
+
+--S 9 of 10
+writeLine! f2
+--R 
+--R
+--R   (9)  ""
+--R                                                                 Type: String
+--E 9
+
+--S 10 of 10
+close! f2
+--R 
+--R
+--R   (10)  "MOTD"
+--R                                                               Type: TextFile
+--E 10
+)system rm -f MOTD
+)spool
+)lisp (bye)
+@
+<<TextFile.help>>=
+====================================================================
+TextFile examples
+====================================================================
+
+The domain TextFile allows Axiom to read and write character data and
+exchange text with other programs.  This type behaves in Axiom much
+like a File of strings, with additional operations to cause new lines.
+We give an example of how to produce an upper case copy of a file.
+
+This is the file from which we read the text.
+
+  f1: TextFile := open("/etc/group", "input")
+    "/etc/group"
+                               Type: TextFile
+
+This is the file to which we write the text.
+
+  f2: TextFile := open("/tmp/MOTD", "output")
+    "MOTD"
+                               Type: TextFile
+
+Entire lines are handled using the readLine and writeLine operations.
+
+  l := readLine! f1
+    "root:x:0:root"
+                               Type: String
+
+  writeLine!(f2, upperCase l)
+    "ROOT:X:0:ROOT"
+                               Type: String
+
+Use the endOfFile? operation to check if you have reached the end of the file.
+
+  while not endOfFile? f1 repeat
+    s := readLine! f1
+    writeLine!(f2, upperCase s)
+                               Type: Void
+
+The file f1 is exhausted and should be closed.
+
+  close! f1
+    "/etc/group"
+                               Type: TextFile
+
+It is sometimes useful to write lines a bit at a time.  The write operation 
+allows this.
+
+  write!(f2, "-The-")
+    "-The-"
+                               Type: String
+
+  write!(f2, "-End-")
+    "-End-"
+                               Type: String
+
+This ends the line.  This is done in a machine-dependent manner.
+
+  writeLine! f2
+    ""
+                               Type: String
+
+  close! f2
+    "MOTD"
+                               Type: TextFile
+
+Finally, clean up.
+
+  )system rm /tmp/MOTD
+
+See Also:
+o )help File
+o )help KeyedAccessFile
+o )help Library
+o )show TextFile
+o $AXIOM/doc/src/algebra/files.spad.dvi
+
+@
 <<domain TEXTFILE TextFile>>=
 )abbrev domain TEXTFILE TextFile
 ++ Author: Stephen M. Watt
diff --git a/src/algebra/fname.spad.pamphlet b/src/algebra/fname.spad.pamphlet
index f4738b5..4c44625 100644
--- a/src/algebra/fname.spad.pamphlet
+++ b/src/algebra/fname.spad.pamphlet
@@ -203,20 +203,20 @@ writable? "/tmp/DoesNotExist"
 --R 
 --R
 --R   (17)  true
---R                                                             Type: Boolean
+--R                                                                Type: Boolean
 --E 17
 
 --S 18 of 18
 fn := new(objdir, "xxx", "yy") 
 --R 
 --R
---R   (18)  "/tmp/xxx1419.yy"
+--I   (18)  "/tmp/xxx1419.yy"
 --R                                                               Type: FileName
 --E 18
 )spool
 )lisp (bye)
 @
-<<Filename.help>>=
+<<FileName.help>>=
 ====================================================================
 FileName examples
 ====================================================================
diff --git a/src/algebra/fparfrac.spad.pamphlet b/src/algebra/fparfrac.spad.pamphlet
index 38d5f9f..09b6ba3 100644
--- a/src/algebra/fparfrac.spad.pamphlet
+++ b/src/algebra/fparfrac.spad.pamphlet
@@ -44,7 +44,7 @@ g := fullPartialFraction f
 --R        x - 2   x + 1      --+              2
 --R                          2         (x - %A)
 --R                        %A  - 1= 0
-Type: FullPartialFractionExpansion(Fraction Integer,UnivariatePolynomial(x,Fraction Integer))
+--RType: FullPartialFractionExpansion(Fraction Integer,UnivariatePolynomial(x,Fraction Integer))
 --E 3
 
 --S 4 of 16
@@ -67,7 +67,7 @@ g5 := D(g, 5)
 --R                 6          6      --+                7
 --R          (x - 2)    (x + 1)      2           (x - %A)
 --R                                %A  - 1= 0
-Type: FullPartialFractionExpansion(Fraction Integer,UnivariatePolynomial(x,Fraction Integer))
+--RType: FullPartialFractionExpansion(Fraction Integer,UnivariatePolynomial(x,Fraction Integer))
 --E 5
 
 --S 6 of 16
@@ -262,8 +262,6 @@ g :: Fx - f
 --R                      Type: Fraction UnivariatePolynomial(x,Fraction Integer)
 --E 16
 )spool
- 
-)spool
 )lisp (bye)
 @
 <<FullPartialFractionExpansion.help>>=
diff --git a/src/algebra/matrix.spad.pamphlet b/src/algebra/matrix.spad.pamphlet
index 7b7a10f..590cd3e 100644
--- a/src/algebra/matrix.spad.pamphlet
+++ b/src/algebra/matrix.spad.pamphlet
@@ -1256,6 +1256,150 @@ RectangularMatrix(m,n,R): Exports == Implementation where
 
 @
 \section{domain SQMATRIX SquareMatrix}
+<<SquareMatrix.input>>=
+-- matrix.spad.pamphlet SquareMatrix.input
+)spool SquareMatrix.output
+)set message test on
+)set message auto off
+)clear all
+--S 1 of 6
+)set expose add constructor SquareMatrix
+--R 
+--I   SquareMatrix is now explicitly exposed in frame frame0 
+--E 1 
+
+--S 2 of 6
+m := squareMatrix [ [1,-%i],[%i,4] ]
+--R 
+--R
+--R        +1   - %i+
+--R   (1)  |        |
+--R        +%i   4  +
+--R                                        Type: SquareMatrix(2,Complex Integer)
+--E 2
+
+--S 3 of 6
+m*m - m
+--R 
+--R
+--R        + 1   - 4%i+
+--R   (2)  |          |
+--R        +4%i   13  +
+--R                                        Type: SquareMatrix(2,Complex Integer)
+--E 3
+
+--S 4 of 6
+mm := squareMatrix [ [m, 1], [1-m, m**2] ]
+--R 
+--R
+--R        ++1   - %i+      +1  0+   +
+--R        ||        |      |    |   |
+--R        |+%i   4  +      +0  1+   |
+--R   (3)  |                         |
+--R        |+ 0    %i +  + 2   - 5%i+|
+--R        ||         |  |          ||
+--R        ++- %i  - 3+  +5%i   17  ++
+--R                        Type: SquareMatrix(2,SquareMatrix(2,Complex Integer))
+--E 4
+
+--S 5 of 6
+p := (x + m)**2
+--R 
+--R
+--R         2   + 2   - 2%i+    + 2   - 5%i+
+--R   (4)  x  + |          |x + |          |
+--R             +2%i    8  +    +5%i   17  +
+--R                             Type: Polynomial SquareMatrix(2,Complex Integer)
+--E 5
+
+--S 6 of 6
+p::SquareMatrix(2, ?)
+--R 
+--R
+--R        + 2                        +
+--R        |x  + 2x + 2  - 2%i x - 5%i|
+--R   (5)  |                          |
+--R        |              2           |
+--R        +2%i x + 5%i  x  + 8x + 17 +
+--R                             Type: SquareMatrix(2,Polynomial Complex Integer)
+--E 6
+)spool
+)lisp (bye)
+@
+<<SquareMatrix.help>>=
+====================================================================
+SquareMatrix examples
+====================================================================
+ 
+The top level matrix type in Axiom is 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 Matrix has little algebraic structure.
+ 
+Sometimes you want to use matrices as coefficients for polynomials or
+in other algebraic contexts.  In this case, SquareMatrix should be
+used.  The domain SquareMatrix(n,R) gives the ring of n by n square
+matrices over R.
+ 
+Since SquareMatrix is not normally exposed at the top level, you must
+expose it before it can be used.
+
+  )set expose add constructor SquareMatrix
+
+Once SQMATRIX has been exposed, values can be created using the
+squareMatrix function.
+
+  m := squareMatrix [ [1,-%i],[%i,4] ]
+    +1   - %i+
+    |        |
+    +%i   4  +
+                        Type: SquareMatrix(2,Complex Integer)
+
+The usual arithmetic operations are available.
+
+  m*m - m
+    + 1   - 4%i+
+    |          |
+    +4%i   13  +
+                        Type: SquareMatrix(2,Complex Integer)
+
+Square matrices can be used where ring elements are required.
+For example, here is a matrix with matrix entries.
+
+  mm := squareMatrix [ [m, 1], [1-m, m**2] ]
+    ++1   - %i+      +1  0+   +
+    ||        |      |    |   |
+    |+%i   4  +      +0  1+   |
+    |                         |
+    |+ 0    %i +  + 2   - 5%i+|
+    ||         |  |          ||
+    ++- %i  - 3+  +5%i   17  ++
+                        Type: SquareMatrix(2,SquareMatrix(2,Complex Integer))
+
+Or you can construct a polynomial with  square matrix coefficients.
+
+  p := (x + m)**2
+     2   + 2   - 2%i+    + 2   - 5%i+
+    x  + |          |x + |          |
+         +2%i    8  +    +5%i   17  +
+                        Type: Polynomial SquareMatrix(2,Complex Integer)
+
+This value can be converted to a square matrix with polynomial coefficients.
+
+  p::SquareMatrix(2, ?)
+    + 2                        +
+    |x  + 2x + 2  - 2%i x - 5%i|
+    |                          |
+    |              2           |
+    +2%i x + 5%i  x  + 8x + 17 +
+                        Type: SquareMatrix(2,Polynomial Complex Integer)
+ 
+See Also:
+o )help Matrix
+o )show SquareMatrix
+o $AXIOM/doc/src/algebra/matrix.spad.dvi
+
+@
 <<domain SQMATRIX SquareMatrix>>=
 )abbrev domain SQMATRIX SquareMatrix
 ++ Author: Grabmeier, Gschnitzer, Williamson
diff --git a/src/algebra/opalg.spad.pamphlet b/src/algebra/opalg.spad.pamphlet
index 8eab785..d9ffc6d 100644
--- a/src/algebra/opalg.spad.pamphlet
+++ b/src/algebra/opalg.spad.pamphlet
@@ -263,7 +263,7 @@ t := operator("tilde") :: OP(R)
 --S 3 of 21
 )set expose add constructor Operator
 --R 
---R   Operator is now explicitly exposed in frame frame0 
+--I   Operator is now explicitly exposed in frame frame0 
 --E 3
 
 --S 4 of 21
diff --git a/src/algebra/poly.spad.pamphlet b/src/algebra/poly.spad.pamphlet
index ad0206c..9f28927 100644
--- a/src/algebra/poly.spad.pamphlet
+++ b/src/algebra/poly.spad.pamphlet
@@ -766,6 +766,633 @@ SparseUnivariatePolynomialFunctions2(R:Ring, S:Ring): with
 
 @
 \section{domain UP UnivariatePolynomial}
+<<UnivariatePolynomial.input>>=
+-- poly.spad.pamphlet UnivariatePolynomial.input
+)spool UnivariatePolynomial.output
+)set message test on
+)set message auto off
+)clear all
+--S 1 of 35
+(p,q) : UP(x,INT)
+--R 
+--R                                                                   Type: Void
+--E 1
+
+--S 2 of 35
+p := (3*x-1)**2 * (2*x + 8)
+--R 
+--R
+--R           3      2
+--R   (2)  18x  + 60x  - 46x + 8
+--R                                        Type: UnivariatePolynomial(x,Integer)
+--E 2
+
+--S 3 of 35
+q := (1 - 6*x + 9*x**2)**2
+--R 
+--R
+--R           4       3      2
+--R   (3)  81x  - 108x  + 54x  - 12x + 1
+--R                                        Type: UnivariatePolynomial(x,Integer)
+--E 3
+
+--S 4 of 35
+p**2 + p*q 
+--R 
+--R
+--R             7        6        5         4        3        2
+--R   (4)  1458x  + 3240x  - 7074x  + 10584x  - 9282x  + 4120x  - 878x + 72
+--R                                        Type: UnivariatePolynomial(x,Integer)
+--E 4
+
+--S 5 of 35
+leadingCoefficient p
+--R 
+--R
+--R   (5)  18
+--R                                                        Type: PositiveInteger
+--E 5
+
+--S 6 of 35
+degree p
+--R 
+--R
+--R   (6)  3
+--R                                                        Type: PositiveInteger
+--E 6
+
+--S 7 of 35
+reductum p
+--R 
+--R
+--R           2
+--R   (7)  60x  - 46x + 8
+--R                                        Type: UnivariatePolynomial(x,Integer)
+--E 7
+
+--S 8 of 35
+gcd(p,q)
+--R 
+--R
+--R          2
+--R   (8)  9x  - 6x + 1
+--R                                        Type: UnivariatePolynomial(x,Integer)
+--E 8
+
+--S 9 of 35
+lcm(p,q)
+--R 
+--R
+--R            5       4       3       2
+--R   (9)  162x  + 432x  - 756x  + 408x  - 94x + 8
+--R                                        Type: UnivariatePolynomial(x,Integer)
+--E 9
+
+--S 10 of 35
+resultant(p,q)
+--R 
+--R
+--R   (10)  0
+--R                                                     Type: NonNegativeInteger
+--E 10
+
+--S 11 of 35
+D p
+--R 
+--R
+--R            2
+--R   (11)  54x  + 120x - 46
+--R                                        Type: UnivariatePolynomial(x,Integer)
+--E 11
+
+--S 12 of 35
+p(2)
+--R 
+--R
+--R   (12)  300
+--R                                                        Type: PositiveInteger
+--E 12
+
+--S 13 of 35
+p(q)
+--R 
+--R
+--R   (13)
+--R             12            11            10            9            8
+--R     9565938x   - 38263752x   + 70150212x   - 77944680x  + 58852170x
+--R   + 
+--R                7            6           5           4          3         2
+--R     - 32227632x  + 13349448x  - 4280688x  + 1058184x  - 192672x  + 23328x
+--R   + 
+--R     - 1536x + 40
+--R                                        Type: UnivariatePolynomial(x,Integer)
+--E 13
+
+--S 14 of 35
+q(p)
+--R 
+--R
+--R   (14)
+--R             12             11             10             9              8
+--R     8503056x   + 113374080x   + 479950272x   + 404997408x  - 1369516896x
+--R   + 
+--R                 7              6              5              4             3
+--R     - 626146848x  + 2939858712x  - 2780728704x  + 1364312160x  - 396838872x
+--R   + 
+--R              2
+--R     69205896x  - 6716184x + 279841
+--R                                        Type: UnivariatePolynomial(x,Integer)
+--E 14
+
+--S 15 of 35
+l := coefficients p
+--R 
+--R
+--R   (15)  [18,60,- 46,8]
+--R                                                           Type: List Integer
+--E 15
+
+--S 16 of 35
+reduce(gcd,l)
+--R 
+--R
+--R   (16)  2
+--R                                                        Type: PositiveInteger
+--E 16
+
+--S 17 of 35
+content p
+--R 
+--R
+--R   (17)  2
+--R                                                        Type: PositiveInteger
+--E 17
+
+--S 18 of 35
+ux := (x**4+2*x+3)::UP(x,INT)
+--R 
+--R
+--R          4
+--R   (18)  x  + 2x + 3
+--R                                        Type: UnivariatePolynomial(x,Integer)
+--E 18
+
+--S 19 of 35
+vectorise(ux,5)
+--R 
+--R
+--R   (19)  [3,2,0,0,1]
+--R                                                         Type: Vector Integer
+--E 19
+
+--S 20 of 35
+squareTerms(p) ==   reduce(+,[t**2 for t in monomials p])
+--R 
+--R                                                                   Type: Void
+--E 20
+
+--S 21 of 35
+p
+--R 
+--R
+--R            3      2
+--R   (21)  18x  + 60x  - 46x + 8
+--R                                        Type: UnivariatePolynomial(x,Integer)
+--E 21
+
+--S 22 of 35
+squareTerms p
+--R 
+--R   Compiling function squareTerms with type UnivariatePolynomial(x,
+--R      Integer) -> UnivariatePolynomial(x,Integer) 
+--R
+--R             6        4        2
+--R   (22)  324x  + 3600x  + 2116x  + 64
+--R                                        Type: UnivariatePolynomial(x,Integer)
+--E 22
+
+--S 23 of 35
+(r,s) : UP(a1,FRAC INT)
+--R 
+--R                                                                   Type: Void
+--E 23
+
+--S 24 of 35
+r := a1**2 - 2/3
+--R 
+--R
+--R           2   2
+--R   (24)  a1  - -
+--R               3
+--R                              Type: UnivariatePolynomial(a1,Fraction Integer)
+--E 24
+
+--S 25 of 35
+s := a1 + 4
+--R 
+--R
+--R   (25)  a1 + 4
+--R                              Type: UnivariatePolynomial(a1,Fraction Integer)
+--E 25
+
+--S 26 of 35
+r quo s
+--R 
+--R
+--R   (26)  a1 - 4
+--R                              Type: UnivariatePolynomial(a1,Fraction Integer)
+--E 26
+
+--S 27 of 35
+r rem s
+--R 
+--R
+--R         46
+--R   (27)  --
+--R          3
+--R                              Type: UnivariatePolynomial(a1,Fraction Integer)
+--E 27
+
+--S 28 of 35
+d := divide(r, s)
+--R 
+--R
+--R                                      46
+--R   (28)  [quotient= a1 - 4,remainder= --]
+--R                                       3
+--RType: Record(quotient: UnivariatePolynomial(a1,Fraction Integer),remainder: UnivariatePolynomial(a1,Fraction Integer))
+--E 28
+
+--S 29 of 35
+r - (d.quotient * s + d.remainder) 
+--R 
+--R
+--R   (29)  0
+--R                              Type: UnivariatePolynomial(a1,Fraction Integer)
+--E 29
+
+--S 30 of 35
+integrate r
+--R 
+--R
+--R         1   3   2
+--R   (30)  - a1  - - a1
+--R         3       3
+--R                              Type: UnivariatePolynomial(a1,Fraction Integer)
+--E 30
+
+--S 31 of 35
+integrate s
+--R 
+--R
+--R         1   2
+--R   (31)  - a1  + 4a1
+--R         2
+--R                              Type: UnivariatePolynomial(a1,Fraction Integer)
+--E 31
+
+--S 32 of 35
+t : UP(a1,FRAC POLY INT)
+--R 
+--R                                                                   Type: Void
+--E 32
+
+--S 33 of 35
+t := a1**2 - a1/b2 + (b1**2-b1)/(b2+3)
+--R 
+--R
+--R                         2
+--R           2    1      b1  - b1
+--R   (33)  a1  - -- a1 + --------
+--R               b2       b2 + 3
+--R                   Type: UnivariatePolynomial(a1,Fraction Polynomial Integer)
+--E 33
+
+--S 34 of 35
+u : FRAC POLY INT := t
+--R 
+--R
+--R           2  2      2           2
+--R         a1 b2  + (b1  - b1 + 3a1  - a1)b2 - 3a1
+--R   (34)  ---------------------------------------
+--R                          2
+--R                        b2  + 3b2
+--R                                            Type: Fraction Polynomial Integer
+--E 34
+
+--S 35 of 35
+u :: UP(b1,?)
+--R 
+--R
+--R                                    2
+--R            1     2      1        a1 b2 - a1
+--R   (35)  ------ b1  - ------ b1 + ----------
+--R         b2 + 3       b2 + 3          b2
+--R                   Type: UnivariatePolynomial(b1,Fraction Polynomial Integer)
+--E 35
+)spool
+)lisp (bye)
+@
+<<UnivariatePolynomial.help>>=
+====================================================================
+UnivariatePolynomial examples
+====================================================================
+
+The domain constructor UnivariatePolynomial (abbreviated UP) creates
+domains of univariate polynomials in a specified variable.  For
+example, the domain UP(a1,POLY FRAC INT) provides polynomials in the
+single variable a1 whose coefficients are general polynomials with
+rational number coefficients.
+
+Restriction: Axiom does not allow you to create types where
+UnivariatePolynomial is contained in the coefficient type of
+Polynomial. Therefore, UP(x,POLY INT) is legal but POLY UP(x,INT)
+is not.
+
+UP(x,INT) is the domain of polynomials in the single variable x with 
+integer coefficients.
+
+  (p,q) : UP(x,INT)
+                          Type: Void
+
+  p := (3*x-1)**2 * (2*x + 8)
+       3      2
+    18x  + 60x  - 46x + 8
+                          Type: UnivariatePolynomial(x,Integer)
+
+  q := (1 - 6*x + 9*x**2)**2
+       4       3      2
+    81x  - 108x  + 54x  - 12x + 1
+                          Type: UnivariatePolynomial(x,Integer)
+
+The usual arithmetic operations are available for univariate polynomials.
+
+  p**2 + p*q 
+         7        6        5         4        3        2
+    1458x  + 3240x  - 7074x  + 10584x  - 9282x  + 4120x  - 878x + 72
+                          Type: UnivariatePolynomial(x,Integer)
+
+The operation leadingCoefficient extracts the coefficient of the term
+of highest degree.
+
+  leadingCoefficient p
+    18
+                          Type: PositiveInteger
+
+The operation degree returns the degree of the polynomial.  Since the
+polynomial has only one variable, the variable is not supplied to
+operations like degree.
+
+  degree p
+    3
+                          Type: PositiveInteger
+
+The reductum of the polynomial, the polynomial obtained by subtracting
+the term of highest order, is returned by reductum.
+
+  reductum p
+       2
+    60x  - 46x + 8
+                          Type: UnivariatePolynomial(x,Integer)
+
+The operation gcd computes the greatest common divisor of two polynomials.
+
+  gcd(p,q)
+      2
+    9x  - 6x + 1
+                          Type: UnivariatePolynomial(x,Integer)
+
+The operation lcm computes the least common multiple.
+
+  lcm(p,q)
+        5       4       3       2
+    162x  + 432x  - 756x  + 408x  - 94x + 8
+                          Type: UnivariatePolynomial(x,Integer)
+
+The operation resultant computes the resultant of two univariate
+polynomials.  In the case of p and q, the resultant is 0 because they
+share a common root.
+
+  resultant(p,q)
+    0
+                          Type: NonNegativeInteger
+
+To compute the derivative of a univariate polynomial with respect to its
+variable, use the function D.
+
+  D p
+       2
+    54x  + 120x - 46
+                          Type: UnivariatePolynomial(x,Integer)
+
+Univariate polynomials can also be used as if they were functions.  To
+evaluate a univariate polynomial at some point, apply the polynomial
+to the point.
+
+  p(2)
+    300
+                          Type: PositiveInteger
+
+The same syntax is used for composing two univariate polynomials, i.e.
+substituting one polynomial for the variable in another.  This substitutes 
+q for the variable in p.
+
+  p(q)
+             12            11            10            9            8
+     9565938x   - 38263752x   + 70150212x   - 77944680x  + 58852170x
+   + 
+                7            6           5           4          3         2
+     - 32227632x  + 13349448x  - 4280688x  + 1058184x  - 192672x  + 23328x
+   + 
+     - 1536x + 40
+                          Type: UnivariatePolynomial(x,Integer)
+
+This substitutes p for the variable in q.
+
+  q(p)
+             12             11             10             9              8
+     8503056x   + 113374080x   + 479950272x   + 404997408x  - 1369516896x
+   + 
+                 7              6              5              4             3
+     - 626146848x  + 2939858712x  - 2780728704x  + 1364312160x  - 396838872x
+   + 
+              2
+     69205896x  - 6716184x + 279841
+                          Type: UnivariatePolynomial(x,Integer)
+
+To obtain a list of coefficients of the polynomial, use coefficients.
+
+  l := coefficients p
+    [18,60,- 46,8]
+                          Type: List Integer
+
+From this you can use gcd and reduce to compute the content of the polynomial.
+
+  reduce(gcd,l)
+    2
+                          Type: PositiveInteger
+
+Alternatively (and more easily), you can just call content.
+
+  content p
+    2
+                          Type: PositiveInteger
+
+Note that the operation coefficients omits the zero coefficients from
+the list.  Sometimes it is useful to convert a univariate polynomial
+to a vector whose i-th position contains the degree i-1 coefficient of
+the polynomial.
+
+  ux := (x**4+2*x+3)::UP(x,INT)
+     4
+    x  + 2x + 3
+                          Type: UnivariatePolynomial(x,Integer)
+
+To get a complete vector of coefficients, use the operation vectorise,
+which takes a univariate polynomial and an integer denoting the length
+of the desired vector.
+
+  vectorise(ux,5)
+    [3,2,0,0,1]
+                          Type: Vector Integer
+
+It is common to want to do something to every term of a polynomial,
+creating a new polynomial in the process.
+
+This is a function for iterating across the terms of a polynomial,
+squaring each term.
+
+  squareTerms(p) ==   reduce(+,[t**2 for t in monomials p])
+                          Type: Void
+
+Recall what p looked like.
+
+  p
+       3      2
+    18x  + 60x  - 46x + 8
+                          Type: UnivariatePolynomial(x,Integer)
+
+We can demonstrate squareTerms on p.
+
+  squareTerms p
+        6        4        2
+    324x  + 3600x  + 2116x  + 64
+                          Type: UnivariatePolynomial(x,Integer)
+
+When the coefficients of the univariate polynomial belong to a field,
+it is possible to compute quotients and remainders.  For example, when
+the coefficients are rational numbers, as opposed to integers.  The
+important property of a field is that non-zero elements can be divided
+and produce another element. The quotient of the integers 2 and 3 is
+not another integer.
+
+  (r,s) : UP(a1,FRAC INT)
+                          Type: Void
+
+  r := a1**2 - 2/3
+      2   2
+    a1  - -
+          3
+                          Type: UnivariatePolynomial(a1,Fraction Integer)
+
+  s := a1 + 4
+    a1 + 4
+                          Type: UnivariatePolynomial(a1,Fraction Integer)
+
+When the coefficients are rational numbers or rational expressions,
+the operation quo computes the quotient of two polynomials.
+
+  r quo s
+    a1 - 4
+                          Type: UnivariatePolynomial(a1,Fraction Integer)
+
+The operation rem computes the remainder.
+
+  r rem s
+    46
+    --
+     3
+                          Type: UnivariatePolynomial(a1,Fraction Integer)
+
+The operation divide can be used to return a record of both components.
+
+  d := divide(r, s)
+                                 46
+    [quotient= a1 - 4,remainder= --]
+                                  3
+       Type: Record(quotient: UnivariatePolynomial(a1,Fraction Integer),
+                    remainder: UnivariatePolynomial(a1,Fraction Integer))
+
+Now we check the arithmetic!
+
+  r - (d.quotient * s + d.remainder) 
+    0
+                          Type: UnivariatePolynomial(a1,Fraction Integer)
+
+It is also possible to integrate univariate polynomials when the
+coefficients belong to a field.
+
+  integrate r
+    1   3   2
+    - a1  - - a1
+    3       3
+                          Type: UnivariatePolynomial(a1,Fraction Integer)
+
+  integrate s
+    1   2
+    - a1  + 4a1
+    2
+                          Type: UnivariatePolynomial(a1,Fraction Integer)
+
+One application of univariate polynomials is to see expressions in terms
+of a specific variable.
+
+We start with a polynomial in a1 whose coefficients are quotients of
+polynomials in b1 and b2.
+
+  t : UP(a1,FRAC POLY INT)
+                          Type: Void
+
+Since in this case we are not talking about using multivariate
+polynomials in only two variables, we use Polynomial.  We also use
+Fraction because we want fractions.
+
+  t := a1**2 - a1/b2 + (b1**2-b1)/(b2+3)
+                    2
+      2    1      b1  - b1
+    a1  - -- a1 + --------
+          b2       b2 + 3
+                   Type: UnivariatePolynomial(a1,Fraction Polynomial Integer)
+
+We push all the variables into a single quotient of polynomials.
+
+  u : FRAC POLY INT := t
+       2  2      2           2
+     a1 b2  + (b1  - b1 + 3a1  - a1)b2 - 3a1
+     ---------------------------------------
+                      2
+                    b2  + 3b2
+                          Type: Fraction Polynomial Integer
+
+Alternatively, we can view this as a polynomial in the variable This
+is a mode-directed conversion: you indicate as much of the structure
+as you care about and let Axiom decide on the full type and how to do
+the transformation.
+
+  u :: UP(b1,?)
+                                2
+        1     2      1        a1 b2 - a1
+     ------ b1  - ------ b1 + ----------
+     b2 + 3       b2 + 3          b2
+                   Type: UnivariatePolynomial(b1,Fraction Polynomial Integer)
+
+See Also:
+o )help MultivariatePolynomial
+o )help DistributedMultivariatePolynomial
+o )show UnivariatePolynomial
+o $AXIOM/doc/src/algebra/poly.spad.dvi
+
+@
 <<domain UP UnivariatePolynomial>>=
 )abbrev domain UP UnivariatePolynomial
 ++ Author:
diff --git a/src/algebra/seg.spad.pamphlet b/src/algebra/seg.spad.pamphlet
index 7d6026b..31740f6 100644
--- a/src/algebra/seg.spad.pamphlet
+++ b/src/algebra/seg.spad.pamphlet
@@ -567,6 +567,148 @@ SegmentBindingFunctions2(R:Type, S:Type): with
 
 @
 \section{domain UNISEG UniversalSegment}
+<<UniversalSegment.input>>=
+-- seg.spad.pamphlet UniversalSegment.input
+)spool UniversalSegment.output
+)set message test on
+)set message auto off
+)clear all
+--S 1 of 9
+pints := 1..
+--R 
+--R
+--R   (1)  1..
+--R                                       Type: UniversalSegment PositiveInteger
+--E 1
+
+--S 2 of 9
+nevens := (0..) by -2
+--R 
+--R
+--R   (2)  0.. by - 2
+--R                                    Type: UniversalSegment NonNegativeInteger
+--E 2
+
+--S 3 of 9
+useg: UniversalSegment(Integer) := 3..10
+--R 
+--R
+--R   (3)  3..10
+--R                                               Type: UniversalSegment Integer
+--E 3
+
+--S 4 of 9
+hasHi pints
+--R 
+--R
+--R   (4)  false
+--R                                                                Type: Boolean
+--E 4
+
+--S 5 of 9
+hasHi nevens
+--R 
+--R
+--R   (5)  false
+--R                                                                Type: Boolean
+--E 5
+
+--S 6 of 9
+hasHi useg
+--R 
+--R
+--R   (6)  true
+--R                                                                Type: Boolean
+--E 6
+
+--S 7 of 9
+expand pints
+--R 
+--R
+--R   (7)  [1,2,3,4,5,6,7,8,9,10,...]
+--R                                                         Type: Stream Integer
+--E 7
+
+--S 8 of 9
+expand nevens
+--R 
+--R
+--R   (8)  [0,- 2,- 4,- 6,- 8,- 10,- 12,- 14,- 16,- 18,...]
+--R                                                         Type: Stream Integer
+--E 8
+
+--S 9 of 9
+expand [1, 3, 10..15, 100..]
+--R 
+--R
+--R   (9)  [1,3,10,11,12,13,14,15,100,101,...]
+--R                                                         Type: Stream Integer
+--E 9
+)spool
+)lisp (bye)
+@
+<<UniversalSegment.help>>=
+====================================================================
+UniversalSegment examples
+====================================================================
+
+The UniversalSegment domain generalizes Segment by allowing segments
+without a "hi" end point.
+
+  pints := 1..
+    1..
+                                Type: UniversalSegment PositiveInteger
+
+  nevens := (0..) by -2
+    0.. by - 2
+                                Type: UniversalSegment NonNegativeInteger
+
+Values of type Segment are automatically converted to type
+UniversalSegment when appropriate.
+
+  useg: UniversalSegment(Integer) := 3..10
+    3..10
+                                Type: UniversalSegment Integer
+
+The operation hasHi is used to test whether a segment has a hi end point.
+
+  hasHi pints
+    false
+                                Type: Boolean
+
+  hasHi nevens
+    false
+                                Type: Boolean
+
+  hasHi useg
+    true
+                                Type: Boolean
+
+All operations available on type Segment apply to UniversalSegment, with 
+the proviso that expansions produce streams rather than lists.  This is 
+to accommodate infinite expansions.
+
+  expand pints
+    [1,2,3,4,5,6,7,8,9,10,...]
+                                Type: Stream Integer
+
+  expand nevens
+    [0,- 2,- 4,- 6,- 8,- 10,- 12,- 14,- 16,- 18,...]
+                                Type: Stream Integer
+
+  expand [1, 3, 10..15, 100..]
+    [1,3,10,11,12,13,14,15,100,101,...]
+                                Type: Stream Integer
+
+See Also:
+o )help Segment
+o )help SegmentBinding
+o )help List
+o )help Stream
+o )show UniversalSegment
+o $AXIOM/doc/src/algebra/seg.spad.dvi
+
+@
 <<domain UNISEG UniversalSegment>>=
 )abbrev domain UNISEG UniversalSegment
 ++ Author:  Robert S. Sutor
diff --git a/src/algebra/si.spad.pamphlet b/src/algebra/si.spad.pamphlet
index b7be18a..04d6d1f 100644
--- a/src/algebra/si.spad.pamphlet
+++ b/src/algebra/si.spad.pamphlet
@@ -651,6 +651,192 @@ This is eventually forcibly replaced by a recompiled version.
 The definition of {\bf one?} has been rewritten 
 as it relies on calling {\bf ONEP} which is a function specific
 to Codemist Common Lisp but is not defined in Common Lisp.
+<<SingleInteger.input>>=
+-- si.spad.pamphlet SingleInteger.input
+)spool SingleInteger.output
+)set message test on
+)set message auto off
+)clear all
+--S 1
+min()$SingleInteger
+--R 
+--R
+--R   (1)  - 2147483648
+--R                                                          Type: SingleInteger
+--E 1
+
+--S 2
+max()$SingleInteger
+--R 
+--R
+--R   (2)  2147483647
+--R                                                          Type: SingleInteger
+--E 2
+
+--S 3
+a := 1234 :: SingleInteger
+--R 
+--R
+--R   (3)  1234
+--R                                                          Type: SingleInteger
+--E 3
+
+--S 4
+b := 124$SingleInteger
+--R 
+--R
+--R   (4)  124
+--R                                                          Type: SingleInteger
+--E 4
+
+--S 5
+gcd(a,b)
+--R 
+--R
+--R   (5)  2
+--R                                                          Type: SingleInteger
+--E 5
+
+--S 6
+lcm(a,b)
+--R 
+--R
+--R   (6)  76508
+--R                                                          Type: SingleInteger
+--E 6
+
+--S 7
+mulmod(5,6,13)$SingleInteger
+--R 
+--R
+--R   (7)  4
+--R                                                          Type: SingleInteger
+--E 7
+
+--S 8
+positiveRemainder(37,13)$SingleInteger
+--R 
+--R
+--R   (8)  11
+--R                                                          Type: SingleInteger
+--E 8
+
+--S 9
+And(3,4)$SingleInteger
+--R 
+--R
+--R   (9)  0
+--R                                                          Type: SingleInteger
+--E 9
+
+--S 10
+shift(1,4)$SingleInteger
+--R 
+--R
+--R   (10)  16
+--R                                                          Type: SingleInteger
+--E 10
+
+--S 11
+shift(31,-1)$SingleInteger
+--R 
+--R
+--R   (11)  15
+--R                                                          Type: SingleInteger
+--E 11
+)spool
+)lisp (bye)
+@
+<<SingleInteger.help>>=
+====================================================================
+SingleInteger examples
+====================================================================
+
+The SingleInteger domain is intended to provide support in Axiom
+for machine integer arithmetic.  It is generally much faster than
+(bignum) 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.
+
+You can discover the minimum and maximum values in your implementation
+by using min and max.
+
+  min()$SingleInteger
+    - 2147483648
+                              Type: SingleInteger
+
+  max()$SingleInteger
+    2147483647
+                              Type: SingleInteger
+
+To avoid confusion with Integer, which is the default type for
+integers, you usually need to work with declared variables.
+
+  a := 1234 :: SingleInteger
+    1234
+                              Type: SingleInteger
+
+or use package calling
+
+  b := 124$SingleInteger
+    124
+                              Type: SingleInteger
+
+You can add, multiply and subtract SingleInteger objects, and ask for
+the greatest common divisor (gcd).
+
+  gcd(a,b)
+    2
+                              Type: SingleInteger
+
+The least common multiple (lcm) is also available.
+
+  lcm(a,b)
+    76508
+                              Type: SingleInteger
+
+Operations mulmod, addmod, submod, and invmod are similar - they provide
+arithmetic modulo a given small integer.
+Here is 5 * 6 mod 13.
+
+  mulmod(5,6,13)$SingleInteger
+    4
+                              Type: SingleInteger
+
+To reduce a small integer modulo a prime, use positiveRemainder.
+
+  positiveRemainder(37,13)$SingleInteger
+    11
+                              Type: SingleInteger
+
+Operations And, Or, xor, and Not provide bit level operations on small
+integers.
+
+  And(3,4)$SingleInteger
+    0
+                              Type: SingleInteger
+
+Use shift(int,numToShift) to shift bits, where i is shifted left if
+numToShift is positive, right if negative.
+
+  shift(1,4)$SingleInteger
+    16
+                              Type: SingleInteger
+
+  shift(31,-1)$SingleInteger
+    15
+                              Type: SingleInteger
+
+Many other operations are available for small integers, including many
+of those provided for Integer.  
+
+See Also:
+o )help Integer
+o )show SingleInteger
+o $AXIOM/doc/src/algebra/si.spad.dvi
+
+@
 <<domain SINT SingleInteger>>=
 )abbrev domain SINT SingleInteger
 
diff --git a/src/algebra/sregset.spad.pamphlet b/src/algebra/sregset.spad.pamphlet
index 1988688..c0cdb44 100644
--- a/src/algebra/sregset.spad.pamphlet
+++ b/src/algebra/sregset.spad.pamphlet
@@ -1160,6 +1160,477 @@ SquareFreeRegularSetDecompositionPackage(R,E,V,P,TS): Exports == Implementation
 
 @
 \section{domain SREGSET SquareFreeRegularTriangularSet}
+<<SquareFreeRegularTriangularSet.input>>=
+-- sregset.spad.pamphlet SquareFreeRegularTriangularSet.input
+)spool SquareFreeRegularTriangularSet.output
+)set message test on
+)set message auto off
+)clear all
+--S 1 of 23
+R := Integer
+--R 
+--R
+--R   (1)  Integer
+--R                                                                 Type: Domain
+--E 1
+
+--S 2 of 23
+ls : List Symbol := [x,y,z,t]
+--R 
+--R
+--R   (2)  [x,y,z,t]
+--R                                                            Type: List Symbol
+--E 2
+
+--S 3 of 23
+V := OVAR(ls)
+--R 
+--R
+--R   (3)  OrderedVariableList [x,y,z,t]
+--R                                                                 Type: Domain
+--E 3
+
+--S 4 of 23
+E := IndexedExponents V
+--R 
+--R
+--R   (4)  IndexedExponents OrderedVariableList [x,y,z,t]
+--R                                                                 Type: Domain
+--E 4
+
+--S 5 of 23
+P := NSMP(R, V)
+--R 
+--R
+--R   (5)  NewSparseMultivariatePolynomial(Integer,OrderedVariableList [x,y,z,t])
+--R                                                                 Type: Domain
+--E 5
+
+--S 6 of 23
+x: P := 'x
+--R 
+--R
+--R   (6)  x
+--R Type: NewSparseMultivariatePolynomial(Integer,OrderedVariableList [x,y,z,t])
+--E 6
+
+--S 7 of 23
+y: P := 'y
+--R 
+--R
+--R   (7)  y
+--R Type: NewSparseMultivariatePolynomial(Integer,OrderedVariableList [x,y,z,t])
+--E 7
+
+--S 8 of 23
+z: P := 'z
+--R 
+--R
+--R   (8)  z
+--R Type: NewSparseMultivariatePolynomial(Integer,OrderedVariableList [x,y,z,t])
+--E 8
+
+--S 9 of 23
+t: P := 't
+--R 
+--R
+--R   (9)  t
+--R Type: NewSparseMultivariatePolynomial(Integer,OrderedVariableList [x,y,z,t])
+--E 9
+
+--S 10 of 23
+ST := SREGSET(R,E,V,P)
+--R 
+--R
+--R   (10)
+--R  SquareFreeRegularTriangularSet(Integer,IndexedExponents OrderedVariableList [
+--R  x,y,z,t],OrderedVariableList [x,y,z,t],NewSparseMultivariatePolynomial(Intege
+--R  r,OrderedVariableList [x,y,z,t]))
+--R                                                                 Type: Domain
+--E 10
+
+--S 11 of 23
+p1 := x ** 31 - x ** 6 - x - y
+--R 
+--R
+--R          31    6
+--R   (11)  x   - x  - x - y
+--R Type: NewSparseMultivariatePolynomial(Integer,OrderedVariableList [x,y,z,t])
+--E 11
+
+--S 12 of 23
+p2 := x ** 8  - z
+--R 
+--R
+--R          8
+--R   (12)  x  - z
+--R Type: NewSparseMultivariatePolynomial(Integer,OrderedVariableList [x,y,z,t])
+--E 12
+
+--S 13 of 23
+p3 := x ** 10 - t
+--R 
+--R
+--R          10
+--R   (13)  x   - t
+--R Type: NewSparseMultivariatePolynomial(Integer,OrderedVariableList [x,y,z,t])
+--E 13
+
+--S 14 of 23
+lp := [p1, p2, p3]
+--R 
+--R
+--R           31    6          8      10
+--R   (14)  [x   - x  - x - y,x  - z,x   - t]
+--RType: List NewSparseMultivariatePolynomial(Integer,OrderedVariableList [x,y,z,t])
+--E 14
+
+--S 15 of 23
+zeroSetSplit(lp)$ST
+--R 
+--R
+--R            5    4      2     3     8     5    3    2   4                2
+--R   (15)  [{z  - t ,t z y  + 2z y - t  + 2t  + t  - t ,(t  - t)x - t y - z }]
+--RType: List SquareFreeRegularTriangularSet(Integer,IndexedExponents OrderedVariableList [x,y,z,t],OrderedVariableList [x,y,z,t],NewSparseMultivariatePolynomial(Integer,OrderedVariableList [x,y,z,t]))
+--E 15
+
+--S 16 of 23
+zeroSetSplit(lp,false)$ST
+--R 
+--R
+--R   (16)
+--R      5    4      2     3     8     5    3    2   4                2
+--R   [{z  - t ,t z y  + 2z y - t  + 2t  + t  - t ,(t  - t)x - t y - z },
+--R      3      5            2    2
+--R    {t  - 1,z  - t,t y + z ,z x  - t}, {t,z,y,x}]
+--RType: List SquareFreeRegularTriangularSet(Integer,IndexedExponents OrderedVariableList [x,y,z,t],OrderedVariableList [x,y,z,t],NewSparseMultivariatePolynomial(Integer,OrderedVariableList [x,y,z,t]))
+--E 16
+
+--S 17 of 23
+T := REGSET(R,E,V,P)
+--R 
+--R
+--R   (17)
+--R  RegularTriangularSet(Integer,IndexedExponents OrderedVariableList [x,y,z,t],O
+--R  rderedVariableList [x,y,z,t],NewSparseMultivariatePolynomial(Integer,OrderedV
+--R  ariableList [x,y,z,t]))
+--R                                                                 Type: Domain
+--E 17
+
+--S 18 of 23
+lts := zeroSetSplit(lp,false)$T
+--R 
+--R
+--R   (18)
+--R      5    4      2     3     8     5    3    2   4                2
+--R   [{z  - t ,t z y  + 2z y - t  + 2t  + t  - t ,(t  - t)x - t y - z },
+--R      3      5          2     3         2
+--R    {t  - 1,z  - t,t z y  + 2z y + 1,z x  - t}, {t,z,y,x}]
+--RType: List RegularTriangularSet(Integer,IndexedExponents OrderedVariableList [x,y,z,t],OrderedVariableList [x,y,z,t],NewSparseMultivariatePolynomial(Integer,OrderedVariableList [x,y,z,t]))
+--E 18
+
+--S 19 of 23
+ts := lts.2
+--R 
+--R
+--R           3      5          2     3         2
+--R   (19)  {t  - 1,z  - t,t z y  + 2z y + 1,z x  - t}
+--RType: RegularTriangularSet(Integer,IndexedExponents OrderedVariableList [x,y,z,t],OrderedVariableList [x,y,z,t],NewSparseMultivariatePolynomial(Integer,OrderedVariableList [x,y,z,t]))
+--E 19
+
+--S 20 of 23
+pol := select(ts,'y)$T
+--R 
+--R
+--R              2     3
+--R   (20)  t z y  + 2z y + 1
+--RType: Union(NewSparseMultivariatePolynomial(Integer,OrderedVariableList [x,y,z,t]),...)
+--E 20
+
+--S 21 of 23
+tower := collectUnder(ts,'y)$T
+--R 
+--R
+--R           3      5
+--R   (21)  {t  - 1,z  - t}
+--RType: RegularTriangularSet(Integer,IndexedExponents OrderedVariableList [x,y,z,t],OrderedVariableList [x,y,z,t],NewSparseMultivariatePolynomial(Integer,OrderedVariableList [x,y,z,t]))
+--E 21
+
+--S 22 of 23
+pack := RegularTriangularSetGcdPackage(R,E,V,P,T)
+--R 
+--R
+--R   (22)
+--R  RegularTriangularSetGcdPackage(Integer,IndexedExponents OrderedVariableList [
+--R  x,y,z,t],OrderedVariableList [x,y,z,t],NewSparseMultivariatePolynomial(Intege
+--R  r,OrderedVariableList [x,y,z,t]),RegularTriangularSet(Integer,IndexedExponent
+--R  s OrderedVariableList [x,y,z,t],OrderedVariableList [x,y,z,t],NewSparseMultiv
+--R  ariatePolynomial(Integer,OrderedVariableList [x,y,z,t])))
+--R                                                                 Type: Domain
+--E 22
+
+--S 23 of 23
+toseSquareFreePart(pol,tower)$pack
+--R 
+--R
+--R                       2          3      5
+--R   (23)  [[val= t y + z ,tower= {t  - 1,z  - t}]]
+--RType: List Record(val: NewSparseMultivariatePolynomial(Integer,OrderedVariableList [x,y,z,t]),tower: RegularTriangularSet(Integer,IndexedExponents OrderedVariableList [x,y,z,t],OrderedVariableList [x,y,z,t],NewSparseMultivariatePolynomial(Integer,OrderedVariableList [x,y,z,t])))
+--E 23
+)spool
+)lisp (bye)
+@
+<<SquareFreeRegularTriangularSet.help>>=
+====================================================================
+SquareFreeRegularTriangularSet examples
+====================================================================
+
+The SquareFreeRegularTriangularSet domain constructor implements
+square-free regular triangular sets.  See the RegularTriangularSet
+domain constructor for general regular triangular sets.  Let T be a
+regular triangular set consisting of polynomials t1, ..., tm ordered
+by increasing main variables.  The regular triangular set T is
+square-free if T is empty or if t1, ..., tm-1 is square-free and if the
+polynomial tm is square-free as a univariate polynomial with coefficients 
+in the tower of simple extensions associated with 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 RegularTriangularSet domain constructor, the
+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 LazardSetSolvingPackage package constructor.
+
+N.B. When solving polynomial systems with the
+SquareFreeRegularTriangularSet domain constructor or the
+LazardSetSolvingPackage package constructor, decompositions have no
+redundant components.  See also LexTriangularPackage and
+ZeroDimensionalSolvePackage for the case of algebraic systems with a
+finite number of (complex) solutions.
+
+We shall explain now how to use the constructor SquareFreeRegularTriangularSet.
+
+This constructor takes four arguments.  The first one, R, is the
+coefficient ring of the polynomials; it must belong to the category
+GcdDomain.  The second one, E, is the exponent monoid of the
+polynomials; it must belong to the category OrderedAbelianMonoidSup.
+the third one, V, is the ordered set of variables; it must belong to
+the category OrderedSet.  The last one is the polynomial ring; it must
+belong to the category RecursivePolynomialCategory(R,E,V).  The
+abbreviation for SquareFreeRegularTriangularSet} is SREGSET.
+
+Note that the way of understanding triangular decompositions 
+is detailed in the example of the RegularTriangularSet constructor.
+
+Let us illustrate the use of this constructor with one example
+(Donati-Traverso).  Define the coefficient ring.
+
+  R := Integer
+    Integer
+                                 Type: Domain
+
+Define the list of variables,
+
+  ls : List Symbol := [x,y,z,t]
+    [x,y,z,t]
+                                 Type: List Symbol
+
+and make it an ordered set;
+
+  V := OVAR(ls)
+    OrderedVariableList [x,y,z,t]
+                                 Type: Domain
+
+then define the exponent monoid.
+
+  E := IndexedExponents V
+    IndexedExponents OrderedVariableList [x,y,z,t]
+                                 Type: Domain
+
+Define the polynomial ring.
+
+  P := NSMP(R, V)
+    NewSparseMultivariatePolynomial(Integer,OrderedVariableList [x,y,z,t])
+                                 Type: Domain
+
+Let the variables be polynomial.
+
+  x: P := 'x
+    x
+           Type: NewSparseMultivariatePolynomial(Integer,
+                                   OrderedVariableList [x,y,z,t])
+
+  y: P := 'y
+    y
+           Type: NewSparseMultivariatePolynomial(Integer,
+                                   OrderedVariableList [x,y,z,t])
+
+  z: P := 'z
+    z
+           Type: NewSparseMultivariatePolynomial(Integer,
+                                   OrderedVariableList [x,y,z,t])
+
+  t: P := 't
+    t
+           Type: NewSparseMultivariatePolynomial(Integer,
+                                   OrderedVariableList [x,y,z,t])
+
+Now call the SquareFreeRegularTriangularSet domain constructor.
+
+  ST := SREGSET(R,E,V,P)
+  SquareFreeRegularTriangularSet(Integer,IndexedExponents OrderedVariableList [
+  x,y,z,t],OrderedVariableList [x,y,z,t],NewSparseMultivariatePolynomial(Intege
+  r,OrderedVariableList [x,y,z,t]))
+                                  Type: Domain
+
+Define a polynomial system.
+
+  p1 := x ** 31 - x ** 6 - x - y
+      31    6
+     x   - x  - x - y
+           Type: NewSparseMultivariatePolynomial(Integer,
+                                   OrderedVariableList [x,y,z,t])
+
+  p2 := x ** 8  - z
+      8
+     x  - z
+           Type: NewSparseMultivariatePolynomial(Integer,
+                                   OrderedVariableList [x,y,z,t])
+
+  p3 := x ** 10 - t
+      10
+     x   - t
+           Type: NewSparseMultivariatePolynomial(Integer,
+                                   OrderedVariableList [x,y,z,t])
+
+  lp := [p1, p2, p3]
+       31    6          8      10
+     [x   - x  - x - y,x  - z,x   - t]
+           Type: List NewSparseMultivariatePolynomial(Integer,
+                                        OrderedVariableList [x,y,z,t])
+
+First of all, let us solve this system in the sense of Kalkbrener.
+
+  zeroSetSplit(lp)$ST
+        5    4      2     3     8     5    3    2   4                2
+     [{z  - t ,t z y  + 2z y - t  + 2t  + t  - t ,(t  - t)x - t y - z }]
+        Type: List SquareFreeRegularTriangularSet(Integer,
+                     IndexedExponents OrderedVariableList [x,y,z,t],
+                     OrderedVariableList [x,y,z,t],
+                     NewSparseMultivariatePolynomial(Integer,
+                        OrderedVariableList [x,y,z,t]))
+
+And now in the sense of Lazard (or Wu and other authors).
+
+  zeroSetSplit(lp,false)$ST
+      5    4      2     3     8     5    3    2   4                2
+   [{z  - t ,t z y  + 2z y - t  + 2t  + t  - t ,(t  - t)x - t y - z },
+      3      5            2    2
+    {t  - 1,z  - t,t y + z ,z x  - t}, {t,z,y,x}]
+        Type: List SquareFreeRegularTriangularSet(Integer,
+                     IndexedExponents OrderedVariableList [x,y,z,t],
+                     OrderedVariableList [x,y,z,t],
+                     NewSparseMultivariatePolynomial(Integer,
+                        OrderedVariableList [x,y,z,t]))
+
+Now to see the difference with the RegularTriangularSet domain
+constructor, we define:
+
+  T := REGSET(R,E,V,P)
+  RegularTriangularSet(Integer,IndexedExponents OrderedVariableList [x,y,z,t],O
+  rderedVariableList [x,y,z,t],NewSparseMultivariatePolynomial(Integer,OrderedV
+  ariableList [x,y,z,t]))
+                                 Type: Domain
+
+and compute:
+
+  lts := zeroSetSplit(lp,false)$T
+      5    4      2     3     8     5    3    2   4                2
+   [{z  - t ,t z y  + 2z y - t  + 2t  + t  - t ,(t  - t)x - t y - z },
+      3      5          2     3         2
+    {t  - 1,z  - t,t z y  + 2z y + 1,z x  - t}, {t,z,y,x}]
+          Type: List RegularTriangularSet(Integer,
+                       IndexedExponents OrderedVariableList [x,y,z,t],
+                       OrderedVariableList [x,y,z,t],
+                       NewSparseMultivariatePolynomial(Integer,
+                          OrderedVariableList [x,y,z,t]))
+
+If you look at the second set in both decompositions in the sense of Lazard,
+you will see that the polynomial with main variable y is not the same.
+
+Let us understand what has happened.
+
+We define:
+
+  ts := lts.2
+           3      5          2     3         2
+   (19)  {t  - 1,z  - t,t z y  + 2z y + 1,z x  - t}
+        Type: RegularTriangularSet(Integer,
+                IndexedExponents OrderedVariableList [x,y,z,t],
+                OrderedVariableList [x,y,z,t],
+                NewSparseMultivariatePolynomial(Integer,
+                   OrderedVariableList [x,y,z,t]))
+
+  pol := select(ts,'y)$T
+          2     3
+     t z y  + 2z y + 1
+      Type: Union(NewSparseMultivariatePolynomial(Integer,
+                              OrderedVariableList [x,y,z,t]),...)
+
+  tower := collectUnder(ts,'y)$T
+       3      5
+     {t  - 1,z  - t}
+      Type: RegularTriangularSet(Integer,
+              IndexedExponents OrderedVariableList [x,y,z,t],
+              OrderedVariableList [x,y,z,t],
+              NewSparseMultivariatePolynomial(Integer,
+                 OrderedVariableList [x,y,z,t]))
+
+  pack := RegularTriangularSetGcdPackage(R,E,V,P,T)
+  RegularTriangularSetGcdPackage(Integer,IndexedExponents OrderedVariableList [
+  x,y,z,t],OrderedVariableList [x,y,z,t],NewSparseMultivariatePolynomial(Intege
+  r,OrderedVariableList [x,y,z,t]),RegularTriangularSet(Integer,IndexedExponent
+  s OrderedVariableList [x,y,z,t],OrderedVariableList [x,y,z,t],NewSparseMultiv
+  ariatePolynomial(Integer,OrderedVariableList [x,y,z,t])))
+                                     Type: Domain
+
+Then we compute:
+
+  toseSquareFreePart(pol,tower)$pack
+                  2          3      5
+    [[val= t y + z ,tower= {t  - 1,z  - t}]]
+       Type: List Record(val: NewSparseMultivariatePolynomial(Integer,
+                                  OrderedVariableList [x,y,z,t]),
+                         tower: RegularTriangularSet(Integer,
+                           IndexedExponents OrderedVariableList [x,y,z,t],
+                           OrderedVariableList [x,y,z,t],
+                           NewSparseMultivariatePolynomial(Integer,
+                               OrderedVariableList [x,y,z,t])))
+
+See Also:
+o )help GcdDomain
+o )help OrderedAbelianMonoidSup
+o )help OrderedSet
+o )help RecursivePolynomialCategory
+o )help ZeroDimensionalSolvePackage
+o )help LexTriangularPackage
+o )help LazardSetSolvingPackage
+o )help RegularTriangularSet
+o )show SquareFreeRegularTriangularSet
+o $AXIOM/doc/src/algebra/sregset.spad.dvi
+
+@
 <<domain SREGSET SquareFreeRegularTriangularSet>>=
 )abbrev domain SREGSET SquareFreeRegularTriangularSet
 ++ Author: Marc Moreno Maza
diff --git a/src/algebra/stream.spad.pamphlet b/src/algebra/stream.spad.pamphlet
index 4edd850..1d68e08 100644
--- a/src/algebra/stream.spad.pamphlet
+++ b/src/algebra/stream.spad.pamphlet
@@ -539,6 +539,188 @@ CyclicStreamTools(S,ST): Exports == Implementation where
 
 @
 \section{domain STREAM Stream}
+<<Stream.input>>=
+-- stream.spad.pamphlet Stream.input
+)spool Stream.output
+)set message test on
+)set message auto off
+)clear all
+--S 1 of 12
+ints := [i for i in 0..]
+--R 
+--R
+--R   (1)  [0,1,2,3,4,5,6,7,8,9,...]
+--R                                              Type: Stream NonNegativeInteger
+--E 1
+
+--S 2 of 12
+f : List INT -> List INT
+--R 
+--R                                                                   Type: Void
+--E 2
+
+--S 3 of 12
+f x == [x.1 + x.2, x.1]
+--R 
+--R                                                                   Type: Void
+--E 3
+
+--S 4 of 12
+fibs := [i.2 for i in [generate(f,[1,1])]]
+--R 
+--R   Compiling function f with type List Integer -> List Integer 
+--R
+--R   (4)  [1,1,2,3,5,8,13,21,34,55,...]
+--R                                                         Type: Stream Integer
+--E 4
+
+--S 5 of 12
+[i for i in ints | odd? i]
+--R 
+--R
+--R   (5)  [1,3,5,7,9,11,13,15,17,19,...]
+--R                                              Type: Stream NonNegativeInteger
+--E 5
+
+--S 6 of 12
+odds := [2*i+1 for i in ints]
+--R 
+--R
+--R   (6)  [1,3,5,7,9,11,13,15,17,19,...]
+--R                                              Type: Stream NonNegativeInteger
+--E 6
+
+--S 7 of 12
+scan(0,+,odds)
+--R 
+--R
+--R   (7)  [1,4,9,16,25,36,49,64,81,100,...]
+--R                                              Type: Stream NonNegativeInteger
+--E 7
+
+--S 8 of 12
+[i*j for i in ints for j in odds]
+--R 
+--R
+--R   (8)  [0,3,10,21,36,55,78,105,136,171,...]
+--R                                              Type: Stream NonNegativeInteger
+--E 8
+
+--S 9 of 12
+map(*,ints,odds)
+--R 
+--R
+--R   (9)  [0,3,10,21,36,55,78,105,136,171,...]
+--R                                              Type: Stream NonNegativeInteger
+--E 9
+
+--S 10 of 12
+first ints
+--R 
+--R
+--R   (10)  0
+--R                                                     Type: NonNegativeInteger
+--E 10
+
+--S 11 of 12
+rest ints
+--R 
+--R
+--R   (11)  [1,2,3,4,5,6,7,8,9,10,...]
+--R                                              Type: Stream NonNegativeInteger
+--E 11
+
+--S 12 of 12
+fibs 20
+--R 
+--R
+--R   (12)  6765
+--R                                                        Type: PositiveInteger
+--E 12
+)spool
+)lisp (bye)
+@
+<<Stream.help>>=
+====================================================================
+Stream examples
+====================================================================
+
+A Stream object is represented as a list whose last element contains
+the wherewithal to create the next element, should it ever be required.
+
+Let ints be the infinite stream of non-negative integers.
+
+  ints := [i for i in 0..]
+    [0,1,2,3,4,5,6,7,8,9,...]
+                                 Type: Stream NonNegativeInteger
+
+By default, ten stream elements are calculated.  This number may be
+changed to something else by the system command 
+  )set streams calculate
+
+More generally, you can construct a stream by specifying its initial
+value and a function which, when given an element, creates the next element.
+
+  f : List INT -> List INT
+                                 Type: Void
+
+  f x == [x.1 + x.2, x.1]
+                                 Type: Void
+
+  fibs := [i.2 for i in [generate(f,[1,1])]]
+    [1,1,2,3,5,8,13,21,34,55,...]
+                                 Type: Stream 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.
+
+  [i for i in ints | odd? i]
+    [1,3,5,7,9,11,13,15,17,19,...]
+                                 Type: Stream NonNegativeInteger
+
+  odds := [2*i+1 for i in ints]
+    [1,3,5,7,9,11,13,15,17,19,...]
+                                 Type: Stream NonNegativeInteger
+
+You can accumulate the initial segments of a stream using the scan operation.
+
+  scan(0,+,odds)
+    [1,4,9,16,25,36,49,64,81,100,...]
+                                 Type: Stream NonNegativeInteger
+
+The corresponding elements of two or more streams can be combined in this way.
+
+  [i*j for i in ints for j in odds]
+    [0,3,10,21,36,55,78,105,136,171,...]
+                                 Type: Stream NonNegativeInteger
+
+  map(*,ints,odds)
+    [0,3,10,21,36,55,78,105,136,171,...]
+                                 Type: Stream NonNegativeInteger
+
+Many operations similar to those applicable to lists are available for
+streams.
+
+  first ints
+    0
+                                 Type: NonNegativeInteger
+
+  rest ints
+    [1,2,3,4,5,6,7,8,9,10,...]
+                                 Type: Stream NonNegativeInteger
+
+  fibs 20
+    6765
+                                 Type: PositiveInteger
+
+See Also:
+o )help StreamFunctions1
+o )help StreamFunctions2
+o )help StreamFunctions3
+o )show Stream
+o $AXIOM/doc/src/algebra/stream.spad.dvi
+
+@
 <<domain STREAM Stream>>=
 )abbrev domain STREAM Stream
 ++ Implementation of streams via lazy evaluation
diff --git a/src/algebra/string.spad.pamphlet b/src/algebra/string.spad.pamphlet
index fe270fc..a7af939 100644
--- a/src/algebra/string.spad.pamphlet
+++ b/src/algebra/string.spad.pamphlet
@@ -1056,6 +1056,510 @@ Note that this code is not included in the generated catdef.spad file.
 (MAKEPROP (QUOTE |IndexedString|) (QUOTE |infovec|) (LIST (QUOTE #(NIL NIL NIL NIL NIL NIL (|local| |#1|) (|NonNegativeInteger|) (|Character|) |ISTRING;new;NniC$;1| |ISTRING;empty;$;2| (|Boolean|) |ISTRING;empty?;$B;3| |ISTRING;#;$Nni;4| |ISTRING;=;2$B;5| |ISTRING;<;2$B;6| |ISTRING;concat;3$;7| |ISTRING;copy;2$;8| (|Integer|) (|UniversalSegment| 18) (0 . SEGMENT) |ISTRING;elt;$Us$;31| (6 . SEGMENT) |ISTRING;insert;2$I$;9| (|String|) (|OutputForm|) (11 . |outputForm|) |ISTRING;coerce;$Of;10| |ISTRING;minIndex;$I;11| (|CharacterClass|) (16 . |upperCase|) (20 . |upperCase|) (|Mapping| 8 8) (25 . |map!|) |ISTRING;upperCase!;2$;12| (31 . |lowerCase|) (35 . |lowerCase|) |ISTRING;lowerCase!;2$;13| |ISTRING;latex;$S;14| (40 . |lo|) (45 . |hasHi|) (50 . |hi|) (55 . |maxIndex|) (60 . |space|) |ISTRING;replace;$Us2$;15| |ISTRING;setelt;$I2C;16| |ISTRING;substring?;2$IB;17| |ISTRING;position;2$2I;18| |ISTRING;position;C$2I;19| (64 . |member?|) |ISTRING;position;Cc$2I;20| |ISTRING;suffi!
x?;2$B;21| |ISTRING;elt;$IC;30| (70 . |=|) (|List| |$$|) (76 . |empty|) (80 . |concat|) (86 . |reverse!|) (|List| |$|) |ISTRING;split;$CL;22| |ISTRING;split;$CcL;23| |ISTRING;leftTrim;$C$;24| |ISTRING;leftTrim;$Cc$;25| |ISTRING;rightTrim;$C$;26| |ISTRING;rightTrim;$Cc$;27| |ISTRING;copyInto!;2$I$;29| |ISTRING;concat;L$;28| (91 . |ord|) |ISTRING;hash;$I;32| |ISTRING;match;2$CNni;33| (96 . |prefix?|) |ISTRING;match?;2$CB;34| (|List| 8) (|List| 74) (|Equation| 8) (|Mapping| 8 8 8) (|InputForm|) (|SingleInteger|) (|Mapping| 11 8) (|Mapping| 11 8 8) (|Void|) (|Union| 8 (QUOTE "failed")) (|List| 18))) (QUOTE #(|~=| 102 |upperCase!| 108 |upperCase| 113 |trim| 118 |swap!| 130 |suffix?| 137 |substring?| 143 |split| 150 |sorted?| 162 |sort!| 173 |sort| 184 |size?| 195 |setelt| 201 |select| 215 |sample| 221 |rightTrim| 225 |reverse!| 237 |reverse| 242 |replace| 247 |removeDuplicates| 254 |remove| 259 |reduce| 271 |qsetelt!| 292 |qelt| 299 |prefix?| 305 |position| 311 |parts| 344 |new| !
349 |more?| 355 |minIndex| 361 |min| 366 |merge| 372 |members!
| 385 |member?| 390 |maxIndex| 396 |max| 401 |match?| 407 |match| 414 |map!| 421 |map| 427 |lowerCase!| 440 |lowerCase| 445 |less?| 450 |leftTrim| 456 |latex| 468 |insert| 473 |indices| 487 |index?| 492 |hash| 498 |first| 508 |find| 513 |fill!| 519 |every?| 525 |eval| 531 |eq?| 557 |entry?| 563 |entries| 569 |empty?| 574 |empty| 579 |elt| 583 |delete| 608 |count| 620 |copyInto!| 632 |copy| 639 |convert| 644 |construct| 649 |concat| 654 |coerce| 677 |any?| 687 |>=| 693 |>| 699 |=| 705 |<=| 711 |<| 717 |#| 723)) (QUOTE ((|shallowlyMutable| . 0) (|finiteAggregate| . 0))) (CONS (|makeByteWordVec2| 7 (QUOTE (0 0 0 0 0 0 0 3 0 0 7 4 0 0 7 1 2 4))) (CONS (QUOTE #(|StringAggregate&| |OneDimensionalArrayAggregate&| |FiniteLinearAggregate&| |LinearAggregate&| |IndexedAggregate&| |Collection&| |HomogeneousAggregate&| |OrderedSet&| |Aggregate&| |EltableAggregate&| |Evalable&| |SetCategory&| NIL NIL |InnerEvalable&| NIL NIL |BasicType&|)) (CONS (QUOTE #((|StringAggregate|) (|OneDimension!
alArrayAggregate| 8) (|FiniteLinearAggregate| 8) (|LinearAggregate| 8) (|IndexedAggregate| 18 8) (|Collection| 8) (|HomogeneousAggregate| 8) (|OrderedSet|) (|Aggregate|) (|EltableAggregate| 18 8) (|Evalable| 8) (|SetCategory|) (|Type|) (|Eltable| 18 8) (|InnerEvalable| 8 8) (|CoercibleTo| 25) (|ConvertibleTo| 76) (|BasicType|))) (|makeByteWordVec2| 82 (QUOTE (2 19 0 18 18 20 1 19 0 18 22 1 25 0 24 26 0 29 0 30 1 8 0 0 31 2 0 0 32 0 33 0 29 0 35 1 8 0 0 36 1 19 18 0 39 1 19 11 0 40 1 19 18 0 41 1 0 18 0 42 0 8 0 43 2 29 11 8 0 49 2 8 11 0 0 53 0 54 0 55 2 54 0 2 0 56 1 54 0 0 57 1 8 18 0 67 2 0 11 0 0 70 2 1 11 0 0 1 1 0 0 0 34 1 0 0 0 1 2 0 0 0 8 1 2 0 0 0 29 1 3 0 80 0 18 18 1 2 0 11 0 0 51 3 0 11 0 0 18 46 2 0 58 0 29 60 2 0 58 0 8 59 1 3 11 0 1 2 0 11 79 0 1 1 3 0 0 1 2 0 0 79 0 1 1 3 0 0 1 2 0 0 79 0 1 2 0 11 0 7 1 3 0 8 0 19 8 1 3 0 8 0 18 8 45 2 0 0 78 0 1 0 0 0 1 2 0 0 0 8 63 2 0 0 0 29 64 1 0 0 0 1 1 0 0 0 1 3 0 0 0 19 0 44 1 1 0 0 1 2 1 0 8 0 1 2 0 0 78 0 1 4 1 8 75!
 0 8 8 1 3 0 8 75 0 8 1 2 0 8 75 0 1 3 0 8 0 18 8 1 2 0 8 0 1!
8 1 2 0 11 0 0 70 3 1 18 8 0 18 48 2 1 18 8 0 1 3 0 18 29 0 18 50 3 0 18 0 0 18 47 2 0 18 78 0 1 1 0 72 0 1 2 0 0 7 8 9 2 0 11 0 7 1 1 5 18 0 28 2 3 0 0 0 1 2 3 0 0 0 1 3 0 0 79 0 0 1 1 0 72 0 1 2 1 11 8 0 1 1 5 18 0 42 2 3 0 0 0 1 3 0 11 0 0 8 71 3 0 7 0 0 8 69 2 0 0 32 0 33 3 0 0 75 0 0 1 2 0 0 32 0 1 1 0 0 0 37 1 0 0 0 1 2 0 11 0 7 1 2 0 0 0 8 61 2 0 0 0 29 62 1 1 24 0 38 3 0 0 8 0 18 1 3 0 0 0 0 18 23 1 0 82 0 1 2 0 11 18 0 1 1 1 77 0 1 1 0 18 0 68 1 5 8 0 1 2 0 81 78 0 1 2 0 0 0 8 1 2 0 11 78 0 1 3 6 0 0 72 72 1 3 6 0 0 8 8 1 2 6 0 0 73 1 2 6 0 0 74 1 2 0 11 0 0 1 2 1 11 8 0 1 1 0 72 0 1 1 0 11 0 12 0 0 0 10 2 0 0 0 0 1 2 0 0 0 19 21 2 0 8 0 18 52 3 0 8 0 18 8 1 2 0 0 0 18 1 2 0 0 0 19 1 2 1 7 8 0 1 2 0 7 78 0 1 3 0 0 0 0 18 65 1 0 0 0 17 1 2 76 0 1 1 0 0 72 1 1 0 0 58 66 2 0 0 0 0 16 2 0 0 0 8 1 2 0 0 8 0 1 1 1 25 0 27 1 0 0 8 1 2 0 11 78 0 1 2 3 11 0 0 1 2 3 11 0 0 1 2 1 11 0 0 14 2 3 11 0 0 1 2 3 11 0 0 15 1 0 7 0 13)))))) (QUOTE |lookupComplete|))) 
 @
 \section{domain STRING String}
+<<String.input>>=
+-- string.spad.pamphlet String.input
+)spool String.output
+)set message test on
+)set message auto off
+)clear all
+--S 1 of 35
+hello := "Hello, I'm AXIOM!"
+--R 
+--R
+--R   (1)  "Hello, I'm AXIOM!"
+--R                                                                 Type: String
+--E 1
+
+--S 2 of 35
+said := "Jane said, \_"Look!\_""
+--R 
+--R
+--R   (2)  "Jane said, \"Look!\""
+--R                                                                 Type: String
+--E 2
+
+--S 3 of 35
+saw := "She saw exactly one underscore: \_\_." 
+--R 
+--R
+--R   (3)  "She saw exactly one underscore: \\."
+--R                                                                 Type: String
+--E 3
+
+--S 4 of 35
+gasp: String := new(32, char "x")
+--R 
+--R
+--R   (4)  "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
+--R                                                                 Type: String
+--E 4
+
+--S 5 of 35
+#gasp
+--R 
+--R
+--R   (5)  32
+--R                                                        Type: PositiveInteger
+--E 5
+
+--S 6 of 35
+hello.2
+--R 
+--R
+--R   (6)  e
+--R                                                              Type: Character
+--E 6
+
+--S 7 of 35
+hello 2
+--R 
+--R
+--R   (7)  e
+--R                                                              Type: Character
+--E 7
+
+--S 8 of 35
+hello(2)
+--R 
+--R
+--R   (8)  e
+--R                                                              Type: Character
+--E 8
+
+--S 9 of 35
+hullo := copy hello
+--R 
+--R
+--R   (9)  "Hello, I'm AXIOM!"
+--R                                                                 Type: String
+--E 9
+
+--S 10 of 35
+hullo.2 := char "u"; [hello, hullo]
+--R 
+--R
+--R   (10)  ["Hello, I'm AXIOM!","Hullo, I'm AXIOM!"]
+--R                                                            Type: List String
+--E 10
+
+--S 11 of 35
+saidsaw := concat ["alpha","---","omega"]
+--R 
+--R
+--R   (11)  "alpha---omega"
+--R                                                                 Type: String
+--E 11
+
+--S 12 of 35
+concat("hello ","goodbye")
+--R 
+--R
+--R   (12)  "hello goodbye"
+--R                                                                 Type: String
+--E 12
+
+--S 13 of 35
+"This " "is " "several " "strings " "concatenated."
+--R 
+--R
+--R   (13)  "This is several strings concatenated."
+--R                                                                 Type: String
+--E 13
+
+--S 14 of 35
+hello(1..5)
+--R 
+--R
+--R   (14)  "Hello"
+--R                                                                 Type: String
+--E 14
+
+--S 15 of 35
+hello(8..)
+--R 
+--R
+--R   (15)  "I'm AXIOM!"
+--R                                                                 Type: String
+--E 15
+
+--S 16 of 35
+split(hello, char " ")
+--R 
+--R
+--R   (16)  ["Hello,","I'm","AXIOM!"]
+--R                                                            Type: List String
+--E 16
+
+--S 17 of 35
+other := complement alphanumeric();
+--R
+--R                                                         Type: CharacterClass
+--E 17
+
+--S 18 of 35
+split(saidsaw, other)
+--R 
+--R
+--R   (18)  ["alpha","omega"]
+--R                                                            Type: List String
+--E 18
+
+--S 19 of 35
+trim("## ++ relax ++ ##", char "#")
+--R 
+--R
+--R   (19)  " ++ relax ++ "
+--R                                                                 Type: String
+--E 19
+
+--S 20 of 35
+trim("## ++ relax ++ ##", other)
+--R 
+--R
+--R   (20)  "relax"
+--R                                                                 Type: String
+--E 20
+
+--S 21 of 35
+leftTrim("## ++ relax ++ ##", other)
+--R 
+--R
+--R   (21)  "relax ++ ##"
+--R                                                                 Type: String
+--E 21
+
+--S 22 of 35
+rightTrim("## ++ relax ++ ##", other)
+--R 
+--R
+--R   (22)  "## ++ relax"
+--R                                                                 Type: String
+--E 22
+
+--S 23 of 35
+upperCase hello
+--R 
+--R
+--R   (23)  "HELLO, I'M AXIOM!"
+--R                                                                 Type: String
+--E 23
+
+--S 24 of 35
+lowerCase hello
+--R 
+--R
+--R   (24)  "hello, i'm axiom!"
+--R                                                                 Type: String
+--E 24
+
+--S 25 of 35
+prefix?("He", "Hello")
+--R 
+--R
+--R   (25)  true
+--R                                                                Type: Boolean
+--E 25
+
+--S 26 of 35
+prefix?("Her", "Hello")
+--R 
+--R
+--R   (26)  false
+--R                                                                Type: Boolean
+--E 26
+
+--S 27 of 35
+suffix?("", "Hello")
+--R 
+--R
+--R   (27)  true
+--R                                                                Type: Boolean
+--E 27
+
+--S 28 of 35
+suffix?("LO", "Hello")
+--R 
+--R
+--R   (28)  false
+--R                                                                Type: Boolean
+--E 28
+
+--S 29 of 35
+substring?("ll", "Hello", 3)
+--R 
+--R
+--R   (29)  true
+--R                                                                Type: Boolean
+--E 29
+
+--S 30 of 35
+substring?("ll", "Hello", 4)
+--R 
+--R
+--R   (30)  false
+--R                                                                Type: Boolean
+--E 30
+
+--S 31 of 35
+n := position("nd", "underground", 1)
+--R 
+--R
+--R   (31)  2
+--R                                                        Type: PositiveInteger
+--E 31
+
+--S 32 of 35
+n := position("nd", "underground", n+1)
+--R 
+--R
+--R   (32)  10
+--R                                                        Type: PositiveInteger
+--E 32
+
+--S 33 of 35
+n := position("nd", "underground", n+1)
+--R 
+--R
+--R   (33)  0
+--R                                                     Type: NonNegativeInteger
+--E 33
+
+--S 34 of 35
+position(char "d", "underground", 1)
+--R 
+--R
+--R   (34)  3
+--R                                                        Type: PositiveInteger
+--E 34
+
+--S 35 of 35
+position(hexDigit(), "underground", 1)
+--R 
+--R
+--R   (35)  3
+--R                                                        Type: PositiveInteger
+--E 35
+)spool
+)lisp (bye)
+@
+<<String.help>>=
+====================================================================
+String examples
+====================================================================
+
+The type String provides character strings.  Character strings
+provide all the operations for a one-dimensional array of characters,
+plus additional operations for manipulating text.  
+
+String values can be created using double quotes.
+
+  hello := "Hello, I'm AXIOM!"
+    "Hello, I'm AXIOM!"
+                               Type: String
+
+Note, however, that double quotes and underscores must be preceded by
+an extra underscore.
+
+  said := "Jane said, \_"Look!\_""
+    "Jane said, \"Look!\""
+                               Type: String
+
+  saw := "She saw exactly one underscore: \_\_." 
+    "She saw exactly one underscore: \\."
+                               Type: String
+
+It is also possible to use new to create a string of any size filled
+with a given character.  Since there are many new functions it is
+necessary to indicate the desired type.
+
+  gasp: String := new(32, char "x")
+    "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
+                               Type: String
+
+The length of a string is given by #.
+
+  #gasp
+    32
+                               Type: PositiveInteger
+
+Indexing operations allow characters to be extracted or replaced in strings.
+For any string s, indices lie in the range 1..#s.
+
+  hello.2
+    e
+                               Type: Character
+
+Indexing is really just the application of a string to a subscript, so
+any application syntax works.
+
+  hello 2
+    e
+                               Type: Character
+
+  hello(2)
+    e
+                               Type: Character
+
+If it is important not to modify a given string, it should be copied
+before any updating operations are used.
+
+  hullo := copy hello
+    "Hello, I'm AXIOM!"
+                               Type: String
+
+  hullo.2 := char "u"; [hello, hullo]
+    ["Hello, I'm AXIOM!","Hullo, I'm AXIOM!"]
+                               Type: List String
+
+Operations are provided to split and join strings.  The concat
+operation allows several strings to be joined together.
+
+  saidsaw := concat ["alpha","---","omega"]
+    "alpha---omega"
+                               Type: String
+
+There is a version of concat that works with two strings.
+
+  concat("hello ","goodbye")
+    "hello goodbye"
+                               Type: String
+
+Juxtaposition can also be used to concatenate strings.
+
+  "This " "is " "several " "strings " "concatenated."
+    "This is several strings concatenated."
+                               Type: String
+
+Substrings are obtained by giving an index range.
+
+  hello(1..5)
+    "Hello"
+                               Type: String
+
+  hello(8..)
+    "I'm AXIOM!"
+                               Type: String
+
+A string can be split into several substrings by giving a separation
+character or character class.
+
+  split(hello, char " ")
+    ["Hello,","I'm","AXIOM!"]
+                               Type: List String
+
+  other := complement alphanumeric();
+                               Type: CharacterClass
+
+  split(saidsaw, other)
+    ["alpha","omega"]
+                               Type: List String
+
+Unwanted characters can be trimmed from the beginning or end of a string
+using the operations trim, leftTrim and rightTrim.
+
+  trim("## ++ relax ++ ##", char "#")
+    " ++ relax ++ "
+                               Type: String
+
+Each of these functions takes a string and a second argument to specify
+the characters to be discarded.
+
+  trim("## ++ relax ++ ##", other)
+    "relax"
+                               Type: String
+
+The second argument can be given either as a single character or as a
+character class.
+
+  leftTrim("## ++ relax ++ ##", other)
+    "relax ++ ##"
+                               Type: String
+
+  rightTrim("## ++ relax ++ ##", other)
+    "## ++ relax"
+                               Type: String
+
+Strings can be changed to upper case or lower case using the
+operations upperCase and lowerCase.
+
+  upperCase hello
+    "HELLO, I'M AXIOM!"
+                               Type: String
+
+The versions with the exclamation mark change the original string,
+while the others produce a copy.
+
+  lowerCase hello
+    "hello, i'm axiom!"
+                               Type: String
+
+Some basic string matching is provided.  The function prefix? tests
+whether one string is an initial prefix of another.
+
+  prefix?("He", "Hello")
+    true
+                               Type: Boolean
+
+  prefix?("Her", "Hello")
+    false
+                               Type: Boolean
+
+A similar function, suffix?, tests for suffixes.
+
+  suffix?("", "Hello")
+    true
+                               Type: Boolean
+
+  suffix?("LO", "Hello")
+    false
+                               Type: Boolean
+
+The function substring? tests for a substring given a starting position.
+
+  substring?("ll", "Hello", 3)
+    true
+                               Type: Boolean
+
+  substring?("ll", "Hello", 4)
+    false
+                               Type: Boolean
+
+A number of position functions locate things in strings.  If the first
+argument to position is a string, then position(s,t,i) finds the
+location of s as a substring of t starting the search at position i.
+
+  n := position("nd", "underground", 1)
+    2
+                               Type: PositiveInteger
+
+  n := position("nd", "underground", n+1)
+    10
+                               Type: PositiveInteger
+
+If s is not found, then 0 is returned (minIndex(s)-1 in IndexedString).
+
+  n := position("nd", "underground", n+1)
+    0
+                               Type: NonNegativeInteger
+
+To search for a specific character or a member of a character class,
+a different first argument is used.
+
+  position(char "d", "underground", 1)
+    3
+                               Type: PositiveInteger
+
+  position(hexDigit(), "underground", 1)
+    3
+                               Type: PositiveInteger
+
+See Also:
+o )help Character
+o )help CharacterClass
+o )show String
+o $AXIOM/doc/src/algebra/string.spad.dvi
+
+@
 <<domain STRING String>>=
 )abbrev domain STRING String
 ++ Description:
diff --git a/src/algebra/symbol.spad.pamphlet b/src/algebra/symbol.spad.pamphlet
index 96382e7..69de307 100644
--- a/src/algebra/symbol.spad.pamphlet
+++ b/src/algebra/symbol.spad.pamphlet
@@ -10,6 +10,387 @@
 \tableofcontents
 \eject
 \section{domain SYMBOL Symbol}
+<<Symbol.input>>=
+-- symbol.spad.pamphlet Symbol.input
+)spool Symbol.output
+)set message test on
+)set message auto off
+)clear all
+--S 1 of 24
+X: Symbol := 'x
+--R 
+--R
+--R   (1)  x
+--R                                                                 Type: Symbol
+--E 1
+
+--S 2 of 24
+XX: Symbol := x
+--R 
+--R
+--R   (2)  x
+--R                                                                 Type: Symbol
+--E 2
+
+--S 3 of 24
+A := 'a
+--R 
+--R
+--R   (3)  a
+--R                                                             Type: Variable a
+--E 3
+
+--S 4 of 24
+B := b
+--R 
+--R
+--R   (4)  b
+--R                                                             Type: Variable b
+--E 4
+
+--S 5 of 24
+x**2 + 1
+--R 
+--R
+--R         2
+--R   (5)  x  + 1
+--R                                                     Type: Polynomial Integer
+--E 5
+
+--S 6 of 24
+"Hello"::Symbol
+--R 
+--R
+--R   (6)  Hello
+--R                                                                 Type: Symbol
+--E 6
+
+--S 7 of 24
+new()$Symbol
+--R 
+--R
+--R   (7)  %A
+--R                                                                 Type: Symbol
+--E 7
+
+--S 8 of 24
+new()$Symbol
+--R 
+--R
+--R   (8)  %B
+--R                                                                 Type: Symbol
+--E 8
+
+--S 9 of 24
+new("xyz")$Symbol
+--R 
+--R
+--R   (9)  %xyz0
+--R                                                                 Type: Symbol
+--E 9
+
+--S 10 of 24
+X[i,j]
+--R 
+--R
+--R   (10)  x
+--R          i,j
+--R                                                                 Type: Symbol
+--E 10
+
+--S 11 of 24
+U := subscript(u, [1,2,1,2])
+--R 
+--R
+--R   (11)  u
+--R          1,2,1,2
+--R                                                                 Type: Symbol
+--E 11
+
+--S 12 of 24
+V := superscript(v, [n])
+--R 
+--R
+--R          n
+--R   (12)  v
+--R                                                                 Type: Symbol
+--E 12
+
+--S 13 of 24
+P := argscript(p, [t])
+--R 
+--R
+--R   (13)  p(t)
+--R                                                                 Type: Symbol
+--E 13
+
+--S 14 of 24
+scripted? U
+--R 
+--R
+--R   (14)  true
+--R                                                                Type: Boolean
+--E 14
+
+--S 15 of 24
+scripted? X
+--R 
+--R
+--R   (15)  false
+--R                                                                Type: Boolean
+--E 15
+
+--S 16 of 24
+string X
+--R 
+--R
+--R   (16)  "x"
+--R                                                                 Type: String
+--E 16
+
+--S 17 of 24
+name U
+--R 
+--R
+--R   (17)  u
+--R                                                                 Type: Symbol
+--E 17
+
+--S 18 of 24
+scripts U
+--R 
+--R
+--R   (18)  [sub= [1,2,1,2],sup= [],presup= [],presub= [],args= []]
+--RType: Record(sub: List OutputForm,sup: List OutputForm,presup: List OutputForm,presub: List OutputForm,args: List OutputForm)
+--E 18
+
+--S 19 of 24
+name X
+--R 
+--R
+--R   (19)  x
+--R                                                                 Type: Symbol
+--E 19
+
+--S 20 of 24
+scripts X
+--R 
+--R
+--R   (20)  [sub= [],sup= [],presup= [],presub= [],args= []]
+--RType: Record(sub: List OutputForm,sup: List OutputForm,presup: List OutputForm,presub: List OutputForm,args: List OutputForm)
+--E 20
+
+--S 21 of 24
+M := script(Mammoth, [ [i,j],[k,l],[0,1],[2],[u,v,w] ])
+--R 
+--R
+--R         0,1       k,l
+--R   (21)     Mammoth   (u,v,w)
+--R           2       i,j
+--R                                                                 Type: Symbol
+--E 21
+
+--S 22 of 24
+scripts M
+--R 
+--R
+--R   (22)  [sub= [i,j],sup= [k,l],presup= [0,1],presub= [2],args= [u,v,w]]
+--RType: Record(sub: List OutputForm,sup: List OutputForm,presup: List OutputForm,presub: List OutputForm,args: List OutputForm)
+--E 22
+
+--S 23 of 24
+N := script(Nut, [ [i,j],[k,l],[0,1] ])
+--R 
+--R
+--R         0,1   k,l
+--R   (23)     Nut
+--R               i,j
+--R                                                                 Type: Symbol
+--E 23
+
+--S 24 of 24
+scripts N
+--R 
+--R
+--R   (24)  [sub= [i,j],sup= [k,l],presup= [0,1],presub= [],args= []]
+--RType: Record(sub: List OutputForm,sup: List OutputForm,presup: List OutputForm,presub: List OutputForm,args: List OutputForm)
+--E 24
+)spool
+)lisp (bye)
+@
+<<Symbol.help>>=
+====================================================================
+Symbol examples
+====================================================================
+ 
+Symbols are one of the basic types manipulated by Axiom.  The 
+Symbol domain provides ways to create symbols of many varieties.
+
+The simplest way to create a symbol is to "single quote" an identifier.
+
+  X: Symbol := 'x
+    x
+                                    Type: Symbol
+
+This gives the symbol even if x has been assigned a value.  If x has
+not been assigned a value, then it is possible to omit the quote.
+
+  XX: Symbol := x
+    x
+                                    Type: Symbol
+
+Declarations must be used when working with symbols, because otherwise
+the interpreter tries to place values in a more specialized type Variable.
+
+  A := 'a
+    a
+                                    Type: Variable a
+
+  B := b
+    b
+                                    Type: Variable b
+
+The normal way of entering polynomials uses this fact.
+
+  x**2 + 1
+     2
+    x  + 1
+                                    Type: Polynomial Integer
+
+Another convenient way to create symbols is to convert a string.
+This is useful when the name is to be constructed by a program.
+
+  "Hello"::Symbol
+    Hello
+                                    Type: Symbol
+
+Sometimes it is necessary to generate new unique symbols, for example,
+to name constants of integration.  The expression new() generates a
+symbol starting with %.
+
+  new()$Symbol
+    %A
+                                    Type: Symbol
+
+Successive calls to new produce different symbols.
+
+  new()$Symbol
+    %B
+                                    Type: Symbol
+
+The expression new("s") produces a symbol starting with %s.
+
+  new("xyz")$Symbol
+    %xyz0
+                                    Type: Symbol
+
+A symbol can be adorned in various ways.  The most basic thing is
+applying a symbol to a list of subscripts.
+
+  X[i,j]
+     x
+      i,j
+                                    Type: Symbol
+
+Somewhat less pretty is to attach subscripts, superscripts or arguments.
+
+  U := subscript(u, [1,2,1,2])
+     u
+      1,2,1,2
+                                    Type: Symbol
+
+  V := superscript(v, [n])
+      n
+     v
+                                    Type: Symbol
+
+  P := argscript(p, [t])
+    p(t)
+                                    Type: Symbol
+
+It is possible to test whether a symbol has scripts using the scripted? test.
+
+  scripted? U
+    true
+                                    Type: Boolean
+
+  scripted? X
+    false
+                                    Type: Boolean
+
+If a symbol is not scripted, then it may be converted to a string.
+
+  string X
+    "x"
+                                    Type: String
+
+The basic parts can always be extracted using the name and scripts operations.
+
+  name U
+    u
+                                    Type: Symbol
+
+  scripts U
+    [sub= [1,2,1,2],sup= [],presup= [],presub= [],args= []]
+                  Type: Record(sub: List OutputForm,
+                               sup: List OutputForm,
+                               presup: List OutputForm,
+                               presub: List OutputForm,
+                               args: List OutputForm)
+
+  name X
+    x
+                                    Type: Symbol
+
+  scripts X
+    [sub= [],sup= [],presup= [],presub= [],args= []]
+                  Type: Record(sub: List OutputForm,
+                               sup: List OutputForm,
+                               presup: List OutputForm,
+                               presub: List OutputForm,
+                               args: List OutputForm)
+
+The most general form is obtained using the script operation.  This
+operation takes an argument which is a list containing, in this order,
+lists of subscripts, superscripts, presuperscripts, presubscripts and
+arguments to a symbol.
+
+  M := script(Mammoth, [ [i,j],[k,l],[0,1],[2],[u,v,w] ])
+     0,1       k,l
+        Mammoth   (u,v,w)
+       2       i,j
+                                    Type: Symbol
+
+  scripts M
+    [sub= [i,j],sup= [k,l],presup= [0,1],presub= [2],args= [u,v,w]]
+                  Type: Record(sub: List OutputForm,
+                               sup: List OutputForm,
+                               presup: List OutputForm,
+                               presub: List OutputForm,
+                               args: List OutputForm)
+
+If trailing lists of scripts are omitted, they are assumed to be empty.
+
+  N := script(Nut, [ [i,j],[k,l],[0,1] ])
+     0,1   k,l
+        Nut
+           i,j
+                                    Type: Symbol
+
+  scripts N
+    [sub= [i,j],sup= [k,l],presup= [0,1],presub= [],args= []]
+                  Type: Record(sub: List OutputForm,
+                               sup: List OutputForm,
+                               presup: List OutputForm,
+                               presub: List OutputForm,
+                               args: List OutputForm)
+
+
+See Also:
+o )show Symbol
+o $AXIOM/doc/src/algebra/symbol.spad.dvi
+
+@
 <<domain SYMBOL Symbol>>=
 )abbrev domain SYMBOL Symbol
 ++ Author: Stephen Watt
diff --git a/src/algebra/table.spad.pamphlet b/src/algebra/table.spad.pamphlet
index 11a0c2c..651950a 100644
--- a/src/algebra/table.spad.pamphlet
+++ b/src/algebra/table.spad.pamphlet
@@ -86,6 +86,307 @@ InnerTable(Key: SetCategory, Entry: SetCategory, addDom):Exports == Implementati
 
 @
 \section{domain TABLE Table}
+<<Table.input>>=
+-- table.spad.pamphlet Table.input
+)spool Table.output
+)set message test on
+)set message auto off
+)clear all
+--S 1 of 18
+t: Table(Polynomial Integer, String) := table()
+--R 
+--R
+--R   (1)  table()
+--R                                       Type: Table(Polynomial Integer,String)
+--E 1
+
+--S 2 of 18
+setelt(t, x**2 - 1, "Easy to factor")
+--R 
+--R
+--R   (2)  "Easy to factor"
+--R                                                                 Type: String
+--E 2
+
+--S 3 of 18
+t(x**3 + 1) := "Harder to factor"
+--R 
+--R
+--R   (3)  "Harder to factor"
+--R                                                                 Type: String
+--E 3
+
+--S 4 of 18
+t(x) := "The easiest to factor"
+--R 
+--R
+--R   (4)  "The easiest to factor"
+--R                                                                 Type: String
+--E 4
+
+--S 5 of 18
+elt(t, x)
+--R 
+--R
+--R   (5)  "The easiest to factor"
+--R                                                                 Type: String
+--E 5
+
+--S 6 of 18
+t.x
+--R 
+--R
+--R   (6)  "The easiest to factor"
+--R                                                                 Type: String
+--E 6
+
+--S 7 of 18
+t x
+--R 
+--R
+--R   (7)  "The easiest to factor"
+--R                                                                 Type: String
+--E 7
+
+--S 8 of 18
+t.(x**2 - 1)
+--R 
+--R
+--R   (8)  "Easy to factor"
+--R                                                                 Type: String
+--E 8
+
+--S 9 of 18
+t (x**3 + 1)
+--R 
+--R
+--R   (9)  "Harder to factor"
+--R                                                                 Type: String
+--E 9
+
+--S 10 of 18
+keys t
+--R 
+--R
+--R             3      2
+--R   (10)  [x,x  + 1,x  - 1]
+--R                                                Type: List Polynomial Integer
+--E 10
+
+--S 11 of 18
+search(x, t)
+--R 
+--R
+--R   (11)  "The easiest to factor"
+--R                                                      Type: Union(String,...)
+--E 11
+
+--S 12 of 18
+search(x**2, t)
+--R 
+--R
+--R   (12)  "failed"
+--R                                                    Type: Union("failed",...)
+--E 12
+
+--S 13 of 18
+search(x**2, t) case "failed"
+--R 
+--R
+--R   (13)  true
+--R                                                                Type: Boolean
+--E 13
+
+--S 14 of 18
+remove!(x**2-1, t)
+--R 
+--R
+--R   (14)  "Easy to factor"
+--R                                                      Type: Union(String,...)
+--E 14
+
+--S 15 of 18
+remove!(x-1, t)
+--R 
+--R
+--R   (15)  "failed"
+--R                                                    Type: Union("failed",...)
+--E 15
+
+--S 16 of 18
+#t
+--R 
+--R
+--R   (16)  2
+--R                                                        Type: PositiveInteger
+--E 16
+
+--S 17 of 18
+members t
+--R 
+--R
+--R   (17)  ["The easiest to factor","Harder to factor"]
+--R                                                            Type: List String
+--E 17
+
+--S 18 of 18
+count(s: String +-> prefix?("Hard", s), t)
+--R 
+--R
+--R   (18)  1
+--R                                                        Type: PositiveInteger
+--E 18
+)spool
+)lisp (bye)
+@
+<<Table.help>>=
+====================================================================
+Table examples
+====================================================================
+
+The 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.
+
+In this example the keys to the table are polynomials with integer
+coefficients.  The entries in the table are strings.
+
+  t: Table(Polynomial Integer, String) := table()
+    table()
+                               Type: Table(Polynomial Integer,String)
+
+To save an entry in the table, the setelt operation is used.  This can
+be called directly, giving the table a key and an entry.
+
+  setelt(t, x**2 - 1, "Easy to factor")
+    "Easy to factor"
+                               Type: String
+
+Alternatively, you can use assignment syntax.
+
+  t(x**3 + 1) := "Harder to factor"
+    "Harder to factor"
+                               Type: String
+
+  t(x) := "The easiest to factor"
+    "The easiest to factor"
+                               Type: String
+
+Entries are retrieved from the table by calling the elt operation.
+
+  elt(t, x)
+    "The easiest to factor"
+                               Type: String
+
+This operation is called when a table is "applied" to a key using this
+or the following syntax.
+
+  t.x
+    "The easiest to factor"
+                               Type: String
+
+  t x
+    "The easiest to factor"
+                               Type: String
+
+Parentheses are used only for grouping.  They are needed if the key is
+an infixed expression.
+
+  t.(x**2 - 1)
+    "Easy to factor"
+                               Type: String
+
+Note that the elt operation is used only when the key is known to be
+in the table, otherwise an error is generated.
+
+  t (x**3 + 1)
+    "Harder to factor"
+                               Type: String
+
+You can get a list of all the keys to a table using the keys operation.
+
+  keys t
+        3      2
+    [x,x  + 1,x  - 1]
+                               Type: List Polynomial Integer
+
+If you wish to test whether a key is in a table, the search operation
+is used.  This operation returns either an entry or "failed".
+
+  search(x, t)
+    "The easiest to factor"
+                               Type: Union(String,...)
+
+  search(x**2, t)
+    "failed"
+                               Type: Union("failed",...)
+
+The return type is a union so the success of the search can be tested
+using case.  
+
+  search(x**2, t) case "failed"
+    true
+                               Type: Boolean
+
+The remove operation is used to delete values from a table.
+
+  remove!(x**2-1, t)
+    "Easy to factor"
+                               Type: Union(String,...)
+
+If an entry exists under the key, then it is returned.  Otherwise
+remove returns "failed".
+
+  remove!(x-1, t)
+    "failed"
+                               Type: Union("failed",...)
+
+The number of key-entry pairs can be found using the # operation.
+
+  #t
+    2
+                               Type: PositiveInteger
+
+Just as keys returns a list of keys to the table, a list of all the
+entries can be obtained using the members operation.
+
+  members t
+   (17)  ["The easiest to factor","Harder to factor"]
+                               Type: List String
+
+A number of useful operations take functions and map them on to the
+table to compute the result.  Here we count the entries which have
+"Hard" as a prefix.
+
+  count(s: String +-> prefix?("Hard", s), t)
+    1
+                               Type: PositiveInteger
+
+Other table types are provided to support various needs.
+  o 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.
+  o EqTable gives tables in which keys are considered equal only when 
+    they are in fact the same instance of a structure.
+  o StringTable should be used when the keys are known to be strings.
+  o SparseTable provides tables with default entries, so lookup never fails.
+    The GeneralSparseTable constructor can be used to make any table type 
+    behave this way.
+  o KeyedAccessFile allows values to be saved in a file, accessed as a table.
+
+See Also:
+o )help AssociationList
+o )help EqTable
+o )help StringTable
+o )help SparseTable
+o )help GeneralSparseTable
+o )help KeyedAccessFile
+o )show Table
+o $AXIOM/doc/src/algebra/table.spad.dvi
+
+@
 <<domain TABLE Table>>=
 )abbrev domain TABLE Table
 ++ Author: Stephen M. Watt, Barry Trager
@@ -239,6 +540,78 @@ EqTable(Key: SetCategory, Entry: SetCategory) ==
 
 @
 \section{domain STRTBL StringTable}
+<<StringTable.input>>=
+-- table.spad.pamphlet StringTable.input
+)spool StringTable.output
+)set message test on
+)set message auto off
+)clear all
+--S 1 of 3
+t: StringTable(Integer) := table()
+--R 
+--R
+--R   (1)  table()
+--R                                                    Type: StringTable Integer
+--E 1
+
+--S 2 of 3
+for s in split("My name is Ian Watt.",char " ")
+  repeat
+    t.s := #s
+--R 
+--R                                                                   Type: Void
+--E 2
+
+--S 3 of 3
+for key in keys t repeat output [key, t.key]
+--R 
+--R   ["Watt.",5]
+--R   ["Ian",3]
+--R   ["is",2]
+--R   ["name",4]
+--R   ["My",2]
+--R                                                                   Type: Void
+--E 3
+)spool
+)lisp (bye)
+@
+<<StringTable.help>>=
+====================================================================
+StringTable examples
+====================================================================
+
+This domain provides a table type in which the keys are known to be strings 
+so special techniques can be used.  Other than performance, the type 
+StringTable(S) should behave exactly the same way as Table(String,S).
+
+This creates a new table whose keys are strings.
+
+  t: StringTable(Integer) := table()
+    table()
+                               Type: StringTable Integer
+
+The value associated with each string key is the number of characters
+in the string.
+
+for s in split("My name is Ian Watt.",char " ")
+  repeat
+    t.s := #s
+                               Type: Void
+
+  for key in keys t repeat output [key, t.key]
+   ["Watt.",5]
+   ["Ian",3]
+   ["is",2]
+   ["name",4]
+   ["My",2]
+                               Type: Void
+
+See Also:
+o )help Table
+o )show StringTable
+o $AXIOM/doc/src/algebra/table.spad.dvi
+
+@
 <<domain STRTBL StringTable>>=
 )abbrev domain STRTBL StringTable
 ++ Author: Stephen M. Watt
@@ -380,6 +753,128 @@ GeneralSparseTable(Key, Entry, Tbl, dent): TableAggregate(Key, Entry) == Impl
 
 @
 \section{domain STBL SparseTable}
+<<SparseTable.input>>=
+-- table.spad.pamphlet SparseTable.input
+)spool SparseTable.output
+)set message test on
+)set message auto off
+)clear all
+--S 1 of 7
+t: SparseTable(Integer, String, "Try again!") := table()
+--R 
+--R
+--R   (1)  table()
+--R                                 Type: SparseTable(Integer,String,Try again!)
+--E 1
+
+--S 2 of 7
+t.3 := "Number three"
+--R 
+--R
+--R   (2)  "Number three"
+--R                                                                 Type: String
+--E 2
+
+--S 3 of 7
+t.4 := "Number four"
+--R 
+--R
+--R   (3)  "Number four"
+--R                                                                 Type: String
+--E 3
+
+--S 4 of 7
+t.3
+--R 
+--R
+--R   (4)  "Number three"
+--R                                                                 Type: String
+--E 4
+
+--S 5 of 7
+t.2
+--R 
+--R
+--R   (5)  "Try again!"
+--R                                                                 Type: String
+--E 5
+
+--S 6 of 7
+keys t
+--R 
+--R
+--R   (6)  [4,3]
+--R                                                           Type: List Integer
+--E 6
+
+--S 7 of 7
+entries t
+--R 
+--R
+--R   (7)  ["Number four","Number three"]
+--R                                                            Type: List String
+--E 7
+)spool
+)lisp (bye)
+@
+<<SparseTable.help>>=
+====================================================================
+SparseTable examples
+====================================================================
+
+The SparseTable domain provides a general purpose table type with
+default entries.
+
+Here we create a table to save strings under integer keys.  The value
+"Try again!" is returned if no other value has been stored for a key.
+
+  t: SparseTable(Integer, String, "Try again!") := table()
+    table()
+                           Type: SparseTable(Integer,String,Try again!)
+
+Entries can be stored in the table.
+
+  t.3 := "Number three"
+    "Number three"
+                           Type: String
+
+  t.4 := "Number four"
+    "Number four"
+                           Type: String
+
+These values can be retrieved as usual, but if a look up fails the
+default entry will be returned.
+
+  t.3
+    "Number three"
+                           Type: String
+
+  t.2
+    "Try again!"
+                           Type: String
+
+To see which values are explicitly stored, the keys and entries
+functions can be used.
+
+  keys t
+    [4,3]
+                           Type: List Integer
+
+  entries t
+    ["Number four","Number three"]
+                           Type: List String
+
+If a specific table representation is required, the GeneralSparseTable
+constructor should be used.  The domain SparseTable(K, E, dflt)} is
+equivalent to GeneralSparseTable(K,E,Table(K,E), dflt).
+
+See Also:
+o )help Table
+o )help GeneralSparseTable
+o )show SparseTable
+o $AXIOM/doc/src/algebra/table.spad.dvi
+
+@
 <<domain STBL SparseTable>>=
 )abbrev domain STBL SparseTable
 ++ Author: Stephen M. Watt
diff --git a/src/algebra/triset.spad.pamphlet b/src/algebra/triset.spad.pamphlet
index 2832762..7d51c02 100644
--- a/src/algebra/triset.spad.pamphlet
+++ b/src/algebra/triset.spad.pamphlet
@@ -1448,6 +1448,316 @@ PolynomialSetUtilitiesPackage (R,E,V,P) : Exports == Implementation where
 
 @
 \section{domain WUTSET WuWenTsunTriangularSet}
+<<WuWenTsunTriangularSet.input>>=
+-- triset.spad.pamphlet WuWenTsunTriangularSet.input
+)spool WuWenTsunTriangularSet.output
+)set message test on
+)set message auto off
+)clear all
+--S 1 of 16
+R := Integer
+--R 
+--R
+--R   (1)  Integer
+--R                                                                 Type: Domain
+--E 1
+
+--S 2 of 16
+ls : List Symbol := [x,y,z,t]
+--R 
+--R
+--R   (2)  [x,y,z,t]
+--R                                                            Type: List Symbol
+--E 2
+
+--S 3 of 16
+V := OVAR(ls)
+--R 
+--R
+--R   (3)  OrderedVariableList [x,y,z,t]
+--R                                                                 Type: Domain
+--E 3
+
+--S 4 of 16
+E := IndexedExponents V
+--R 
+--R
+--R   (4)  IndexedExponents OrderedVariableList [x,y,z,t]
+--R                                                                 Type: Domain
+--E 4
+
+--S 5 of 16
+P := NSMP(R, V)
+--R 
+--R
+--R   (5)  NewSparseMultivariatePolynomial(Integer,OrderedVariableList [x,y,z,t])
+--R                                                                 Type: Domain
+--E 5
+
+--S 6 of 16
+x: P := 'x
+--R 
+--R
+--R   (6)  x
+--R Type: NewSparseMultivariatePolynomial(Integer,OrderedVariableList [x,y,z,t])
+--E 6
+
+--S 7 of 16
+y: P := 'y
+--R 
+--R
+--R   (7)  y
+--R Type: NewSparseMultivariatePolynomial(Integer,OrderedVariableList [x,y,z,t])
+--E 7
+
+--S 8 of 16
+z: P := 'z
+--R 
+--R
+--R   (8)  z
+--R Type: NewSparseMultivariatePolynomial(Integer,OrderedVariableList [x,y,z,t])
+--E 8
+
+--S 9 of 16
+t: P := 't
+--R 
+--R
+--R   (9)  t
+--R Type: NewSparseMultivariatePolynomial(Integer,OrderedVariableList [x,y,z,t])
+--E 9
+
+--S 10 of 16
+T := WUTSET(R,E,V,P)
+--R 
+--R
+--R   (10)
+--R  WuWenTsunTriangularSet(Integer,IndexedExponents OrderedVariableList [x,y,z,t]
+--R  ,OrderedVariableList [x,y,z,t],NewSparseMultivariatePolynomial(Integer,Ordere
+--R  dVariableList [x,y,z,t]))
+--R                                                                 Type: Domain
+--E 10
+
+--S 11 of 16
+p1 := x ** 31 - x ** 6 - x - y
+--R 
+--R
+--R          31    6
+--R   (11)  x   - x  - x - y
+--R Type: NewSparseMultivariatePolynomial(Integer,OrderedVariableList [x,y,z,t])
+--E 11
+
+--S 12 of 16
+p2 := x ** 8  - z
+--R 
+--R
+--R          8
+--R   (12)  x  - z
+--R Type: NewSparseMultivariatePolynomial(Integer,OrderedVariableList [x,y,z,t])
+--E 12
+
+--S 13 of 16
+p3 := x ** 10 - t
+--R 
+--R
+--R          10
+--R   (13)  x   - t
+--R Type: NewSparseMultivariatePolynomial(Integer,OrderedVariableList [x,y,z,t])
+--E 13
+
+--S 14 of 16
+lp := [p1, p2, p3]
+--R 
+--R
+--R           31    6          8      10
+--R   (14)  [x   - x  - x - y,x  - z,x   - t]
+--RType: List NewSparseMultivariatePolynomial(Integer,OrderedVariableList [x,y,z,t])
+--E 14
+
+--S 15 of 16
+characteristicSet(lp)$T
+--R 
+--R
+--R   (15)
+--R     5    4  4 2 2     3 4        7     4      6    6    3      3     3     3
+--R   {z  - t ,t z y  + 2t z y + (- t  + 2t  - t)z  + t z,(t  - 1)z x - z y - t }
+--RType: Union(WuWenTsunTriangularSet(Integer,IndexedExponents OrderedVariableList [x,y,z,t],OrderedVariableList [x,y,z,t],NewSparseMultivariatePolynomial(Integer,OrderedVariableList [x,y,z,t])),...)
+--E 15
+
+--S 16 of 16
+zeroSetSplit(lp)$T
+--R 
+--R
+--R   (16)
+--R                 3      5    4  3     3    2
+--R   [{t,z,y,x}, {t  - 1,z  - t ,z y + t ,z x  - t},
+--R      5    4  4 2 2     3 4        7     4      6    6    3      3     3     3
+--R    {z  - t ,t z y  + 2t z y + (- t  + 2t  - t)z  + t z,(t  - 1)z x - z y - t }]
+--RType: List WuWenTsunTriangularSet(Integer,IndexedExponents OrderedVariableList [x,y,z,t],OrderedVariableList [x,y,z,t],NewSparseMultivariatePolynomial(Integer,OrderedVariableList [x,y,z,t]))
+--E 16
+)spool
+)lisp (bye)
+@
+<<WuWenTsunTriangularSet.help>>=
+====================================================================
+WuWenTsunTriangularSet examples
+====================================================================
+
+The 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, R, is the
+coefficient ring of the polynomials; it must belong to the category
+IntegralDomain. The second one, E, is the exponent monoid of the
+polynomials; it must belong to the category OrderedAbelianMonoidSup.
+The third one, V, is the ordered set of variables; it must belong to
+the category OrderedSet.  The last one is the polynomial ring; it must
+belong to the category RecursivePolynomialCategory(R,E,V).  The
+abbreviation for WuWenTsunTriangularSet is WUTSET.
+
+Let us illustrate the facilities by an example.
+
+Define the coefficient ring.
+
+  R := Integer
+    Integer
+                               Type: Domain
+
+Define the list of variables,
+
+  ls : List Symbol := [x,y,z,t]
+    [x,y,z,t]
+                               Type: List Symbol
+
+and make it an ordered set;
+
+  V := OVAR(ls)
+    OrderedVariableList [x,y,z,t]
+                               Type: Domain
+
+then define the exponent monoid.
+
+  E := IndexedExponents V
+    IndexedExponents OrderedVariableList [x,y,z,t]
+                               Type: Domain
+
+Define the polynomial ring.
+
+  P := NSMP(R, V)
+    NewSparseMultivariatePolynomial(Integer,OrderedVariableList [x,y,z,t])
+                               Type: Domain
+
+Let the variables be polynomial.
+
+  x: P := 'x
+    x
+       Type: NewSparseMultivariatePolynomial(Integer,
+               OrderedVariableList [x,y,z,t])
+
+  y: P := 'y
+    y
+       Type: NewSparseMultivariatePolynomial(Integer,
+               OrderedVariableList [x,y,z,t])
+
+  z: P := 'z
+    z
+       Type: NewSparseMultivariatePolynomial(Integer,
+               OrderedVariableList [x,y,z,t])
+
+  t: P := 't
+    t
+       Type: NewSparseMultivariatePolynomial(Integer,
+               OrderedVariableList [x,y,z,t])
+
+Now call the WuWenTsunTriangularSet domain constructor.
+
+  T := WUTSET(R,E,V,P)
+  WuWenTsunTriangularSet(Integer,IndexedExponents OrderedVariableList [x,y,z,t]
+  ,OrderedVariableList [x,y,z,t],NewSparseMultivariatePolynomial(Integer,Ordere
+  dVariableList [x,y,z,t]))
+                               Type: Domain
+
+Define a polynomial system.
+
+  p1 := x ** 31 - x ** 6 - x - y
+      31    6
+     x   - x  - x - y
+               Type: NewSparseMultivariatePolynomial(Integer,
+                       OrderedVariableList [x,y,z,t])
+
+  p2 := x ** 8  - z
+      8
+     x  - z
+               Type: NewSparseMultivariatePolynomial(Integer,
+                       OrderedVariableList [x,y,z,t])
+
+  p3 := x ** 10 - t
+      10
+     x   - t
+               Type: NewSparseMultivariatePolynomial(Integer,
+                       OrderedVariableList [x,y,z,t])
+
+  lp := [p1, p2, p3]
+      31    6          8      10
+    [x   - x  - x - y,x  - z,x   - t]
+         Type: List NewSparseMultivariatePolynomial(Integer,
+                      OrderedVariableList [x,y,z,t])
+
+Compute a characteristic set of the system.
+
+  characteristicSet(lp)$T
+     5    4  4 2 2     3 4        7     4      6    6    3      3     3     3
+   {z  - t ,t z y  + 2t z y + (- t  + 2t  - t)z  + t z,(t  - 1)z x - z y - t }
+            Type: Union(WuWenTsunTriangularSet(Integer,
+                          IndexedExponents OrderedVariableList [x,y,z,t],
+                          OrderedVariableList [x,y,z,t],
+                          NewSparseMultivariatePolynomial(Integer,
+                            OrderedVariableList [x,y,z,t])),...)
+
+Solve the system.
+
+  zeroSetSplit(lp)$T
+                3      5    4  3     3    2
+  [{t,z,y,x}, {t  - 1,z  - t ,z y + t ,z x  - t},
+     5    4  4 2 2     3 4        7     4      6    6    3      3     3     3
+   {z  - t ,t z y  + 2t z y + (- t  + 2t  - t)z  + t z,(t  - 1)z x - z y - t }]
+         Type: List WuWenTsunTriangularSet(Integer,
+                      IndexedExponents OrderedVariableList [x,y,z,t],
+                      OrderedVariableList [x,y,z,t],
+                      NewSparseMultivariatePolynomial(Integer,
+                         OrderedVariableList [x,y,z,t]))
+
+The RegularTriangularSet and SquareFreeRegularTriangularSet domain 
+constructors, the LazardSetSolvingPackage package constructors as well as, 
+SquareFreeRegularTriangularSet and 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 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 RegularTriangularSet constructor.
+
+See Also:
+o )help RecursivePolynomialCategory
+o )help RegularTriangularSet
+o )help SquareFreeRegularTriangularSet
+o )help LazardSetSolvingPackage
+o )help ZeroDimensionalSolvePackage
+o )show WuWenTsunTriangularSet
+o $AXIOM/doc/src/algebra/triset.spad.dvi
+
+@
 <<domain WUTSET WuWenTsunTriangularSet>>=
 )abbrev domain WUTSET WuWenTsunTriangularSet
 ++ Author: Marc Moreno Maza (marc@nag.co.uk)
diff --git a/src/algebra/vector.spad.pamphlet b/src/algebra/vector.spad.pamphlet
index 0406479..9656917 100644
--- a/src/algebra/vector.spad.pamphlet
+++ b/src/algebra/vector.spad.pamphlet
@@ -124,6 +124,200 @@ IndexedVector(R:Type, mn:Integer):
  
 @
 \section{domain VECTOR Vector}
+<<Vector.input>>=
+-- vector.spad.pamphlet Vector.input
+)spool Vector.output
+)set message test on
+)set message auto off
+)clear all
+--S 1 of 11
+u : VECTOR INT := new(5,12)
+--R 
+--R
+--R   (1)  [12,12,12,12,12]
+--R                                                         Type: Vector Integer
+--E 1
+
+--S 2 of 11
+v : VECTOR INT := vector([1,2,3,4,5])
+--R 
+--R
+--R   (2)  [1,2,3,4,5]
+--R                                                         Type: Vector Integer
+--E 2
+
+--S 3 of 11
+#(v)
+--R 
+--R
+--R   (3)  5
+--R                                                        Type: PositiveInteger
+--E 3
+
+--S 4 of 11
+v.2
+--R 
+--R
+--R   (4)  2
+--R                                                        Type: PositiveInteger
+--E 4
+
+--S 5 of 11
+v.3 := 99
+--R 
+--R
+--R   (5)  99
+--R                                                        Type: PositiveInteger
+--E 5
+
+--S 6 of 11
+v
+--R 
+--R
+--R   (6)  [1,2,99,4,5]
+--R                                                         Type: Vector Integer
+--E 6
+
+--S 7 of 11
+5 * v
+--R 
+--R
+--R   (7)  [5,10,495,20,25]
+--R                                                         Type: Vector Integer
+--E 7
+
+--S 8 of 11
+v * 7
+--R 
+--R
+--R   (8)  [7,14,693,28,35]
+--R                                                         Type: Vector Integer
+--E 8
+
+--S 9 of 11
+w : VECTOR INT := vector([2,3,4,5,6])
+--R 
+--R
+--R   (9)  [2,3,4,5,6]
+--R                                                         Type: Vector Integer
+--E 9
+
+--S 10 of 11
+v + w
+--R 
+--R
+--R   (10)  [3,5,103,9,11]
+--R                                                         Type: Vector Integer
+--E 10
+
+--S 11 of 11
+v - w
+--R 
+--R
+--R   (11)  [- 1,- 1,95,- 1,- 1]
+--R                                                         Type: Vector Integer
+--E 11
+)spool
+)lisp (bye)
+@
+<<Vector.help>>=
+====================================================================
+Vector examples
+====================================================================
+
+The 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 OneDimensionalArray
+domain, except that when the components of a Vector belong to a Ring,
+arithmetic operations are provided.
+
+As with the OneDimensionalArray domain, a Vector can be created by
+calling the operation new, its components can be accessed by calling
+the operations elt and qelt, and its components can be reset by
+calling the operations setelt and qsetelt.
+
+This creates a vector of integers of length 5 all of whose components are 12.
+
+  u : VECTOR INT := new(5,12)
+    [12,12,12,12,12]
+                                Type: Vector Integer
+
+This is how you create a vector from a list of its components.
+
+  v : VECTOR INT := vector([1,2,3,4,5])
+    [1,2,3,4,5]
+                                Type: Vector Integer
+
+Indexing for vectors begins at 1.  The last element has index equal to
+the length of the vector, which is computed by #.
+
+ #(v)
+    5
+                                Type: PositiveInteger
+
+This is the standard way to use elt to extract an element.
+Functionally, it is the same as if you had typed elt(v,2).
+
+  v.2
+    2
+                                Type: PositiveInteger
+
+This is the standard way to use setelt to change an element.  It is
+the same as if you had typed setelt(v,3,99).
+
+  v.3 := 99
+    99
+                                Type: PositiveInteger
+
+Now look at v to see the change.  You can use qelt and qsetelt
+(instead of elt and setelt, respectively) but only when you know that
+the index is within the valid range.
+
+  v
+    [1,2,99,4,5]
+                                Type: Vector Integer
+
+When the components belong to a Ring, Axiom provides arithmetic
+operations for Vector.  These include left and right scalar multiplication.
+
+  5 * v
+    [5,10,495,20,25]
+                                Type: Vector Integer
+
+  v * 7
+    [7,14,693,28,35]
+                                Type: Vector Integer
+
+  w : VECTOR INT := vector([2,3,4,5,6])
+    [2,3,4,5,6]
+                                Type: Vector Integer
+
+Addition and subtraction are also available.
+
+  v + w
+    [3,5,103,9,11]
+                                Type: Vector Integer
+
+Of course, when adding or subtracting, the two vectors must have the same
+length or an error message is displayed.
+
+  v - w
+    [- 1,- 1,95,- 1,- 1]
+                                Type: Vector Integer
+
+See Also:
+o )help List
+o )help Matrix
+o )help OneDimensionalArray
+o )help Set
+o )help Table
+o )help TwoDimensionalArray
+o )show Vector
+o $AXIOM/doc/src/algebra/vector.spad.dvi
+
+@
 <<domain VECTOR Vector>>=
 )abbrev domain VECTOR Vector
 ++ Author:
diff --git a/src/algebra/void.spad.pamphlet b/src/algebra/void.spad.pamphlet
index 314b9a4..200d924 100644
--- a/src/algebra/void.spad.pamphlet
+++ b/src/algebra/void.spad.pamphlet
@@ -10,6 +10,101 @@
 \tableofcontents
 \eject
 \section{domain VOID Void}
+<<Void.input>>=
+-- void.spad.pamphlet Void.input
+)spool Void.output
+)set message test on
+)set message auto off
+)clear all
+--S 1
+r := (a; b; if c then d else e; f) 
+--R 
+--R 
+--RDaly Bug
+--R   An expression following if/when must evaluate to a Boolean and you 
+--R      have written one that does not.
+--E 1
+
+--S 2
+a : Integer
+--R 
+--R                                                                   Type: Void
+--E 2
+
+)set message void on
+
+--S 3
+b : Fraction Integer
+--R 
+--R
+--R   (2)  "()"
+--R                                                                   Type: Void
+--E 3
+
+)set message void off
+ 
+--S 4
+3::Void
+--R 
+--R                                                                   Type: Void
+--E 4
+
+--S 5
+% :: PositiveInteger
+--R 
+--R 
+--RDaly Bug
+--R   Cannot convert from type Void to PositiveInteger for value
+--R   "()"
+--R
+--E 5
+)spool
+)lisp (bye)
+@
+<<Void.help>>=
+====================================================================
+Void examples
+====================================================================
+
+When an expression is not in a value context, it is given type Void.
+For example, in the expression
+
+  r := (a; b; if c then d else e; f) 
+
+values are used only from the subexpressions c and f: all others are thrown 
+away.  The subexpressions a, b, d and e are evaluated for side-effects only 
+and have type Void.  There is a unique value of type Void.
+
+You will most often see results of type Void when you declare a variable.
+
+  a : Integer
+                                Type: Void
+
+Usually no output is displayed for Void results.  You can force the
+display of a rather ugly object by issuing
+
+  )set message void on
+
+  b : Fraction Integer
+                                Type: Void
+
+  )set message void off
+
+All values can be converted to type Void.
+
+  3::Void
+                                Type: Void
+
+Once a value has been converted to Void, it cannot be recovered.
+
+  % :: PositiveInteger
+   Cannot convert from type Void to PositiveInteger for value "()"
+
+See Also:
+o )show Void
+o $AXIOM/doc/src/algebra/void.spad.dvi
+
+@
 <<domain VOID Void>>=
 )abbrev domain VOID Void
 -- These types act as the top and bottom of the type lattice
diff --git a/src/algebra/xlpoly.spad.pamphlet b/src/algebra/xlpoly.spad.pamphlet
index 8faf7cb..44358c0 100644
--- a/src/algebra/xlpoly.spad.pamphlet
+++ b/src/algebra/xlpoly.spad.pamphlet
@@ -1827,6 +1827,844 @@ PoincareBirkhoffWittLyndonBasis(VarSet: OrderedSet): Public == Private where
 
 @
 \section{domain XPBWPOLY XPBWPolynomial}
+<<XPBWPolynomial.input>>=
+-- xlpoly.spad.pamphlet XPBWPolynomial.input
+)spool XPBWPolynomial.output
+)set message test on
+)set message auto off
+)clear all
+--S 1 of 39
+a:Symbol := 'a
+--R 
+--R
+--R   (1)  a
+--R                                                                 Type: Symbol
+--E 1
+
+--S 2 of 39
+b:Symbol := 'b
+--R 
+--R
+--R   (2)  b
+--R                                                                 Type: Symbol
+--E 2
+
+--S 3 of 39
+RN := Fraction(Integer)
+--R 
+--R
+--R   (3)  Fraction Integer
+--R                                                                 Type: Domain
+--E 3
+
+--S 4 of 39
+word := OrderedFreeMonoid Symbol
+--R 
+--R
+--R   (4)  OrderedFreeMonoid Symbol
+--R                                                                 Type: Domain
+--E 4
+
+--S 5 of 39
+lword := LyndonWord(Symbol)
+--R 
+--R
+--R   (5)  LyndonWord Symbol
+--R                                                                 Type: Domain
+--E 5
+
+--S 6 of 39
+base := PoincareBirkhoffWittLyndonBasis Symbol
+--R 
+--R
+--R   (6)  PoincareBirkhoffWittLyndonBasis Symbol
+--R                                                                 Type: Domain
+--E 6
+
+--S 7 of 39
+dpoly := XDistributedPolynomial(Symbol, RN)
+--R 
+--R
+--R   (7)  XDistributedPolynomial(Symbol,Fraction Integer)
+--R                                                                 Type: Domain
+--E 7
+
+--S 8 of 39
+rpoly := XRecursivePolynomial(Symbol, RN)
+--R 
+--R
+--R   (8)  XRecursivePolynomial(Symbol,Fraction Integer)
+--R                                                                 Type: Domain
+--E 8
+
+--S 9 of 39
+lpoly := LiePolynomial(Symbol, RN)
+--R 
+--R
+--R   (9)  LiePolynomial(Symbol,Fraction Integer)
+--R                                                                 Type: Domain
+--E 9
+
+--S 10 of 39
+poly  := XPBWPolynomial(Symbol, RN)
+--R 
+--R
+--R   (10)  XPBWPolynomial(Symbol,Fraction Integer)
+--R                                                                 Type: Domain
+--E 10
+
+--S 11 of 39
+liste : List lword := LyndonWordsList([a,b], 6)
+--R 
+--R
+--R   (11)
+--R                       2        2     3      2 2       3     4      3 2
+--R   [[a], [b], [a b], [a b], [a b ], [a b], [a b ], [a b ], [a b], [a b ],
+--R      2          2 3           2       4     5      4 2     3          3 3
+--R    [a b a b], [a b ], [a b a b ], [a b ], [a b], [a b ], [a b a b], [a b ],
+--R      2     2     2 2        2 4           3       5
+--R    [a b a b ], [a b a b], [a b ], [a b a b ], [a b ]]
+--R                                                 Type: List LyndonWord Symbol
+--E 11
+
+--S 12 of 39
+0$poly
+--R 
+--R
+--R   (12)  0
+--R                                Type: XPBWPolynomial(Symbol,Fraction Integer)
+--E 12
+
+--S 13 of 39
+1$poly
+--R 
+--R
+--R   (13)  1
+--R                                Type: XPBWPolynomial(Symbol,Fraction Integer)
+--E 13
+
+--S 14 of 39
+p : poly := a
+--R 
+--R
+--R   (14)  [a]
+--R                                Type: XPBWPolynomial(Symbol,Fraction Integer)
+--E 14
+
+--S 15 of 39
+q : poly := b
+--R 
+--R
+--R   (15)  [b]
+--R                                Type: XPBWPolynomial(Symbol,Fraction Integer)
+--E 15
+
+--S 16 of 39
+pq: poly := p*q
+--R 
+--R
+--R   (16)  [a b] + [b][a]
+--R                                Type: XPBWPolynomial(Symbol,Fraction Integer)
+--E 16
+
+--S 17 of 39
+pq :: dpoly
+--R 
+--R
+--R   (17)  a b
+--R                        Type: XDistributedPolynomial(Symbol,Fraction Integer)
+--E 17
+
+--S 18 of 39
+mirror pq
+--R 
+--R
+--R   (18)  [b][a]
+--R                                Type: XPBWPolynomial(Symbol,Fraction Integer)
+--E 18
+
+--S 19 of 39
+ListOfTerms pq
+--R 
+--R
+--R   (19)  [[k= [b][a],c= 1],[k= [a b],c= 1]]
+--RType: List Record(k: PoincareBirkhoffWittLyndonBasis Symbol,c: Fraction Integer)
+--E 19
+
+--S 20 of 39
+reductum pq
+--R 
+--R
+--R   (20)  [a b]
+--R                                Type: XPBWPolynomial(Symbol,Fraction Integer)
+--E 20
+
+--S 21 of 39
+leadingMonomial pq
+--R 
+--R
+--R   (21)  [b][a]
+--R                                 Type: PoincareBirkhoffWittLyndonBasis Symbol
+--E 21
+
+--S 22 of 39
+coefficients pq
+--R 
+--R
+--R   (22)  [1,1]
+--R                                                  Type: List Fraction Integer
+--E 22
+
+--S 23 of 39
+leadingTerm pq
+--R 
+--R
+--R   (23)  [k= [b][a],c= 1]
+--R  Type: Record(k: PoincareBirkhoffWittLyndonBasis Symbol,c: Fraction Integer)
+--E 23
+
+--S 24 of 39
+degree pq
+--R 
+--R
+--R   (24)  2
+--R                                                        Type: PositiveInteger
+--E 24
+
+--S 25 of 39
+pq4:=exp(pq,4)
+--R 
+--R
+--R   (25)
+--R                          1              1     2       1      2
+--R     1 + [a b] + [b][a] + - [a b][a b] + - [a b ][a] + - [b][a b]
+--R                          2              2             2
+--R   + 
+--R     3               1
+--R     - [b][a b][a] + - [b][b][a][a]
+--R     2               2
+--R                                Type: XPBWPolynomial(Symbol,Fraction Integer)
+--E 25
+
+--S 26 of 39
+log(pq4,4) - pq
+--R 
+--R
+--R   (26)  0
+--R                                Type: XPBWPolynomial(Symbol,Fraction Integer)
+--E 26
+
+--S 27 of 39
+lp1 :lpoly := LiePoly liste.10
+--R 
+--R
+--R           3 2
+--R   (27)  [a b ]
+--R                                 Type: LiePolynomial(Symbol,Fraction Integer)
+--E 27
+
+--S 28 of 39
+lp2 :lpoly := LiePoly liste.11
+--R 
+--R
+--R           2
+--R   (28)  [a b a b]
+--R                                 Type: LiePolynomial(Symbol,Fraction Integer)
+--E 28
+
+--S 29 of 39
+lp :lpoly := [lp1, lp2]
+--R 
+--R
+--R           3 2 2
+--R   (29)  [a b a b a b]
+--R                                 Type: LiePolynomial(Symbol,Fraction Integer)
+--E 29
+
+--S 30 of 39
+lpd1: dpoly := lp1
+--R 
+--R
+--R          3 2     2         2 2                    2 2           2    2 3
+--R   (30)  a b  - 2a b a b - a b a + 4a b a b a - a b a  - 2b a b a  + b a
+--R                        Type: XDistributedPolynomial(Symbol,Fraction Integer)
+--E 30
+
+--S 31 of 39
+lpd2: dpoly := lp2
+--R 
+--R
+--R   (31)
+--R      2         2 2          2                    2 2       3        2
+--R     a b a b - a b a - 3a b a b + 4a b a b a - a b a  + 2b a b - 3b a b a
+--R   + 
+--R            2
+--R     b a b a
+--R                        Type: XDistributedPolynomial(Symbol,Fraction Integer)
+--E 31
+
+--S 32 of 39
+lpd : dpoly := lpd1 * lpd2 - lpd2 * lpd1
+--R 
+--R
+--R   (32)
+--R      3 2 2         3 2 2 2      3 2     2      3 2             3 2   2 2
+--R     a b a b a b - a b a b a - 3a b a b a b + 4a b a b a b a - a b a b a
+--R   + 
+--R       3 3 3      3 3 2       3 3     2    2       3 2     2       2 2
+--R     2a b a b - 3a b a b a + a b a b a  - a b a b a b  + 3a b a b a b a
+--R   + 
+--R       2           2       2                    2         2 2     2     2 3
+--R     6a b a b a b a b - 12a b a b a b a b a + 3a b a b a b a  - 4a b a b a b
+--R   + 
+--R       2     2 2       2     3 3    2 2 4 2     2 2 3          2 2 2   2
+--R     6a b a b a b a - a b a b a  + a b a b  - 3a b a b a b + 3a b a b a b
+--R   + 
+--R         2 2     3      2 2     2        2 2         2    2 2   2 3
+--R     - 2a b a b a b + 3a b a b a b a - 3a b a b a b a  + a b a b a
+--R   + 
+--R           2   3 2         2   2              2   2 2           2
+--R     3a b a b a b  - 6a b a b a b a b - 3a b a b a b a + 12a b a b a b a b a
+--R   + 
+--R             2     2 2         2 2     2         2 3 3             4 2
+--R     - 3a b a b a b a  - 6a b a b a b a  + 3a b a b a  - 4a b a b a b
+--R   + 
+--R                3                   2   2                  3
+--R     12a b a b a b a b - 12a b a b a b a b + 8a b a b a b a b
+--R   + 
+--R                      2                         2               2 3      2 5 2
+--R     - 12a b a b a b a b a + 12a b a b a b a b a  - 4a b a b a b a  + a b a b
+--R   + 
+--R           2 4            2 3   2        2 2   3        2 2   2
+--R     - 3a b a b a b + 3a b a b a b - 2a b a b a b + 3a b a b a b a
+--R   + 
+--R           2 2       2      2 2 2 3       3   3 2       3   2
+--R     - 3a b a b a b a  + a b a b a  - 2b a b a b  + 4b a b a b a b
+--R   + 
+--R         3   2 2        3                  3     2 2       3 2     2       3 3 3
+--R     2b a b a b a - 8b a b a b a b a + 2b a b a b a  + 4b a b a b a  - 2b a b a
+--R   + 
+--R         2   4 2       2   3            2   3 2         2   2
+--R     3b a b a b  - 6b a b a b a b - 3b a b a b a + 12b a b a b a b a
+--R   + 
+--R           2   2 2 2       2           2       2     2 3          5 2
+--R     - 3b a b a b a  - 6b a b a b a b a  + 3b a b a b a  - b a b a b
+--R   + 
+--R             4 2            3   2             3                  3 2 2
+--R     3b a b a b a + 6b a b a b a b - 12b a b a b a b a + 3b a b a b a
+--R   + 
+--R               2   3            2   2             2 2 3    2 5         2 5 2
+--R     - 4b a b a b a b + 6b a b a b a b a - b a b a b a  + b a b a b - b a b a
+--R   + 
+--R         2 4   2      2 4           2 4 2 2     2 3   3      2 3   2
+--R     - 3b a b a b + 4b a b a b a - b a b a  + 2b a b a b - 3b a b a b a
+--R   + 
+--R      2 3       2
+--R     b a b a b a
+--R                        Type: XDistributedPolynomial(Symbol,Fraction Integer)
+--E 32
+
+--S 33 of 39
+lp :: dpoly - lpd
+--R 
+--R
+--R   (33)  0
+--R                        Type: XDistributedPolynomial(Symbol,Fraction Integer)
+--E 33
+
+--S 34 of 39
+p := 3 * lp
+--R 
+--R
+--R            3 2 2
+--R   (34)  3[a b a b a b]
+--R                                Type: XPBWPolynomial(Symbol,Fraction Integer)
+--E 34
+
+--S 35 of 39
+q := lp1
+--R 
+--R
+--R           3 2
+--R   (35)  [a b ]
+--R                                Type: XPBWPolynomial(Symbol,Fraction Integer)
+--E 35
+
+--S 36 of 39
+pq:= p * q
+--R 
+--R
+--R            3 2 2        3 2
+--R   (36)  3[a b a b a b][a b ]
+--R                                Type: XPBWPolynomial(Symbol,Fraction Integer)
+--E 36
+
+--S 37 of 39
+pr:rpoly := p :: rpoly
+--R 
+--R
+--R   (37)
+--R       a
+--R    *
+--R           a
+--R        *
+--R               a b b
+--R            *
+--R                 a(a b(a b 3 + b a(- 3)) + b(a(a b(- 9) + b a 12) + b a a(- 3)))
+--R               + 
+--R                 b a(a(a b 6 + b a(- 9)) + b a a 3)
+--R           + 
+--R               b
+--R            *
+--R                   a b
+--R                *
+--R                       a
+--R                    *
+--R                         a(a b b(- 3) + b b a 9)
+--R                       + 
+--R                         b(a(a b 18 + b a(- 36)) + b a a 9)
+--R                   + 
+--R                     b(a a(a b(- 12) + b a 18) + b a a a(- 3))
+--R               + 
+--R                   b a
+--R                *
+--R                     a(a(a b b 3 + b a b(- 9)) + b a a b 9)
+--R                   + 
+--R                     b(a(a(a b(- 6) + b a 9) + b a a(- 9)) + b a a a 3)
+--R       + 
+--R           b
+--R        *
+--R               a
+--R            *
+--R                   a b
+--R                *
+--R                       a
+--R                    *
+--R                         a(a b b 9 + b(a b(- 18) + b a(- 9)))
+--R                       + 
+--R                         b(a b a 36 + b a a(- 9))
+--R                   + 
+--R                     b(a b a a(- 18) + b a a a 9)
+--R               + 
+--R                   b a
+--R                *
+--R                     a(a(a b b(- 12) + b a b 36) + b a a b(- 36))
+--R                   + 
+--R                     b(a(a(a b 24 + b a(- 36)) + b a a 36) + b a a a(- 12))
+--R           + 
+--R               b a a
+--R            *
+--R                 a(a(a b b 3 + b a b(- 9)) + b a a b 9)
+--R               + 
+--R                 b(a(a(a b(- 6) + b a 9) + b a a(- 9)) + b a a a 3)
+--R   + 
+--R       b
+--R    *
+--R           a
+--R        *
+--R               a
+--R            *
+--R                   a b
+--R                *
+--R                       a
+--R                    *
+--R                         a(a b b(- 6) + b(a b 12 + b a 6))
+--R                       + 
+--R                         b(a b a(- 24) + b a a 6)
+--R                   + 
+--R                     b(a b a a 12 + b a a a(- 6))
+--R               + 
+--R                   b a
+--R                *
+--R                       a
+--R                    *
+--R                         a(a b b 9 + b(a b(- 18) + b a(- 9)))
+--R                       + 
+--R                         b(a b a 36 + b a a(- 9))
+--R                   + 
+--R                     b(a b a a(- 18) + b a a a 9)
+--R           + 
+--R               b a a
+--R            *
+--R                 a(a(a b b(- 3) + b b a 9) + b(a(a b 18 + b a(- 36)) + b a a 9))
+--R               + 
+--R                 b(a a(a b(- 12) + b a 18) + b a a a(- 3))
+--R       + 
+--R           b a a a
+--R        *
+--R             a(a b(a b 3 + b a(- 3)) + b(a(a b(- 9) + b a 12) + b a a(- 3)))
+--R           + 
+--R             b a(a(a b 6 + b a(- 9)) + b a a 3)
+--R                          Type: XRecursivePolynomial(Symbol,Fraction Integer)
+--E 37
+
+--S 38 of 39
+qr:rpoly := q :: rpoly
+--R 
+--R
+--R   (38)
+--R     a(a(a b b 1 + b(a b(- 2) + b a(- 1))) + b(a b a 4 + b a a(- 1)))
+--R   + 
+--R     b(a b a a(- 2) + b a a a 1)
+--R                          Type: XRecursivePolynomial(Symbol,Fraction Integer)
+--E 38
+
+--S 39 of 39
+pq :: rpoly - pr*qr
+--R 
+--R
+--R   (39)  0
+--R                          Type: XRecursivePolynomial(Symbol,Fraction Integer)
+--E 39
+)spool
+)lisp (bye)
+@
+<<XPBWPolynomial.help>>=
+====================================================================
+XPBWPolynomial examples
+====================================================================
+
+Initialisations
+
+  a:Symbol := 'a
+    a
+                                  Type: Symbol
+
+  b:Symbol := 'b
+    b
+                                  Type: Symbol
+
+  RN := Fraction(Integer)
+    Fraction Integer
+                                  Type: Domain
+
+  word := OrderedFreeMonoid Symbol
+    OrderedFreeMonoid Symbol
+                                  Type: Domain
+
+  lword := LyndonWord(Symbol)
+    LyndonWord Symbol
+                                  Type: Domain
+
+  base := PoincareBirkhoffWittLyndonBasis Symbol
+    PoincareBirkhoffWittLyndonBasis Symbol
+                                  Type: Domain
+
+  dpoly := XDistributedPolynomial(Symbol, RN)
+    XDistributedPolynomial(Symbol,Fraction Integer)
+                                  Type: Domain
+
+  rpoly := XRecursivePolynomial(Symbol, RN)
+    XRecursivePolynomial(Symbol,Fraction Integer)
+                                  Type: Domain
+
+  lpoly := LiePolynomial(Symbol, RN)
+    LiePolynomial(Symbol,Fraction Integer)
+                                  Type: Domain
+
+  poly  := XPBWPolynomial(Symbol, RN)
+    XPBWPolynomial(Symbol,Fraction Integer)
+                                  Type: Domain
+
+  liste : List lword := LyndonWordsList([a,b], 6)
+                       2        2     3      2 2       3     4      3 2
+   [[a], [b], [a b], [a b], [a b ], [a b], [a b ], [a b ], [a b], [a b ],
+      2          2 3           2       4     5      4 2     3          3 3
+    [a b a b], [a b ], [a b a b ], [a b ], [a b], [a b ], [a b a b], [a b ],
+      2     2     2 2        2 4           3       5
+    [a b a b ], [a b a b], [a b ], [a b a b ], [a b ]]
+                                  Type: List LyndonWord Symbol
+
+Let's make some polynomials
+
+  0$poly
+    0
+                           Type: XPBWPolynomial(Symbol,Fraction Integer)
+
+  1$poly
+    1
+                           Type: XPBWPolynomial(Symbol,Fraction Integer)
+
+  p : poly := a
+    [a]
+                           Type: XPBWPolynomial(Symbol,Fraction Integer)
+
+  q : poly := b
+    [b]
+                           Type: XPBWPolynomial(Symbol,Fraction Integer)
+
+  pq: poly := p*q
+    [a b] + [b][a]
+                           Type: XPBWPolynomial(Symbol,Fraction Integer)
+
+Coerce to distributed polynomial
+
+  pq :: dpoly
+    a b
+                      Type: XDistributedPolynomial(Symbol,Fraction Integer)
+
+Check some polynomial operations
+
+  mirror pq
+    [b][a]
+                      Type: XPBWPolynomial(Symbol,Fraction Integer)
+
+  ListOfTerms pq
+    [[k= [b][a],c= 1],[k= [a b],c= 1]]
+      Type: List Record(k: PoincareBirkhoffWittLyndonBasis Symbol,
+                        c: Fraction Integer)
+
+  reductum pq
+    [a b]
+                      Type: XPBWPolynomial(Symbol,Fraction Integer)
+
+  leadingMonomial pq
+    [b][a]
+                      Type: PoincareBirkhoffWittLyndonBasis Symbol
+
+  coefficients pq
+    [1,1]
+                      Type: List Fraction Integer
+
+  leadingTerm pq
+    [k= [b][a],c= 1]
+              Type: Record(k: PoincareBirkhoffWittLyndonBasis Symbol,
+                           c: Fraction Integer)
+
+  degree pq
+    2
+                      Type: PositiveInteger
+
+  pq4:=exp(pq,4)
+                          1              1     2       1      2
+     1 + [a b] + [b][a] + - [a b][a b] + - [a b ][a] + - [b][a b]
+                          2              2             2
+   + 
+     3               1
+     - [b][a b][a] + - [b][b][a][a]
+     2               2
+                      Type: XPBWPolynomial(Symbol,Fraction Integer)
+
+  log(pq4,4) - pq
+   (26)  0
+                      Type: XPBWPolynomial(Symbol,Fraction Integer)
+
+Calculations with verification in XDistributedPolynomial.
+
+  lp1 :lpoly := LiePoly liste.10
+       3 2
+     [a b ]
+                      Type: LiePolynomial(Symbol,Fraction Integer)
+
+  lp2 :lpoly := LiePoly liste.11
+      2
+    [a b a b]
+                      Type: LiePolynomial(Symbol,Fraction Integer)
+
+  lp :lpoly := [lp1, lp2]
+      3 2 2
+    [a b a b a b]
+                      Type: LiePolynomial(Symbol,Fraction Integer)
+
+  lpd1: dpoly := lp1
+     3 2     2         2 2                    2 2           2    2 3
+    a b  - 2a b a b - a b a + 4a b a b a - a b a  - 2b a b a  + b a
+                      Type: XDistributedPolynomial(Symbol,Fraction Integer)
+
+  lpd2: dpoly := lp2
+      2         2 2          2                    2 2       3        2
+     a b a b - a b a - 3a b a b + 4a b a b a - a b a  + 2b a b - 3b a b a
+   + 
+            2
+     b a b a
+                      Type: XDistributedPolynomial(Symbol,Fraction Integer)
+
+  lpd : dpoly := lpd1 * lpd2 - lpd2 * lpd1
+      3 2 2         3 2 2 2      3 2     2      3 2             3 2   2 2
+     a b a b a b - a b a b a - 3a b a b a b + 4a b a b a b a - a b a b a
+   + 
+       3 3 3      3 3 2       3 3     2    2       3 2     2       2 2
+     2a b a b - 3a b a b a + a b a b a  - a b a b a b  + 3a b a b a b a
+   + 
+       2           2       2                    2         2 2     2     2 3
+     6a b a b a b a b - 12a b a b a b a b a + 3a b a b a b a  - 4a b a b a b
+   + 
+       2     2 2       2     3 3    2 2 4 2     2 2 3          2 2 2   2
+     6a b a b a b a - a b a b a  + a b a b  - 3a b a b a b + 3a b a b a b
+   + 
+         2 2     3      2 2     2        2 2         2    2 2   2 3
+     - 2a b a b a b + 3a b a b a b a - 3a b a b a b a  + a b a b a
+   + 
+           2   3 2         2   2              2   2 2           2
+     3a b a b a b  - 6a b a b a b a b - 3a b a b a b a + 12a b a b a b a b a
+   + 
+             2     2 2         2 2     2         2 3 3             4 2
+     - 3a b a b a b a  - 6a b a b a b a  + 3a b a b a  - 4a b a b a b
+   + 
+                3                   2   2                  3
+     12a b a b a b a b - 12a b a b a b a b + 8a b a b a b a b
+   + 
+                      2                         2               2 3      2 5 2
+     - 12a b a b a b a b a + 12a b a b a b a b a  - 4a b a b a b a  + a b a b
+   + 
+           2 4            2 3   2        2 2   3        2 2   2
+     - 3a b a b a b + 3a b a b a b - 2a b a b a b + 3a b a b a b a
+   + 
+           2 2       2      2 2 2 3       3   3 2       3   2
+     - 3a b a b a b a  + a b a b a  - 2b a b a b  + 4b a b a b a b
+   + 
+         3   2 2        3                  3     2 2       3 2     2       3 3 3
+     2b a b a b a - 8b a b a b a b a + 2b a b a b a  + 4b a b a b a  - 2b a b a
+   + 
+         2   4 2       2   3            2   3 2         2   2
+     3b a b a b  - 6b a b a b a b - 3b a b a b a + 12b a b a b a b a
+   + 
+           2   2 2 2       2           2       2     2 3          5 2
+     - 3b a b a b a  - 6b a b a b a b a  + 3b a b a b a  - b a b a b
+   + 
+             4 2            3   2             3                  3 2 2
+     3b a b a b a + 6b a b a b a b - 12b a b a b a b a + 3b a b a b a
+   + 
+               2   3            2   2             2 2 3    2 5         2 5 2
+     - 4b a b a b a b + 6b a b a b a b a - b a b a b a  + b a b a b - b a b a
+   + 
+         2 4   2      2 4           2 4 2 2     2 3   3      2 3   2
+     - 3b a b a b + 4b a b a b a - b a b a  + 2b a b a b - 3b a b a b a
+   + 
+      2 3       2
+     b a b a b a
+                    Type: XDistributedPolynomial(Symbol,Fraction Integer)
+
+  lp :: dpoly - lpd
+    0
+                    Type: XDistributedPolynomial(Symbol,Fraction Integer)
+
+Calculations with verification in XRecursivePolynomial.
+
+  p := 3 * lp
+       3 2 2
+    3[a b a b a b]
+                    Type: XPBWPolynomial(Symbol,Fraction Integer)
+
+  q := lp1
+      3 2
+    [a b ]
+                    Type: XPBWPolynomial(Symbol,Fraction Integer)
+
+  pq:= p * q
+       3 2 2        3 2
+    3[a b a b a b][a b ]
+                    Type: XPBWPolynomial(Symbol,Fraction Integer)
+
+  pr:rpoly := p :: rpoly
+       a
+    *
+           a
+        *
+               a b b
+            *
+                a(a b(a b 3 + b a(- 3)) + b(a(a b(- 9) + b a 12) + b a a(- 3)))
+               + 
+                 b a(a(a b 6 + b a(- 9)) + b a a 3)
+           + 
+               b
+            *
+                   a b
+                *
+                       a
+                    *
+                         a(a b b(- 3) + b b a 9)
+                       + 
+                         b(a(a b 18 + b a(- 36)) + b a a 9)
+                   + 
+                     b(a a(a b(- 12) + b a 18) + b a a a(- 3))
+               + 
+                   b a
+                *
+                     a(a(a b b 3 + b a b(- 9)) + b a a b 9)
+                   + 
+                     b(a(a(a b(- 6) + b a 9) + b a a(- 9)) + b a a a 3)
+       + 
+           b
+        *
+               a
+            *
+                   a b
+                *
+                       a
+                    *
+                         a(a b b 9 + b(a b(- 18) + b a(- 9)))
+                       + 
+                         b(a b a 36 + b a a(- 9))
+                   + 
+                     b(a b a a(- 18) + b a a a 9)
+               + 
+                   b a
+                *
+                     a(a(a b b(- 12) + b a b 36) + b a a b(- 36))
+                   + 
+                     b(a(a(a b 24 + b a(- 36)) + b a a 36) + b a a a(- 12))
+           + 
+               b a a
+            *
+                 a(a(a b b 3 + b a b(- 9)) + b a a b 9)
+               + 
+                 b(a(a(a b(- 6) + b a 9) + b a a(- 9)) + b a a a 3)
+   + 
+       b
+    *
+           a
+        *
+               a
+            *
+                   a b
+                *
+                       a
+                    *
+                         a(a b b(- 6) + b(a b 12 + b a 6))
+                       + 
+                         b(a b a(- 24) + b a a 6)
+                   + 
+                     b(a b a a 12 + b a a a(- 6))
+               + 
+                   b a
+                *
+                       a
+                    *
+                         a(a b b 9 + b(a b(- 18) + b a(- 9)))
+                       + 
+                         b(a b a 36 + b a a(- 9))
+                   + 
+                     b(a b a a(- 18) + b a a a 9)
+           + 
+               b a a
+            *
+                a(a(a b b(- 3) + b b a 9) + b(a(a b 18 + b a(- 36)) + b a a 9))
+               + 
+                 b(a a(a b(- 12) + b a 18) + b a a a(- 3))
+       + 
+           b a a a
+        *
+             a(a b(a b 3 + b a(- 3)) + b(a(a b(- 9) + b a 12) + b a a(- 3)))
+           + 
+             b a(a(a b 6 + b a(- 9)) + b a a 3)
+                      Type: XRecursivePolynomial(Symbol,Fraction Integer)
+
+  qr:rpoly := q :: rpoly
+     a(a(a b b 1 + b(a b(- 2) + b a(- 1))) + b(a b a 4 + b a a(- 1)))
+   + 
+     b(a b a a(- 2) + b a a a 1)
+                      Type: XRecursivePolynomial(Symbol,Fraction Integer)
+
+  pq :: rpoly - pr*qr
+    0
+                      Type: XRecursivePolynomial(Symbol,Fraction Integer)
+
+See Also:
+o )show XPBWPolynomial
+o $AXIOM/doc/src/algebra/xlpoly.spad.dvi
+
+@
 <<domain XPBWPOLY XPBWPolynomial>>=
 )abbrev domain XPBWPOLY XPBWPolynomial
 ++ Author: Michel Petitot (petitot@lifl.fr).
diff --git a/src/algebra/xpoly.spad.pamphlet b/src/algebra/xpoly.spad.pamphlet
index 6ff416b..218c93f 100644
--- a/src/algebra/xpoly.spad.pamphlet
+++ b/src/algebra/xpoly.spad.pamphlet
@@ -486,6 +486,389 @@ XPolynomialsCat(vl:OrderedSet,R:Ring):Category == Export where
 
 @
 \section{domain XPR XPolynomialRing}
+<<XPolynomialRing.input>>=
+-- xpoly.spad.pamphlet XPolynomialRing.input
+)spool XPolynomialRing.output
+)set message test on
+)set message auto off
+)clear all
+--S 1 of 15
+Word := OrderedFreeMonoid(Symbol)
+--R 
+--R
+--R   (1)  OrderedFreeMonoid Symbol
+--R                                                                 Type: Domain
+--E 1
+
+--S 2 of 15
+poly:= XPR(Integer,Word)
+--R 
+--R
+--R   (2)  XPolynomialRing(Integer,OrderedFreeMonoid Symbol)
+--R                                                                 Type: Domain
+--E 2
+
+--S 3 of 15
+p:poly := 2 * x - 3 * y + 1
+--R 
+--R
+--R   (3)  1 + 2x - 3y
+--R                      Type: XPolynomialRing(Integer,OrderedFreeMonoid Symbol)
+--E 3
+
+--S 4 of 15
+q:poly := 2 * x + 1
+--R 
+--R
+--R   (4)  1 + 2x
+--R                      Type: XPolynomialRing(Integer,OrderedFreeMonoid Symbol)
+--E 4
+
+--S 5 of 15
+p + q
+--R 
+--R
+--R   (5)  2 + 4x - 3y
+--R                      Type: XPolynomialRing(Integer,OrderedFreeMonoid Symbol)
+--E 5
+
+--S 6 of 15
+p * q
+--R 
+--R
+--R                        2
+--R   (6)  1 + 4x - 3y + 4x  - 6y x
+--R                      Type: XPolynomialRing(Integer,OrderedFreeMonoid Symbol)
+--E 6
+
+--S 7 of 15
+(p+q)**2-p**2-q**2-2*p*q
+--R 
+--R
+--R   (7)  - 6x y + 6y x
+--R                      Type: XPolynomialRing(Integer,OrderedFreeMonoid Symbol)
+--E 7
+
+--S 8 of 15
+M := SquareMatrix(2,Fraction Integer)
+--R 
+--R
+--R   (8)  SquareMatrix(2,Fraction Integer)
+--R                                                                 Type: Domain
+--E 8
+
+--S 9 of 15
+poly1:= XPR(M,Word)
+--R 
+--R
+--R   (9)
+--R   XPolynomialRing(SquareMatrix(2,Fraction Integer),OrderedFreeMonoid Symbol)
+--R                                                                 Type: Domain
+--E 9
+
+--S 10 of 15
+m1:M := matrix [ [i*j**2 for i in 1..2] for j in 1..2]
+--R 
+--R
+--R         +1  2+
+--R   (10)  |    |
+--R         +4  8+
+--R                                       Type: SquareMatrix(2,Fraction Integer)
+--E 10
+
+--S 11 of 15
+m2:M := m1 - 5/4
+--R 
+--R
+--R         +  1    +
+--R         |- -  2 |
+--R         |  4    |
+--R   (11)  |       |
+--R         |     27|
+--R         | 4   --|
+--R         +      4+
+--R                                       Type: SquareMatrix(2,Fraction Integer)
+--E 11
+
+--S 12 of 15
+m3: M := m2**2
+--R 
+--R
+--R         +129     +
+--R         |---  13 |
+--R         | 16     |
+--R   (12)  |        |
+--R         |     857|
+--R         |26   ---|
+--R         +      16+
+--R                                       Type: SquareMatrix(2,Fraction Integer)
+--E 12
+
+--S 13 of 15
+pm:poly1   := m1*x + m2*y + m3*z - 2/3 
+--R 
+--R
+--R         +  2     +             +  1    +    +129     +
+--R         |- -   0 |             |- -  2 |    |---  13 |
+--R         |  3     |   +1  2+    |  4    |    | 16     |
+--R   (13)  |        | + |    |x + |       |y + |        |z
+--R         |       2|   +4  8+    |     27|    |     857|
+--R         | 0   - -|             | 4   --|    |26   ---|
+--R         +       3+             +      4+    +      16+
+--RType: XPolynomialRing(SquareMatrix(2,Fraction Integer),OrderedFreeMonoid Symbol)
+--E 13
+
+--S 14 of 15
+qm:poly1 := pm - m1*x
+--R 
+--R
+--R         +  2     +   +  1    +    +129     +
+--R         |- -   0 |   |- -  2 |    |---  13 |
+--R         |  3     |   |  4    |    | 16     |
+--R   (14)  |        | + |       |y + |        |z
+--R         |       2|   |     27|    |     857|
+--R         | 0   - -|   | 4   --|    |26   ---|
+--R         +       3+   +      4+    +      16+
+--RType: XPolynomialRing(SquareMatrix(2,Fraction Integer),OrderedFreeMonoid Symbol)
+--E 14
+
+--S 15 of 15
+qm**3
+--R 
+--R
+--R   (15)
+--R     +   8      +   +  1  8+    +43   52 +    +  129       +
+--R     |- --   0  |   |- -  -|    |--   -- |    |- ---  - 26 |
+--R     |  27      |   |  3  3|    | 4    3 |    |   8        | 2
+--R     |          | + |      |y + |        |z + |            |y
+--R     |         8|   |16    |    |104  857|    |         857|
+--R     | 0    - --|   |--   9|    |---  ---|    |- 52   - ---|
+--R     +        27+   + 3    +    + 3    12+    +          8 +
+--R   + 
+--R     +  3199     831 +      +  3199     831 +      +  103169     6409 +
+--R     |- ----   - --- |      |- ----   - --- |      |- ------   - ---- |
+--R     |   32       4  |      |   32       4  |      |    128        4  | 2
+--R     |               |y z + |               |z y + |                  |z
+--R     |  831     26467|      |  831     26467|      |   6409     820977|
+--R     |- ---   - -----|      |- ---   - -----|      | - ----   - ------|
+--R     +   2        32 +      +   2        32 +      +     2        128 +
+--R   + 
+--R     +3199   831 +     +103169   6409 +      +103169   6409 +
+--R     |----   --- |     |------   ---- |      |------   ---- |
+--R     | 64     8  | 3   |  256      8  | 2    |  256      8  |
+--R     |           |y  + |              |y z + |              |y z y
+--R     |831   26467|     | 6409   820977|      | 6409   820977|
+--R     |---   -----|     | ----   ------|      | ----   ------|
+--R     + 4      64 +     +   4      256 +      +   4      256 +
+--R   + 
+--R     +3178239   795341 +       +103169   6409 +       +3178239   795341 +
+--R     |-------   ------ |       |------   ---- |       |-------   ------ |
+--R     |  1024      128  |   2   |  256      8  |   2   |  1024      128  |
+--R     |                 |y z  + |              |z y  + |                 |z y z
+--R     |795341   25447787|       | 6409   820977|       |795341   25447787|
+--R     |------   --------|       | ----   ------|       |------   --------|
+--R     +  64       1024  +       +   4      256 +       +  64       1024  +
+--R   + 
+--R     +3178239   795341 +      +98625409  12326223 +
+--R     |-------   ------ |      |--------  -------- |
+--R     |  1024      128  | 2    |  4096       256   | 3
+--R     |                 |z y + |                   |z
+--R     |795341   25447787|      |12326223  788893897|
+--R     |------   --------|      |--------  ---------|
+--R     +  64       1024  +      +   128       4096  +
+--RType: XPolynomialRing(SquareMatrix(2,Fraction Integer),OrderedFreeMonoid Symbol)
+--E 15
+)spool
+)lisp (bye)
+@
+<<XPolynomialRing.help>>=
+====================================================================
+XPolynomialRing examples
+====================================================================
+
+The XPolynomialRing domain constructor implements generalized
+polynomials with coefficients from an arbitrary Ring (not necessarily
+commutative) and whose exponents are words from an arbitrary
+OrderedMonoid (not necessarily commutative too).  Thus these
+polynomials are (finite) linear combinations of words.
+
+This constructor takes two arguments.  The first one is a Ring and the
+second is an OrderedMonoid.  The abbreviation for XPolynomialRing is XPR.
+
+Other constructors like XPolynomial, XRecursivePolynomial, 
+XDistributedPolynomial, LiePolynomial and XPBWPolynomial implement 
+multivariate polynomials in non-commutative variables.
+
+We illustrate now some of the facilities of the XPR domain constructor.
+
+Define the free ordered monoid generated by the symbols.
+
+  Word := OrderedFreeMonoid(Symbol)
+    OrderedFreeMonoid Symbol
+                                 Type: Domain
+
+Define the linear combinations of these words with integer coefficients.
+
+  poly:= XPR(Integer,Word)
+    XPolynomialRing(Integer,OrderedFreeMonoid Symbol)
+                                 Type: Domain
+
+Then we define a first element from poly.
+
+  p:poly := 2 * x - 3 * y + 1
+    1 + 2x - 3y
+                     Type: XPolynomialRing(Integer,OrderedFreeMonoid Symbol)
+
+And a second one.
+
+  q:poly := 2 * x + 1
+    1 + 2x
+                     Type: XPolynomialRing(Integer,OrderedFreeMonoid Symbol)
+
+We compute their sum,
+
+  p + q
+    2 + 4x - 3y
+                     Type: XPolynomialRing(Integer,OrderedFreeMonoid Symbol)
+
+their product,
+
+  p * q
+                    2
+    1 + 4x - 3y + 4x  - 6y x
+                     Type: XPolynomialRing(Integer,OrderedFreeMonoid Symbol)
+
+and see that variables do not commute.
+
+  (p+q)**2-p**2-q**2-2*p*q
+    - 6x y + 6y x
+                     Type: XPolynomialRing(Integer,OrderedFreeMonoid Symbol)
+
+Now we define a ring of square matrices,
+
+  M := SquareMatrix(2,Fraction Integer)
+    SquareMatrix(2,Fraction Integer)
+                                 Type: Domain
+
+and the linear combinations of words with these  matrices as coefficients.
+
+  poly1:= XPR(M,Word)
+   XPolynomialRing(SquareMatrix(2,Fraction Integer),OrderedFreeMonoid Symbol)
+                                 Type: Domain
+
+Define a first matrix,
+
+  m1:M := matrix [ [i*j**2 for i in 1..2] for j in 1..2]
+         +1  2+
+         |    |
+         +4  8+
+                                 Type: SquareMatrix(2,Fraction Integer)
+
+a second one,
+
+  m2:M := m1 - 5/4
+         +  1    +
+         |- -  2 |
+         |  4    |
+         |       |
+         |     27|
+         | 4   --|
+         +      4+
+                                Type: SquareMatrix(2,Fraction Integer)
+
+and a third one.
+
+  m3: M := m2**2
+         +129     +
+         |---  13 |
+         | 16     |
+         |        |
+         |     857|
+         |26   ---|
+         +      16+
+                               Type: SquareMatrix(2,Fraction Integer)
+
+Define a polynomial,
+
+  pm:poly1   := m1*x + m2*y + m3*z - 2/3 
+         +  2     +             +  1    +    +129     +
+         |- -   0 |             |- -  2 |    |---  13 |
+         |  3     |   +1  2+    |  4    |    | 16     |
+         |        | + |    |x + |       |y + |        |z
+         |       2|   +4  8+    |     27|    |     857|
+         | 0   - -|             | 4   --|    |26   ---|
+         +       3+             +      4+    +      16+
+     Type: XPolynomialRing(SquareMatrix(2,Fraction Integer),
+                           OrderedFreeMonoid Symbol)
+
+a second one,
+
+  qm:poly1 := pm - m1*x
+         +  2     +   +  1    +    +129     +
+         |- -   0 |   |- -  2 |    |---  13 |
+         |  3     |   |  4    |    | 16     |
+         |        | + |       |y + |        |z
+         |       2|   |     27|    |     857|
+         | 0   - -|   | 4   --|    |26   ---|
+         +       3+   +      4+    +      16+
+      Type: XPolynomialRing(SquareMatrix(2,Fraction Integer),
+                            OrderedFreeMonoid Symbol)
+
+and the following power.
+
+  qm**3
+     +   8      +   +  1  8+    +43   52 +    +  129       +
+     |- --   0  |   |- -  -|    |--   -- |    |- ---  - 26 |
+     |  27      |   |  3  3|    | 4    3 |    |   8        | 2
+     |          | + |      |y + |        |z + |            |y
+     |         8|   |16    |    |104  857|    |         857|
+     | 0    - --|   |--   9|    |---  ---|    |- 52   - ---|
+     +        27+   + 3    +    + 3    12+    +          8 +
+   + 
+     +  3199     831 +      +  3199     831 +      +  103169     6409 +
+     |- ----   - --- |      |- ----   - --- |      |- ------   - ---- |
+     |   32       4  |      |   32       4  |      |    128        4  | 2
+     |               |y z + |               |z y + |                  |z
+     |  831     26467|      |  831     26467|      |   6409     820977|
+     |- ---   - -----|      |- ---   - -----|      | - ----   - ------|
+     +   2        32 +      +   2        32 +      +     2        128 +
+   + 
+     +3199   831 +     +103169   6409 +      +103169   6409 +
+     |----   --- |     |------   ---- |      |------   ---- |
+     | 64     8  | 3   |  256      8  | 2    |  256      8  |
+     |           |y  + |              |y z + |              |y z y
+     |831   26467|     | 6409   820977|      | 6409   820977|
+     |---   -----|     | ----   ------|      | ----   ------|
+     + 4      64 +     +   4      256 +      +   4      256 +
+   + 
+     +3178239   795341 +       +103169   6409 +       +3178239   795341 +
+     |-------   ------ |       |------   ---- |       |-------   ------ |
+     |  1024      128  |   2   |  256      8  |   2   |  1024      128  |
+     |                 |y z  + |              |z y  + |                 |z y z
+     |795341   25447787|       | 6409   820977|       |795341   25447787|
+     |------   --------|       | ----   ------|       |------   --------|
+     +  64       1024  +       +   4      256 +       +  64       1024  +
+   + 
+     +3178239   795341 +      +98625409  12326223 +
+     |-------   ------ |      |--------  -------- |
+     |  1024      128  | 2    |  4096       256   | 3
+     |                 |z y + |                   |z
+     |795341   25447787|      |12326223  788893897|
+     |------   --------|      |--------  ---------|
+     +  64       1024  +      +   128       4096  +
+        Type: XPolynomialRing(SquareMatrix(2,Fraction Integer),
+                              OrderedFreeMonoid Symbol)
+
+See Also:
+o )help XPBWPolynomial
+o )help LiePolynomial
+o )help XDistributedPolynomial
+o )help XRecursivePolynomial
+o )help XPolynomial
+o )show XPolynomialRing
+o $AXIOM/doc/src/algebra/xpoly.spad.dvi
+
+@
 <<domain XPR XPolynomialRing>>=
 )abbrev domain XPR XPolynomialRing
 ++ Author: Michel Petitot petitot@lifl.fr
@@ -1053,6 +1436,258 @@ XRecursivePolynomial(VarSet:OrderedSet,R:Ring):  Xcat == Xdef where
 
 @
 \section{domain XPOLY XPolynomial}
+<<XPolynomial.input>>=
+-- xpoly.spad.pamphlet XPolynomial.input
+)spool XPolynomial.output
+)set message test on
+)set message auto off
+)clear all
+--S 1 of 14
+poly := XPolynomial(Integer)
+--R 
+--R
+--R   (1)  XPolynomial Integer
+--R                                                                 Type: Domain
+--E 1
+
+--S 2 of 14
+pr: poly := 2*x + 3*y-5 
+--R 
+--R
+--R   (2)  - 5 + x 2 + y 3
+--R                                                    Type: XPolynomial Integer
+--E 2
+
+--S 3 of 14
+pr2: poly := pr*pr
+--R 
+--R
+--R   (3)  25 + x(- 20 + x 4 + y 6) + y(- 30 + x 6 + y 9)
+--R                                                    Type: XPolynomial Integer
+--E 3
+
+--S 4 of 14
+pd  := expand pr
+--R 
+--R
+--R   (4)  - 5 + 2x + 3y
+--R                                 Type: XDistributedPolynomial(Symbol,Integer)
+--E 4
+
+--S 5 of 14
+pd2 := pd*pd
+--R 
+--R
+--R                           2                   2
+--R   (5)  25 - 20x - 30y + 4x  + 6x y + 6y x + 9y
+--R                                 Type: XDistributedPolynomial(Symbol,Integer)
+--E 5
+
+--S 6 of 14
+expand(pr2) - pd2
+--R 
+--R
+--R   (6)  0
+--R                                 Type: XDistributedPolynomial(Symbol,Integer)
+--E 6
+
+--S 7 of 14
+qr :=  pr**3
+--R 
+--R
+--R   (7)
+--R     - 125 + x(150 + x(- 60 + x 8 + y 12) + y(- 90 + x 12 + y 18))
+--R   + 
+--R     y(225 + x(- 90 + x 12 + y 18) + y(- 135 + x 18 + y 27))
+--R                                                    Type: XPolynomial Integer
+--E 7
+
+--S 8 of 14
+qd :=  pd**3
+--R 
+--R
+--R   (8)
+--R                              2                       2     3      2
+--R     - 125 + 150x + 225y - 60x  - 90x y - 90y x - 135y  + 8x  + 12x y + 12x y x
+--R   + 
+--R          2        2                2       3
+--R     18x y  + 12y x  + 18y x y + 18y x + 27y
+--R                                 Type: XDistributedPolynomial(Symbol,Integer)
+--E 8
+
+--S 9 of 14
+trunc(qd,2)
+--R 
+--R
+--R                                 2                       2
+--R   (9)  - 125 + 150x + 225y - 60x  - 90x y - 90y x - 135y
+--R                                 Type: XDistributedPolynomial(Symbol,Integer)
+--E 9
+
+--S 10 of 14
+trunc(qr,2)
+--R 
+--R
+--R   (10)  - 125 + x(150 + x(- 60) + y(- 90)) + y(225 + x(- 90) + y(- 135))
+--R                                                    Type: XPolynomial Integer
+--E 10
+
+--S 11 of 14
+Word := OrderedFreeMonoid Symbol
+--R 
+--R
+--R   (11)  OrderedFreeMonoid Symbol
+--R                                                                 Type: Domain
+--E 11
+
+--S 12 of 14
+w: Word := x*y**2
+--R 
+--R
+--R            2
+--R   (12)  x y
+--R                                               Type: OrderedFreeMonoid Symbol
+--E 12
+
+--S 13 of 14
+rquo(qr,w)
+--R 
+--R
+--R   (13)  18
+--R                                                    Type: XPolynomial Integer
+--E 13
+
+--S 14 of 14
+sh(pr,w::poly)
+--R 
+--R
+--R   (14)  x(x y y 4 + y(x y 2 + y(- 5 + x 2 + y 9))) + y x y y 3
+--R                                                    Type: XPolynomial Integer
+--E 14
+)spool
+)lisp (bye)
+@
+<<XPolynomial.help>>=
+====================================================================
+XPolynomial examples
+====================================================================
+
+The XPolynomial domain constructor implements multivariate polynomials
+whose set of variables is Symbol.  These variables do not commute.
+The only parameter of this construtor is the coefficient ring which
+may be non-commutative.  However, coefficients and variables commute.
+The representation of the polynomials is recursive.  The abbreviation
+for XPolynomial is XPOLY.
+
+Other constructors like XPolynomialRing, XRecursivePolynomial as well 
+as XDistributedPolynomial, LiePolynomial and XPBWPolynomial implement 
+multivariate polynomials in non-commutative variables.
+
+We illustrate now some of the facilities of the XPOLY domain constructor.
+
+Define a polynomial ring over the integers.
+
+  poly := XPolynomial(Integer)
+    XPolynomial Integer
+                                 Type: Domain
+
+Define a first polynomial,
+
+  pr: poly := 2*x + 3*y-5 
+    - 5 + x 2 + y 3
+                                 Type: XPolynomial Integer
+
+and a second one.
+
+  pr2: poly := pr*pr
+    25 + x(- 20 + x 4 + y 6) + y(- 30 + x 6 + y 9)
+                                 Type: XPolynomial Integer
+
+Rewrite pr in a distributive way,
+
+  pd  := expand pr
+    - 5 + 2x + 3y
+                                 Type: XDistributedPolynomial(Symbol,Integer)
+
+compute its square,
+
+  pd2 := pd*pd
+                       2                   2
+    25 - 20x - 30y + 4x  + 6x y + 6y x + 9y
+                                 Type: XDistributedPolynomial(Symbol,Integer)
+
+and checks that:
+
+  expand(pr2) - pd2
+    0
+                                 Type: XDistributedPolynomial(Symbol,Integer)
+
+We define:
+
+  qr :=  pr**3
+     - 125 + x(150 + x(- 60 + x 8 + y 12) + y(- 90 + x 12 + y 18))
+   + 
+     y(225 + x(- 90 + x 12 + y 18) + y(- 135 + x 18 + y 27))
+                                 Type: XPolynomial Integer
+
+and:
+
+  qd :=  pd**3
+                              2                       2     3      2
+     - 125 + 150x + 225y - 60x  - 90x y - 90y x - 135y  + 8x  + 12x y + 12x y x
+   + 
+          2        2                2       3
+     18x y  + 12y x  + 18y x y + 18y x + 27y
+                                 Type: XDistributedPolynomial(Symbol,Integer)
+
+We truncate qd at degree 3.
+
+  trunc(qd,2)
+                             2                       2
+    - 125 + 150x + 225y - 60x  - 90x y - 90y x - 135y
+                                 Type: XDistributedPolynomial(Symbol,Integer)
+
+The same for qr:
+
+  trunc(qr,2)
+    - 125 + x(150 + x(- 60) + y(- 90)) + y(225 + x(- 90) + y(- 135))
+                                 Type: XPolynomial Integer
+
+We define:
+
+  Word := OrderedFreeMonoid Symbol
+    OrderedFreeMonoid Symbol
+                                 Type: Domain
+
+and:
+
+  w: Word := x*y**2
+       2
+    x y
+                                 Type: OrderedFreeMonoid Symbol
+
+We can compute the right-quotient of qr by r:
+
+  rquo(qr,w)
+    18
+                                 Type: XPolynomial Integer
+
+and the shuffle-product of pr by r:
+
+  sh(pr,w::poly)
+    x(x y y 4 + y(x y 2 + y(- 5 + x 2 + y 9))) + y x y y 3
+                                 Type: XPolynomial Integer
+
+See Also:
+o )help XPBWPolynomial
+o )help LiePolynomial
+o )help XDistributedPolynomial
+o )help XRecursivePolynomial
+o )help XPolynomialRing
+o )show XPolynomial
+o $AXIOM/doc/src/algebra/xpoly.spad.dvi
+
+@
 <<domain XPOLY XPolynomial>>=
 )abbrev domain XPOLY XPolynomial
 ++ Author: Michel Petitot petitot@lifl.fr
diff --git a/src/algebra/zerodim.spad.pamphlet b/src/algebra/zerodim.spad.pamphlet
index 8e20563..26261e9 100644
--- a/src/algebra/zerodim.spad.pamphlet
+++ b/src/algebra/zerodim.spad.pamphlet
@@ -4125,6 +4125,3124 @@ Based on triangular decompositions and the {\bf RealClosure} constructor,
 the pacakge {\bf ZeroDimensionalSolvePackage} provides operations for
 computing symbolically the real or complex roots of polynomial systems
 with finitely many solutions.
+<<ZeroDimensionalSolvePackage.input>>=
+-- zerodim.spad.pamphlet ZeroDimensionalSolvePackage.input
+)spool ZeroDimensionalSolvePackage.output
+)set message test on
+)set message auto off
+)clear all
+--S 1 of 28
+R := Integer
+--R 
+--R
+--R   (1)  Integer
+--R                                                                 Type: Domain
+--E 1
+
+--S 2 of 28
+ls : List Symbol := [x,y,z,t]
+--R 
+--R
+--R   (2)  [x,y,z,t]
+--R                                                            Type: List Symbol
+--E 2
+
+--S 3 of 28
+ls2 : List Symbol := [x,y,z,t,new()$Symbol]
+--R 
+--R
+--R   (3)  [x,y,z,t,%A]
+--R                                                            Type: List Symbol
+--E 3
+
+--S 4 of 28
+pack := ZDSOLVE(R,ls,ls2)
+--R 
+--R
+--R   (4)  ZeroDimensionalSolvePackage(Integer,[x,y,z,t],[x,y,z,t,%A])
+--R                                                                 Type: Domain
+--E 4
+
+--S 5 of 28
+p1 := x**2*y*z + x*y**2*z + x*y*z**2 + x*y*z + x*y + x*z + y*z
+--R 
+--R
+--R             2       2     2
+--R   (5)  x y z  + (x y  + (x  + x + 1)y + x)z + x y
+--R                                                     Type: Polynomial Integer
+--E 5
+
+--S 6 of 28
+p2 := x**2*y**2*z + x*y**2*z**2 + x**2*y*z + x*y*z + y*z + x + z
+--R 
+--R
+--R           2 2     2 2     2
+--R   (6)  x y z  + (x y  + (x  + x + 1)y + 1)z + x
+--R                                                     Type: Polynomial Integer
+--E 6
+
+--S 7 of 28
+p3 := x**2*y**2*z**2 + x**2*y**2*z + x*y**2*z + x*y*z + x*z + z + 1
+--R 
+--R
+--R         2 2 2      2      2
+--R   (7)  x y z  + ((x  + x)y  + x y + x + 1)z + 1
+--R                                                     Type: Polynomial Integer
+--E 7
+
+--S 8 of 28
+lp := [p1, p2, p3]
+--R 
+--R
+--R   (8)
+--R         2       2     2
+--R   [x y z  + (x y  + (x  + x + 1)y + x)z + x y,
+--R       2 2     2 2     2
+--R    x y z  + (x y  + (x  + x + 1)y + 1)z + x,
+--R     2 2 2      2      2
+--R    x y z  + ((x  + x)y  + x y + x + 1)z + 1]
+--R                                                Type: List Polynomial Integer
+--E 8
+
+--S 9 of 28
+triangSolve(lp)$pack
+--R 
+--R
+--R   (9)
+--R   [
+--R     {
+--R          20     19      18      17       16      15       14       13       12
+--R         z   - 6z   - 41z   + 71z   + 106z   + 92z   + 197z   + 145z   + 257z
+--R       + 
+--R             11       10       9       8       7       6      5       4      3
+--R         278z   + 201z   + 278z  + 257z  + 145z  + 197z  + 92z  + 106z  + 71z
+--R       + 
+--R              2
+--R         - 41z  - 6z + 1
+--R       ,
+--R
+--R                      19            18             17             16
+--R             14745844z   + 50357474z   - 130948857z   - 185261586z
+--R           + 
+--R                         15             14             13             12
+--R             - 180077775z   - 338007307z   - 275379623z   - 453190404z
+--R           + 
+--R                         11             10             9             8
+--R             - 474597456z   - 366147695z   - 481433567z  - 430613166z
+--R           + 
+--R                         7             6             5             4
+--R             - 261878358z  - 326073537z  - 163008796z  - 177213227z
+--R           + 
+--R                         3            2
+--R             - 104356755z  + 65241699z  + 9237732z - 1567348
+--R        *
+--R           y
+--R       + 
+--R                 19           18            17            16            15
+--R         1917314z   + 6508991z   - 16973165z   - 24000259z   - 23349192z
+--R       + 
+--R                    14            13            12            11            10
+--R         - 43786426z   - 35696474z   - 58724172z   - 61480792z   - 47452440z
+--R       + 
+--R                    9            8            7            6            5
+--R         - 62378085z  - 55776527z  - 33940618z  - 42233406z  - 21122875z
+--R       + 
+--R                    4            3           2
+--R         - 22958177z  - 13504569z  + 8448317z  + 1195888z - 202934
+--R       ,
+--R         3       2       3    2               2              2
+--R      ((z  - 2z)y  + (- z  - z  - 2z - 1)y - z  - z + 1)x + z  - 1}
+--R     ]
+--R                                   Type: List RegularChain(Integer,[x,y,z,t])
+--E 9
+
+--S 10 of 28
+univariateSolve(lp)$pack
+--R 
+--R
+--R   (10)
+--R   [
+--R     [
+--R       complexRoots =
+--R            12      11      10     9     8      7      6      5     4     3
+--R           ?   - 12?   + 24?   + 4?  - 9?  + 27?  - 21?  + 27?  - 9?  + 4?
+--R         + 
+--R              2
+--R           24?  - 12? + 1
+--R       ,
+--R
+--R       coordinates =
+--R         [
+--R                       11        10         9        8        7         6
+--R             63x + 62%A   - 721%A   + 1220%A  + 705%A  - 285%A  + 1512%A
+--R           + 
+--R                    5         4       3        2
+--R             - 735%A  + 1401%A  - 21%A  + 215%A  + 1577%A - 142
+--R           ,
+--R
+--R                       11        10         9        8        7         6
+--R             63y - 75%A   + 890%A   - 1682%A  - 516%A  + 588%A  - 1953%A
+--R           + 
+--R                   5         4        3        2
+--R             1323%A  - 1815%A  + 426%A  - 243%A  - 1801%A + 679
+--R           ,
+--R          z - %A]
+--R       ]
+--R     ,
+--R
+--R                     6    5    4    3    2
+--R     [complexRoots= ?  + ?  + ?  + ?  + ?  + ? + 1,
+--R                          5       3
+--R      coordinates= [x - %A ,y - %A ,z - %A]]
+--R     ,
+--R                    2
+--R    [complexRoots= ?  + 5? + 1,coordinates= [x - 1,y - 1,z - %A]]]
+--RType: List Record(complexRoots: SparseUnivariatePolynomial Integer,coordinates: List Polynomial Integer)
+--E 10
+
+--S 11 of 28
+lr := realSolve(lp)$pack
+--R 
+--R
+--R   (11)
+--R   [
+--R     [%B1,
+--R
+--R         1184459    19   2335702    18   5460230    17   79900378    16
+--R         ------- %B1   - ------- %B1   - ------- %B1   + -------- %B1
+--R         1645371          548457          182819          1645371
+--R       + 
+--R         43953929    15   13420192    14   553986    13   193381378    12
+--R         -------- %B1   + -------- %B1   + ------ %B1   + --------- %B1
+--R          548457           182819           3731           1645371
+--R       + 
+--R         35978916    11   358660781    10   271667666    9   118784873    8
+--R         -------- %B1   + --------- %B1   + --------- %B1  + --------- %B1
+--R          182819           1645371           1645371           548457
+--R       + 
+--R         337505020    7   1389370    6   688291    5   3378002    4
+--R         --------- %B1  + ------- %B1  + ------ %B1  + ------- %B1
+--R          1645371          11193          4459          42189
+--R       + 
+--R         140671876    3   32325724    2   8270       9741532
+--R         --------- %B1  + -------- %B1  - ---- %B1 - -------
+--R          1645371          548457          343       1645371
+--R       ,
+--R
+--R            91729    19   487915    18   4114333    17   1276987    16
+--R         - ------ %B1   + ------ %B1   + ------- %B1   - ------- %B1
+--R           705159         705159          705159          235053
+--R       + 
+--R           13243117    15   16292173    14   26536060    13   722714    12
+--R         - -------- %B1   - -------- %B1   - -------- %B1   - ------ %B1
+--R            705159           705159           705159           18081
+--R       + 
+--R           5382578    11   15449995    10   14279770    9   6603890    8
+--R         - ------- %B1   - -------- %B1   - -------- %B1  - ------- %B1
+--R            100737          235053           235053          100737
+--R       + 
+--R           409930    7   37340389    6   34893715    5   26686318    4
+--R         - ------ %B1  - -------- %B1  - -------- %B1  - -------- %B1
+--R            6027          705159          705159          705159
+--R       + 
+--R           801511    3   17206178    2   4406102       377534
+--R         - ------ %B1  - -------- %B1  - ------- %B1 + ------
+--R            26117         705159          705159       705159
+--R       ]
+--R     ,
+--R
+--R     [%B2,
+--R
+--R         1184459    19   2335702    18   5460230    17   79900378    16
+--R         ------- %B2   - ------- %B2   - ------- %B2   + -------- %B2
+--R         1645371          548457          182819          1645371
+--R       + 
+--R         43953929    15   13420192    14   553986    13   193381378    12
+--R         -------- %B2   + -------- %B2   + ------ %B2   + --------- %B2
+--R          548457           182819           3731           1645371
+--R       + 
+--R         35978916    11   358660781    10   271667666    9   118784873    8
+--R         -------- %B2   + --------- %B2   + --------- %B2  + --------- %B2
+--R          182819           1645371           1645371           548457
+--R       + 
+--R         337505020    7   1389370    6   688291    5   3378002    4
+--R         --------- %B2  + ------- %B2  + ------ %B2  + ------- %B2
+--R          1645371          11193          4459          42189
+--R       + 
+--R         140671876    3   32325724    2   8270       9741532
+--R         --------- %B2  + -------- %B2  - ---- %B2 - -------
+--R          1645371          548457          343       1645371
+--R       ,
+--R
+--R            91729    19   487915    18   4114333    17   1276987    16
+--R         - ------ %B2   + ------ %B2   + ------- %B2   - ------- %B2
+--R           705159         705159          705159          235053
+--R       + 
+--R           13243117    15   16292173    14   26536060    13   722714    12
+--R         - -------- %B2   - -------- %B2   - -------- %B2   - ------ %B2
+--R            705159           705159           705159           18081
+--R       + 
+--R           5382578    11   15449995    10   14279770    9   6603890    8
+--R         - ------- %B2   - -------- %B2   - -------- %B2  - ------- %B2
+--R            100737          235053           235053          100737
+--R       + 
+--R           409930    7   37340389    6   34893715    5   26686318    4
+--R         - ------ %B2  - -------- %B2  - -------- %B2  - -------- %B2
+--R            6027          705159          705159          705159
+--R       + 
+--R           801511    3   17206178    2   4406102       377534
+--R         - ------ %B2  - -------- %B2  - ------- %B2 + ------
+--R            26117         705159          705159       705159
+--R       ]
+--R     ,
+--R
+--R     [%B3,
+--R
+--R         1184459    19   2335702    18   5460230    17   79900378    16
+--R         ------- %B3   - ------- %B3   - ------- %B3   + -------- %B3
+--R         1645371          548457          182819          1645371
+--R       + 
+--R         43953929    15   13420192    14   553986    13   193381378    12
+--R         -------- %B3   + -------- %B3   + ------ %B3   + --------- %B3
+--R          548457           182819           3731           1645371
+--R       + 
+--R         35978916    11   358660781    10   271667666    9   118784873    8
+--R         -------- %B3   + --------- %B3   + --------- %B3  + --------- %B3
+--R          182819           1645371           1645371           548457
+--R       + 
+--R         337505020    7   1389370    6   688291    5   3378002    4
+--R         --------- %B3  + ------- %B3  + ------ %B3  + ------- %B3
+--R          1645371          11193          4459          42189
+--R       + 
+--R         140671876    3   32325724    2   8270       9741532
+--R         --------- %B3  + -------- %B3  - ---- %B3 - -------
+--R          1645371          548457          343       1645371
+--R       ,
+--R
+--R            91729    19   487915    18   4114333    17   1276987    16
+--R         - ------ %B3   + ------ %B3   + ------- %B3   - ------- %B3
+--R           705159         705159          705159          235053
+--R       + 
+--R           13243117    15   16292173    14   26536060    13   722714    12
+--R         - -------- %B3   - -------- %B3   - -------- %B3   - ------ %B3
+--R            705159           705159           705159           18081
+--R       + 
+--R           5382578    11   15449995    10   14279770    9   6603890    8
+--R         - ------- %B3   - -------- %B3   - -------- %B3  - ------- %B3
+--R            100737          235053           235053          100737
+--R       + 
+--R           409930    7   37340389    6   34893715    5   26686318    4
+--R         - ------ %B3  - -------- %B3  - -------- %B3  - -------- %B3
+--R            6027          705159          705159          705159
+--R       + 
+--R           801511    3   17206178    2   4406102       377534
+--R         - ------ %B3  - -------- %B3  - ------- %B3 + ------
+--R            26117         705159          705159       705159
+--R       ]
+--R     ,
+--R
+--R     [%B4,
+--R
+--R         1184459    19   2335702    18   5460230    17   79900378    16
+--R         ------- %B4   - ------- %B4   - ------- %B4   + -------- %B4
+--R         1645371          548457          182819          1645371
+--R       + 
+--R         43953929    15   13420192    14   553986    13   193381378    12
+--R         -------- %B4   + -------- %B4   + ------ %B4   + --------- %B4
+--R          548457           182819           3731           1645371
+--R       + 
+--R         35978916    11   358660781    10   271667666    9   118784873    8
+--R         -------- %B4   + --------- %B4   + --------- %B4  + --------- %B4
+--R          182819           1645371           1645371           548457
+--R       + 
+--R         337505020    7   1389370    6   688291    5   3378002    4
+--R         --------- %B4  + ------- %B4  + ------ %B4  + ------- %B4
+--R          1645371          11193          4459          42189
+--R       + 
+--R         140671876    3   32325724    2   8270       9741532
+--R         --------- %B4  + -------- %B4  - ---- %B4 - -------
+--R          1645371          548457          343       1645371
+--R       ,
+--R
+--R            91729    19   487915    18   4114333    17   1276987    16
+--R         - ------ %B4   + ------ %B4   + ------- %B4   - ------- %B4
+--R           705159         705159          705159          235053
+--R       + 
+--R           13243117    15   16292173    14   26536060    13   722714    12
+--R         - -------- %B4   - -------- %B4   - -------- %B4   - ------ %B4
+--R            705159           705159           705159           18081
+--R       + 
+--R           5382578    11   15449995    10   14279770    9   6603890    8
+--R         - ------- %B4   - -------- %B4   - -------- %B4  - ------- %B4
+--R            100737          235053           235053          100737
+--R       + 
+--R           409930    7   37340389    6   34893715    5   26686318    4
+--R         - ------ %B4  - -------- %B4  - -------- %B4  - -------- %B4
+--R            6027          705159          705159          705159
+--R       + 
+--R           801511    3   17206178    2   4406102       377534
+--R         - ------ %B4  - -------- %B4  - ------- %B4 + ------
+--R            26117         705159          705159       705159
+--R       ]
+--R     ,
+--R
+--R     [%B5,
+--R
+--R         1184459    19   2335702    18   5460230    17   79900378    16
+--R         ------- %B5   - ------- %B5   - ------- %B5   + -------- %B5
+--R         1645371          548457          182819          1645371
+--R       + 
+--R         43953929    15   13420192    14   553986    13   193381378    12
+--R         -------- %B5   + -------- %B5   + ------ %B5   + --------- %B5
+--R          548457           182819           3731           1645371
+--R       + 
+--R         35978916    11   358660781    10   271667666    9   118784873    8
+--R         -------- %B5   + --------- %B5   + --------- %B5  + --------- %B5
+--R          182819           1645371           1645371           548457
+--R       + 
+--R         337505020    7   1389370    6   688291    5   3378002    4
+--R         --------- %B5  + ------- %B5  + ------ %B5  + ------- %B5
+--R          1645371          11193          4459          42189
+--R       + 
+--R         140671876    3   32325724    2   8270       9741532
+--R         --------- %B5  + -------- %B5  - ---- %B5 - -------
+--R          1645371          548457          343       1645371
+--R       ,
+--R
+--R            91729    19   487915    18   4114333    17   1276987    16
+--R         - ------ %B5   + ------ %B5   + ------- %B5   - ------- %B5
+--R           705159         705159          705159          235053
+--R       + 
+--R           13243117    15   16292173    14   26536060    13   722714    12
+--R         - -------- %B5   - -------- %B5   - -------- %B5   - ------ %B5
+--R            705159           705159           705159           18081
+--R       + 
+--R           5382578    11   15449995    10   14279770    9   6603890    8
+--R         - ------- %B5   - -------- %B5   - -------- %B5  - ------- %B5
+--R            100737          235053           235053          100737
+--R       + 
+--R           409930    7   37340389    6   34893715    5   26686318    4
+--R         - ------ %B5  - -------- %B5  - -------- %B5  - -------- %B5
+--R            6027          705159          705159          705159
+--R       + 
+--R           801511    3   17206178    2   4406102       377534
+--R         - ------ %B5  - -------- %B5  - ------- %B5 + ------
+--R            26117         705159          705159       705159
+--R       ]
+--R     ,
+--R
+--R     [%B6,
+--R
+--R         1184459    19   2335702    18   5460230    17   79900378    16
+--R         ------- %B6   - ------- %B6   - ------- %B6   + -------- %B6
+--R         1645371          548457          182819          1645371
+--R       + 
+--R         43953929    15   13420192    14   553986    13   193381378    12
+--R         -------- %B6   + -------- %B6   + ------ %B6   + --------- %B6
+--R          548457           182819           3731           1645371
+--R       + 
+--R         35978916    11   358660781    10   271667666    9   118784873    8
+--R         -------- %B6   + --------- %B6   + --------- %B6  + --------- %B6
+--R          182819           1645371           1645371           548457
+--R       + 
+--R         337505020    7   1389370    6   688291    5   3378002    4
+--R         --------- %B6  + ------- %B6  + ------ %B6  + ------- %B6
+--R          1645371          11193          4459          42189
+--R       + 
+--R         140671876    3   32325724    2   8270       9741532
+--R         --------- %B6  + -------- %B6  - ---- %B6 - -------
+--R          1645371          548457          343       1645371
+--R       ,
+--R
+--R            91729    19   487915    18   4114333    17   1276987    16
+--R         - ------ %B6   + ------ %B6   + ------- %B6   - ------- %B6
+--R           705159         705159          705159          235053
+--R       + 
+--R           13243117    15   16292173    14   26536060    13   722714    12
+--R         - -------- %B6   - -------- %B6   - -------- %B6   - ------ %B6
+--R            705159           705159           705159           18081
+--R       + 
+--R           5382578    11   15449995    10   14279770    9   6603890    8
+--R         - ------- %B6   - -------- %B6   - -------- %B6  - ------- %B6
+--R            100737          235053           235053          100737
+--R       + 
+--R           409930    7   37340389    6   34893715    5   26686318    4
+--R         - ------ %B6  - -------- %B6  - -------- %B6  - -------- %B6
+--R            6027          705159          705159          705159
+--R       + 
+--R           801511    3   17206178    2   4406102       377534
+--R         - ------ %B6  - -------- %B6  - ------- %B6 + ------
+--R            26117         705159          705159       705159
+--R       ]
+--R     ,
+--R
+--R     [%B7,
+--R
+--R         1184459    19   2335702    18   5460230    17   79900378    16
+--R         ------- %B7   - ------- %B7   - ------- %B7   + -------- %B7
+--R         1645371          548457          182819          1645371
+--R       + 
+--R         43953929    15   13420192    14   553986    13   193381378    12
+--R         -------- %B7   + -------- %B7   + ------ %B7   + --------- %B7
+--R          548457           182819           3731           1645371
+--R       + 
+--R         35978916    11   358660781    10   271667666    9   118784873    8
+--R         -------- %B7   + --------- %B7   + --------- %B7  + --------- %B7
+--R          182819           1645371           1645371           548457
+--R       + 
+--R         337505020    7   1389370    6   688291    5   3378002    4
+--R         --------- %B7  + ------- %B7  + ------ %B7  + ------- %B7
+--R          1645371          11193          4459          42189
+--R       + 
+--R         140671876    3   32325724    2   8270       9741532
+--R         --------- %B7  + -------- %B7  - ---- %B7 - -------
+--R          1645371          548457          343       1645371
+--R       ,
+--R
+--R            91729    19   487915    18   4114333    17   1276987    16
+--R         - ------ %B7   + ------ %B7   + ------- %B7   - ------- %B7
+--R           705159         705159          705159          235053
+--R       + 
+--R           13243117    15   16292173    14   26536060    13   722714    12
+--R         - -------- %B7   - -------- %B7   - -------- %B7   - ------ %B7
+--R            705159           705159           705159           18081
+--R       + 
+--R           5382578    11   15449995    10   14279770    9   6603890    8
+--R         - ------- %B7   - -------- %B7   - -------- %B7  - ------- %B7
+--R            100737          235053           235053          100737
+--R       + 
+--R           409930    7   37340389    6   34893715    5   26686318    4
+--R         - ------ %B7  - -------- %B7  - -------- %B7  - -------- %B7
+--R            6027          705159          705159          705159
+--R       + 
+--R           801511    3   17206178    2   4406102       377534
+--R         - ------ %B7  - -------- %B7  - ------- %B7 + ------
+--R            26117         705159          705159       705159
+--R       ]
+--R     ,
+--R
+--R     [%B8,
+--R
+--R         1184459    19   2335702    18   5460230    17   79900378    16
+--R         ------- %B8   - ------- %B8   - ------- %B8   + -------- %B8
+--R         1645371          548457          182819          1645371
+--R       + 
+--R         43953929    15   13420192    14   553986    13   193381378    12
+--R         -------- %B8   + -------- %B8   + ------ %B8   + --------- %B8
+--R          548457           182819           3731           1645371
+--R       + 
+--R         35978916    11   358660781    10   271667666    9   118784873    8
+--R         -------- %B8   + --------- %B8   + --------- %B8  + --------- %B8
+--R          182819           1645371           1645371           548457
+--R       + 
+--R         337505020    7   1389370    6   688291    5   3378002    4
+--R         --------- %B8  + ------- %B8  + ------ %B8  + ------- %B8
+--R          1645371          11193          4459          42189
+--R       + 
+--R         140671876    3   32325724    2   8270       9741532
+--R         --------- %B8  + -------- %B8  - ---- %B8 - -------
+--R          1645371          548457          343       1645371
+--R       ,
+--R
+--R            91729    19   487915    18   4114333    17   1276987    16
+--R         - ------ %B8   + ------ %B8   + ------- %B8   - ------- %B8
+--R           705159         705159          705159          235053
+--R       + 
+--R           13243117    15   16292173    14   26536060    13   722714    12
+--R         - -------- %B8   - -------- %B8   - -------- %B8   - ------ %B8
+--R            705159           705159           705159           18081
+--R       + 
+--R           5382578    11   15449995    10   14279770    9   6603890    8
+--R         - ------- %B8   - -------- %B8   - -------- %B8  - ------- %B8
+--R            100737          235053           235053          100737
+--R       + 
+--R           409930    7   37340389    6   34893715    5   26686318    4
+--R         - ------ %B8  - -------- %B8  - -------- %B8  - -------- %B8
+--R            6027          705159          705159          705159
+--R       + 
+--R           801511    3   17206178    2   4406102       377534
+--R         - ------ %B8  - -------- %B8  - ------- %B8 + ------
+--R            26117         705159          705159       705159
+--R       ]
+--R     ]
+--R                                 Type: List List RealClosure Fraction Integer
+--E 11
+
+--S 12 of 28
+# lr
+--R 
+--R
+--R   (12)  8
+--R                                                        Type: PositiveInteger
+--E 12
+
+--S 13 of 28
+[ [approximate(r,1/1000000) for r in point] for point in lr]
+--R 
+--R
+--R   (13)
+--R   [
+--R        10048059
+--R     [- --------,
+--R         2097152
+--R
+--R        4503057316985387943524397913838966414596731976211768219335881208385516_
+--R         314058924567176091423629695777403099833360761048898228916578137094309_
+--R         838597331137202584846939132376157019506760357601165917454986815382098_
+--R         789094851523420392811293126141329856546977145464661495487825919941188_
+--R         447041722440491921567263542158028061437758844364634410045253024786561_
+--R         923163288214175
+--R      /
+--R        4503057283025245488516511806985826635083100693757320465280554706865644_
+--R         949577509916867201889438090408354817931718593862797624551518983570793_
+--R         048774424291488708829840324189200301436123314860200821443733790755311_
+--R         243632919864895421704228949571290016119498807957023663865443069392027_
+--R         148979688266712323356043491523434068924275280417338574817381189277066_
+--R         143312396681216
+--R       ,
+--R
+--R        2106260768823475073894798680486016596249607148690685538763683715020639_
+--R         680858649650790055889505646893309447097099937802187329095325898785247_
+--R         249020717504983660482075156618738724514685333060011202964635166381351_
+--R         543255982200250305283981086837110614842307026091211297929876896285681_
+--R         830479054760056380762664905618462055306047816191782011588703789138988_
+--R         1895
+--R      /
+--R        2106260609498464192472113804816474175341962953296434102413903142368757_
+--R         967685273888585590975965211778862189872881953943640246297357061959812_
+--R         326103659799025126863258676567202342106877031710184247484181423288921_
+--R         837681237062708470295706218485928867400771937828499200923760593314168_
+--R         901000666373896347598118228556731037072026474496776228383762993923280_
+--R         0768
+--R       ]
+--R     ,
+--R
+--R        2563013
+--R     [- -------,
+--R        2097152
+--R
+--R       -
+--R           2611346176791927789698617693237757719238259963063541781922752330440_
+--R            189899668072928338490768623593207442125925986733815932243504809294_
+--R            837523030237337236806668167446173001727271353311571242897
+--R         /
+--R           1165225400505222530583981916004589143757226610276858990008790134819_
+--R            914940922413753983971394019523433320408139928153188829495755455163_
+--R            963417619308395977544797140231469234269034921938055593984
+--R       ,
+--R
+--R        3572594550275917221096588729615788272998517054675603239578198141006034_
+--R         091735282826590621902304466963941971038923304526273329316373757450061_
+--R         9789892286110976997087250466235373
+--R      /
+--R        1039548269345598936877071244834026055800814551120170592200522366591759_
+--R         409659486442339141029452950265179989960104811875822530205346505131581_
+--R         2439017247289173865014702966308864
+--R       ]
+--R     ,
+--R
+--R        1715967
+--R     [- -------,
+--R        2097152
+--R
+--R       -
+--R           4213093533784303521084839517977082390377261503969586224828998436606_
+--R            030656076359374564813773498376603121267822565801436206939519951465_
+--R            18222580524697287410022543952491
+--R         /
+--R           9441814144185374458649692034349224052436597470966253663930641960795_
+--R            805882585493199840191699917659443264824641135187383583888147867340_
+--R            19307857605820364195856822304768
+--R       ,
+--R
+--R        7635833347112644222515625424410831225347475669008589338834162172501904_
+--R         994376346730876809042845208919919925302105720971453918982731389072591_
+--R         4035
+--R      /
+--R        2624188764086097199784297610478066633934230467895851602278580978503784_
+--R         549205788499019640602266966026891580103543567625039018629887141284916_
+--R         75648
+--R       ]
+--R     ,
+--R
+--R         437701
+--R     [- -------,
+--R        2097152
+--R
+--R        1683106908638349588322172332654225913562986313181951031452750161441497_
+--R         473455328150721364868355579646781603507777199075077835213366484533654_
+--R         91383623741304759
+--R      /
+--R        1683106868095213389001709982705913638963077668731226111167785188004907_
+--R         425226298680325887810962614140298597366984264887998908377068799998454_
+--R         23381649008099328
+--R       ,
+--R
+--R        4961550109835010186422681013422108735958714801003760639707968096646912_
+--R         82670847283444311723917219104249213450966312411133
+--R      /
+--R        4961549872757738315509192078210209029852897118611097126236384040829376_
+--R         59261914313170254867464792718363492160482442215424
+--R       ]
+--R     ,
+--R
+--R       222801
+--R     [-------,
+--R      2097152
+--R
+--R       -
+--R           8994884880402428265107595121970691427136045692541978275573001865213_
+--R            759921588137716696126349101655220195142994932299137183241705867672_
+--R            383477
+--R         /
+--R           1167889998665026372177765100691888582708969960229934769690835752457_
+--R            077779416435209473767866507769405888942764587718542434255625992456_
+--R            372224
+--R       ,
+--R
+--R       -
+--R           2389704888133156878320801544373808395612771509208491019847452991885_
+--R            509546519525467839016613593999693886640036283570552321155037871291_
+--R            458703265
+--R         /
+--R           5355487273645096326090403286689931905988225444685411433221593833681_
+--R            192957562833671468654290340746993656285925599117602120446183443145_
+--R            479421952
+--R       ]
+--R     ,
+--R
+--R       765693
+--R     [-------,
+--R      2097152
+--R
+--R        8558969219816716267873244761178198088724698958616670140213765754322002_
+--R         303251685786118678330840203328837654339523418704917749518340772512899_
+--R         000391009630373148561
+--R      /
+--R        2941442445533010790976428411376393499815580215945856917906452535495723_
+--R         013856818941702330228779890141296236721138154231997238917322156711965_
+--R         2444639331719460159488
+--R       ,
+--R
+--R       -
+--R           2057618230582572101247650324860242561111302581543588808843923662767_
+--R            549382241659362712290777612800192921420574408948085193743688582762_
+--R            2246433251878894899015
+--R         /
+--R           2671598203325735538097952353501450220576313759890835097091722520642_
+--R            710198771902667183948906289863714759678360292483949204616471537777_
+--R            775324180661095366656
+--R       ]
+--R     ,
+--R
+--R      5743879
+--R     [-------,
+--R      2097152
+--R
+--R        1076288816968906847955546394773570208171456724942618614023663123574768_
+--R         960850434263971398072546592772662158833449797698617455397887562900072_
+--R         984768000608343553189801693408727205047612559889232757563830528688953_
+--R         535421809482771058917542602890060941949620874083007858366669453501766_
+--R         24841488732463225
+--R      /
+--R        3131768957080317946648461940023552044190376613458584986228549631916196_
+--R         601616219781765615532532294746529648276430583810894079374566460757823_
+--R         146888581195556029208515218838883200318658407469399426063260589828612_
+--R         309231596669129707986481319851571942927230340622934023923486703042068_
+--R         1530440845099008
+--R       ,
+--R
+--R       -
+--R           2113286699185750918364120475565458437870172489865485994389828135335_
+--R            264444665284557526492734931691731407872701432935503473348172076098_
+--R            720545849008780077564160534317894688366119529739980502944162668550_
+--R            098127961950496210221942878089359674925850594427768502251789758706_
+--R            752831632503615
+--R         /
+--R           1627615584937987580242906624347104580889144466168459718043153839408_
+--R            372525533309808070363699585502216011211087103263609551026027769414_
+--R            087391148126221168139781682587438075322591466131939975457200522349_
+--R            838568964285634448018562038272378787354460106106141518010935617205_
+--R            1706396253618176
+--R       ]
+--R     ,
+--R
+--R      19739877
+--R     [--------,
+--R       2097152
+--R
+--R       -
+--R           2997249936832703303799015804861520949215040387500707177701285766720_
+--R            192530579422478953566024359860143101547801638082771611160372212874_
+--R            847778035809872843149225484238365858013629341705321702582333350918_
+--R            009601789937023985935304900460493389873837030853410347089908880814_
+--R            853981132018464582458800615394770741699487295875960210750215891948_
+--R            814476854871031530931295467332190133702671098200902282300510751860_
+--R            7185928457030277807397796525813862762239286996106809728023675
+--R         /
+--R           2308433274852278590728910081191811023906504141321432646123936794873_
+--R            933319270608960702138193417647898360620229519176632937631786851455_
+--R            014766027206259022252505551741823688896883806636602574431760472240_
+--R            292093196729475160247268834121141893318848728661844434927287285112_
+--R            897080767552864895056585864033178565910387065006112801516403522741_
+--R            037360990556054476949527059227070809593049491257519554708879259595_
+--R            52929920110858560812556635485429471554031675979542656381353984
+--R       ,
+--R
+--R       -
+--R           5128189263548228489096276397868940080600938410663080459407966335845_
+--R            009264109490520459825316250084723010047035024497436523038925818959_
+--R            289312931584701353927621435434398674263047293909122850133851990696_
+--R            490231566094371994333795070782624011727587749989296611277318372294_
+--R            624207116537910436554574146082884701305543912620419354885410735940_
+--R            157775896602822364575864611831512943973974715166920465061850603762_
+--R            87516256195847052412587282839139194642913955
+--R         /
+--R           2288281939778439330531208793181290471183631092455368990386390824243_
+--R            509463644236249773080647438987739144921607794682653851741189091711_
+--R            741868145114978337284191822497675868358729486644730856622552687209_
+--R            203724411800481405702837198310642291275676195774614443815996713502_
+--R            629391749783590041470860127752372996488627742672487622480063268808_
+--R            889324891850842494934347337603075939980268208482904859678177751444_
+--R            65749979827872616963053217673201717237252096
+--R       ]
+--R     ]
+--R                                             Type: List List Fraction Integer
+--E 13
+
+--S 14 of 28
+lpr := positiveSolve(lp)$pack
+--R 
+--R
+--R   (14)  []
+--R                                 Type: List List RealClosure Fraction Integer
+--E 14
+
+--S 15 of 28
+f0 := x**3 + y + z + t- 1
+--R 
+--R
+--R                  3
+--R   (15)  z + y + x  + t - 1
+--R                                                     Type: Polynomial Integer
+--E 15
+
+--S 16 of 28
+f1 := x + y**3 + z + t -1
+--R 
+--R
+--R              3
+--R   (16)  z + y  + x + t - 1
+--R                                                     Type: Polynomial Integer
+--E 16
+
+--S 17 of 28
+f2 := x + y + z**3 + t-1
+--R 
+--R
+--R          3
+--R   (17)  z  + y + x + t - 1
+--R                                                     Type: Polynomial Integer
+--E 17
+
+--S 18 of 28
+f3 := x + y + z + t**3 -1
+--R 
+--R
+--R                      3
+--R   (18)  z + y + x + t  - 1
+--R                                                     Type: Polynomial Integer
+--E 18
+
+--S 19 of 28
+lf := [f0, f1, f2, f3]
+--R 
+--R
+--R   (19)
+--R             3              3              3                              3
+--R   [z + y + x  + t - 1,z + y  + x + t - 1,z  + y + x + t - 1,z + y + x + t  - 1]
+--R                                                Type: List Polynomial Integer
+--E 19
+
+--S 20 of 28
+lts := triangSolve(lf)$pack
+--R 
+--R
+--R   (20)
+--R   [
+--R       2           3        3
+--R     {t  + t + 1, z  - z - t  + t,
+--R
+--R                 3      2      2      3           6     3            3      2
+--R         (3z + 3t  - 3)y  + (3z  + (6t  - 6)z + 3t  - 6t  + 3)y + (3t  - 3)z
+--R       + 
+--R            6     3          9     6     3
+--R         (3t  - 6t  + 3)z + t  - 3t  + 5t  - 3t
+--R       ,
+--R      x + y + z}
+--R     ,
+--R
+--R       16     13     10     7      4      2
+--R     {t   - 6t   + 9t   + 4t  + 15t  - 54t  + 27,
+--R
+--R                     15            14             13            12            11
+--R             4907232t   + 40893984t   - 115013088t   + 22805712t   + 36330336t
+--R           + 
+--R                       10             9             8             7
+--R             162959040t   - 159859440t  - 156802608t  + 117168768t
+--R           + 
+--R                       6             5             4             3
+--R             126282384t  - 129351600t  + 306646992t  + 475302816t
+--R           + 
+--R                          2
+--R             - 1006837776t  - 237269088t + 480716208
+--R        *
+--R           z
+--R       + 
+--R            54       51        48      46         45        43          42
+--R         48t   - 912t   + 8232t   - 72t   - 46848t   + 1152t   + 186324t
+--R       + 
+--R                40          39        38         37           36         35
+--R         - 3780t   - 543144t   - 3168t   - 21384t   + 1175251t   + 41184t
+--R       + 
+--R                34           33          32           31           30
+--R         278003t   - 1843242t   - 301815t   - 1440726t   + 1912012t
+--R       + 
+--R                 29           28          27           26            25
+--R         1442826t   + 4696262t   - 922481t   - 4816188t   - 10583524t
+--R       + 
+--R                  24            23            22          21            20
+--R         - 208751t   + 11472138t   + 16762859t   - 857663t   - 19328175t
+--R       + 
+--R                    19           18            17            16           15
+--R         - 18270421t   + 4914903t   + 22483044t   + 12926517t   - 8605511t
+--R       + 
+--R                    14           13           12           11          10
+--R         - 17455518t   - 5014597t   + 8108814t   + 8465535t   + 190542t
+--R       + 
+--R                   9           8          7           6          5          4
+--R         - 4305624t  - 2226123t  + 661905t  + 1169775t  + 226260t  - 209952t
+--R       + 
+--R                  3
+--R         - 141183t  + 27216t
+--R       ,
+--R
+--R                 3      2      2      3           6     3            3      2
+--R         (3z + 3t  - 3)y  + (3z  + (6t  - 6)z + 3t  - 6t  + 3)y + (3t  - 3)z
+--R       + 
+--R            6     3          9     6     3
+--R         (3t  - 6t  + 3)z + t  - 3t  + 5t  - 3t
+--R       ,
+--R                   3
+--R      x + y + z + t  - 1}
+--R     ,
+--R              2                       2                     2
+--R    {t,z - 1,y  - 1,x + y}, {t - 1,z,y  - 1,x + y}, {t - 1,z  - 1,z y + 1,x},
+--R
+--R       16     13     10     7      4      2
+--R     {t   - 6t   + 9t   + 4t  + 15t  - 54t  + 27,
+--R
+--R                     29            28             27           26             25
+--R             4907232t   + 40893984t   - 115013088t   - 1730448t   - 168139584t
+--R           + 
+--R                       24             23             22              21
+--R             738024480t   - 195372288t   + 315849456t   - 2567279232t
+--R           + 
+--R                       20              19              18              17
+--R             937147968t   + 1026357696t   + 4780488240t   - 2893767696t
+--R           + 
+--R                          16              15              14              13
+--R             - 5617160352t   - 3427651728t   + 5001100848t   + 8720098416t
+--R           + 
+--R                        12             11               10              9
+--R             2331732960t   - 499046544t   - 16243306272t   - 9748123200t
+--R           + 
+--R                        8               7               6               5
+--R             3927244320t  + 25257280896t  + 10348032096t  - 17128672128t
+--R           + 
+--R                           4             3               2
+--R             - 14755488768t  + 544086720t  + 10848188736t  + 1423614528t
+--R           + 
+--R             - 2884297248
+--R        *
+--R           z
+--R       + 
+--R              68        65         62       60          59        57          56
+--R         - 48t   + 1152t   - 13560t   + 360t   + 103656t   - 7560t   - 572820t
+--R       + 
+--R               54           53        52          51           50         49
+--R         71316t   + 2414556t   + 2736t   - 402876t   - 7985131t   - 49248t
+--R       + 
+--R                 48            47          46           45            44
+--R         1431133t   + 20977409t   + 521487t   - 2697635t   - 43763654t
+--R       + 
+--R                   43           42            41            40            39
+--R         - 3756573t   - 2093410t   + 71546495t   + 19699032t   + 35025028t
+--R       + 
+--R                    38            37             36            35             34
+--R         - 89623786t   - 77798760t   - 138654191t   + 87596128t   + 235642497t
+--R       + 
+--R                   33            32             31             30             29
+--R         349607642t   - 93299834t   - 551563167t   - 630995176t   + 186818962t
+--R       + 
+--R                   28             27             26              25
+--R         995427468t   + 828416204t   - 393919231t   - 1076617485t
+--R       + 
+--R                      24             23              22              21
+--R         - 1609479791t   + 595738126t   + 1198787136t   + 4342832069t
+--R       + 
+--R                      20              19              18              17
+--R         - 2075938757t   - 4390835799t   - 4822843033t   + 6932747678t
+--R       + 
+--R                    16              15              14              13
+--R         6172196808t   + 1141517740t   - 4981677585t   - 9819815280t
+--R       + 
+--R                      12             11               10               9
+--R         - 7404299976t   - 157295760t   + 29124027630t   + 14856038208t
+--R       + 
+--R                       8               7              6               5
+--R         - 16184101410t  - 26935440354t  - 3574164258t  + 10271338974t
+--R       + 
+--R                     4              3              2
+--R         11191425264t  + 6869861262t  - 9780477840t  - 3586674168t + 2884297248
+--R       ,
+--R
+--R            3      3      2      6      3           9     6    3
+--R         (3z  + (6t  - 6)z  + (6t  - 12t  + 3)z + 2t  - 6t  + t  + 3t)y
+--R       + 
+--R            3      3      6      3      2      9      6      3          12     9
+--R         (3t  - 3)z  + (6t  - 12t  + 6)z  + (4t  - 12t  + 11t  - 3)z + t   - 4t
+--R       + 
+--R           6     3
+--R         5t  - 2t
+--R       ,
+--R                   3
+--R      x + y + z + t  - 1}
+--R     ,
+--R            2
+--R    {t - 1,z  - 1,y,x + z},
+--R
+--R       8    7    6     5     4     3      2
+--R     {t  + t  + t  - 2t  - 2t  - 2t  + 19t  + 19t - 8,
+--R
+--R                     7           6           5            4           3
+--R             2395770t  + 3934440t  - 3902067t  - 10084164t  - 1010448t
+--R           + 
+--R                      2
+--R             32386932t  + 22413225t - 10432368
+--R        *
+--R           z
+--R       + 
+--R                  7           6           5           4            3
+--R         - 463519t  + 3586833t  + 9494955t  - 8539305t  - 33283098t
+--R       + 
+--R                  2
+--R         35479377t  + 46263256t - 17419896
+--R       ,
+--R
+--R               4      3      3       6      3      2          3
+--R             3z  + (9t  - 9)z  + (12t  - 24t  + 9)z  + (- 152t  + 219t - 67)z
+--R           + 
+--R                  6      4      3
+--R             - 41t  + 57t  + 25t  - 57t + 16
+--R        *
+--R           y
+--R       + 
+--R            3      4      6      3      3          3              2
+--R         (3t  - 3)z  + (9t  - 18t  + 9)z  + (- 181t  + 270t - 89)z
+--R       + 
+--R               6       4      3                    7      6      4       3
+--R         (- 92t  + 135t  + 49t  - 135t + 43)z + 27t  - 27t  - 54t  + 396t
+--R       + 
+--R         - 486t + 144
+--R       ,
+--R                   3
+--R      x + y + z + t  - 1}
+--R     ,
+--R            3
+--R    {t,z - t  + 1,y - 1,x - 1}, {t - 1,z,y,x}, {t,z - 1,y,x}, {t,z,y - 1,x},
+--R    {t,z,y,x - 1}]
+--R                                   Type: List RegularChain(Integer,[x,y,z,t])
+--E 20
+
+--S 21 of 28
+univariateSolve(lf)$pack
+--R 
+--R
+--R   (21)
+--R   [[complexRoots= ?,coordinates= [x - 1,y - 1,z + 1,t - %A]],
+--R    [complexRoots= ?,coordinates= [x,y - 1,z,t - %A]],
+--R    [complexRoots= ? - 1,coordinates= [x,y,z,t - %A]],
+--R    [complexRoots= ?,coordinates= [x - 1,y,z,t - %A]],
+--R    [complexRoots= ?,coordinates= [x,y,z - 1,t - %A]],
+--R    [complexRoots= ? - 2,coordinates= [x - 1,y + 1,z,t - 1]],
+--R    [complexRoots= ?,coordinates= [x + 1,y - 1,z,t - 1]],
+--R    [complexRoots= ? - 1,coordinates= [x - 1,y + 1,z - 1,t]],
+--R    [complexRoots= ? + 1,coordinates= [x + 1,y - 1,z - 1,t]],
+--R
+--R                     6     3     2
+--R     [complexRoots= ?  - 2?  + 3?  - 3,
+--R                           3                 3
+--R      coordinates= [2x + %A  + %A - 1,2y + %A  + %A - 1,z - %A,t - %A]]
+--R     ,
+--R
+--R                     5     3     2
+--R     [complexRoots= ?  + 3?  - 2?  + 3? - 3,
+--R                                        3
+--R      coordinates= [x - %A,y - %A,z + %A  + 2%A - 1,t - %A]]
+--R     ,
+--R
+--R                     4    3     2
+--R     [complexRoots= ?  - ?  - 2?  + 3,
+--R                          3                3                3
+--R      coordinates= [x + %A  - %A - 1,y + %A  - %A - 1,z - %A  + 2%A + 1,t - %A]]
+--R     ,
+--R    [complexRoots= ? + 1,coordinates= [x - 1,y - 1,z,t - %A]],
+--R
+--R                     6     3     2
+--R     [complexRoots= ?  + 2?  + 3?  - 3,
+--R                           3                        3
+--R      coordinates= [2x - %A  - %A - 1,y + %A,2z - %A  - %A - 1,t + %A]]
+--R     ,
+--R
+--R                     6      4      3      2
+--R     [complexRoots= ?  + 12?  + 20?  - 45?  - 42? - 953,
+--R
+--R       coordinates =
+--R                       5       4       3        2
+--R         [12609x + 23%A  + 49%A  - 46%A  + 362%A  - 5015%A - 8239,
+--R                       5       4       3        2
+--R          25218y + 23%A  + 49%A  - 46%A  + 362%A  + 7594%A - 8239,
+--R                       5       4       3        2
+--R          25218z + 23%A  + 49%A  - 46%A  + 362%A  + 7594%A - 8239,
+--R                       5       4       3        2
+--R          12609t + 23%A  + 49%A  - 46%A  + 362%A  - 5015%A - 8239]
+--R       ]
+--R     ,
+--R
+--R                     5      3      2
+--R     [complexRoots= ?  + 12?  - 16?  + 48? - 96,
+--R                           3
+--R      coordinates= [8x + %A  + 8%A - 8,2y - %A,2z - %A,2t - %A]]
+--R     ,
+--R
+--R                     5    4     3     2
+--R     [complexRoots= ?  + ?  - 5?  - 3?  + 9? + 3,
+--R
+--R       coordinates =
+--R                 3                   3                   3
+--R         [2x - %A  + 2%A - 1, 2y + %A  - 4%A + 1, 2z - %A  + 2%A - 1,
+--R                 3
+--R          2t - %A  + 2%A - 1]
+--R       ]
+--R     ,
+--R
+--R                     4     3     2
+--R     [complexRoots= ?  - 3?  + 4?  - 6? + 13,
+--R
+--R       coordinates =
+--R                  3      2                  3      2
+--R         [9x - 2%A  + 4%A  - %A + 2, 9y + %A  - 2%A  + 5%A - 1,
+--R                 3      2                   3      2
+--R          9z + %A  - 2%A  + 5%A - 1, 9t + %A  - 2%A  - 4%A - 1]
+--R       ]
+--R     ,
+--R
+--R                     4      2
+--R     [complexRoots= ?  - 11?  + 37,
+--R
+--R       coordinates =
+--R                 2            2                  2            2
+--R         [3x - %A  + 7,6y + %A  + 3%A - 7,3z - %A  + 7,6t + %A  - 3%A - 7]
+--R       ]
+--R     ,
+--R    [complexRoots= ? + 1,coordinates= [x - 1,y,z - 1,t + 1]],
+--R    [complexRoots= ? + 2,coordinates= [x,y - 1,z - 1,t + 1]],
+--R    [complexRoots= ? - 2,coordinates= [x,y - 1,z + 1,t - 1]],
+--R    [complexRoots= ?,coordinates= [x,y + 1,z - 1,t - 1]],
+--R    [complexRoots= ? - 2,coordinates= [x - 1,y,z + 1,t - 1]],
+--R    [complexRoots= ?,coordinates= [x + 1,y,z - 1,t - 1]],
+--R
+--R                     4     3      2
+--R     [complexRoots= ?  + 5?  + 16?  + 30? + 57,
+--R
+--R       coordinates =
+--R                     3       2                          3       2
+--R         [151x + 15%A  + 54%A  + 104%A + 93, 151y - 10%A  - 36%A  - 19%A - 62,
+--R                    3       2                        3       2
+--R          151z - 5%A  - 18%A  - 85%A - 31, 151t - 5%A  - 18%A  - 85%A - 31]
+--R       ]
+--R     ,
+--R
+--R                     4    3     2
+--R     [complexRoots= ?  - ?  - 2?  + 3,
+--R                          3                 3                       3
+--R      coordinates= [x - %A  + 2%A + 1,y + %A  - %A - 1,z - %A,t + %A  - %A - 1]]
+--R     ,
+--R
+--R                     4     3     2
+--R     [complexRoots= ?  + 2?  - 8?  + 48,
+--R
+--R       coordinates =
+--R                 3                          3                  3
+--R         [8x - %A  + 4%A - 8,2y + %A,8z + %A  - 8%A + 8,8t - %A  + 4%A - 8]
+--R       ]
+--R     ,
+--R
+--R                     5    4     3     2
+--R     [complexRoots= ?  + ?  - 2?  - 4?  + 5? + 8,
+--R                           3            3            3
+--R      coordinates= [3x + %A  - 1,3y + %A  - 1,3z + %A  - 1,t - %A]]
+--R     ,
+--R                    3
+--R    [complexRoots= ?  + 3? - 1,coordinates= [x - %A,y - %A,z - %A,t - %A]]]
+--RType: List Record(complexRoots: SparseUnivariatePolynomial Integer,coordinates: List Polynomial Integer)
+--E 21
+
+--S 22 of 28
+ts := lts.1
+--R 
+--R
+--R   (22)
+--R     2           3        3
+--R   {t  + t + 1, z  - z - t  + t,
+--R
+--R               3      2      2      3           6     3            3      2
+--R       (3z + 3t  - 3)y  + (3z  + (6t  - 6)z + 3t  - 6t  + 3)y + (3t  - 3)z
+--R     + 
+--R          6     3          9     6     3
+--R       (3t  - 6t  + 3)z + t  - 3t  + 5t  - 3t
+--R     ,
+--R    x + y + z}
+--R                                        Type: RegularChain(Integer,[x,y,z,t])
+--E 22
+
+univariateSolve(ts)$pack
+--S 23 of 28
+--R 
+--R
+--R   (23)
+--R   [
+--R                     4     3      2
+--R     [complexRoots= ?  + 5?  + 16?  + 30? + 57,
+--R
+--R       coordinates =
+--R                     3       2                          3       2
+--R         [151x + 15%A  + 54%A  + 104%A + 93, 151y - 10%A  - 36%A  - 19%A - 62,
+--R                    3       2                        3       2
+--R          151z - 5%A  - 18%A  - 85%A - 31, 151t - 5%A  - 18%A  - 85%A - 31]
+--R       ]
+--R     ,
+--R
+--R                     4    3     2
+--R     [complexRoots= ?  - ?  - 2?  + 3,
+--R                          3                 3                       3
+--R      coordinates= [x - %A  + 2%A + 1,y + %A  - %A - 1,z - %A,t + %A  - %A - 1]]
+--R     ,
+--R
+--R                     4     3     2
+--R     [complexRoots= ?  + 2?  - 8?  + 48,
+--R
+--R       coordinates =
+--R                 3                          3                  3
+--R         [8x - %A  + 4%A - 8,2y + %A,8z + %A  - 8%A + 8,8t - %A  + 4%A - 8]
+--R       ]
+--R     ]
+--RType: List Record(complexRoots: SparseUnivariatePolynomial Integer,coordinates: List Polynomial Integer)
+--E 23
+
+--S 24
+realSolve(ts)$pack
+--R 
+--R
+--R   (24)  []
+--R                                 Type: List List RealClosure Fraction Integer
+--E 24
+
+--S 25 of 28
+lr2 := realSolve(lf)$pack
+--R 
+--R
+--R   (25)
+--R   [[0,- 1,1,1], [0,0,1,0], [1,0,0,0], [0,0,0,1], [0,1,0,0], [1,0,%B37,- %B37],
+--R    [1,0,%B38,- %B38], [0,1,%B35,- %B35], [0,1,%B36,- %B36], [- 1,0,1,1],
+--R
+--R     [%B32,
+--R
+--R          1     15    2     14    1     13    4     12   11     11    4     10
+--R         -- %B32   + -- %B32   + -- %B32   - -- %B32   - -- %B32   - -- %B32
+--R         27          27          27          27          27          27
+--R       + 
+--R          1     9   14     8    1     7   2     6   1     5   2     4       3
+--R         -- %B32  + -- %B32  + -- %B32  + - %B32  + - %B32  + - %B32  + %B32
+--R         27         27         27         9         3         9
+--R       + 
+--R         4     2
+--R         - %B32  - %B32 - 2
+--R         3
+--R       ,
+--R
+--R            1     15    1     14    1     13    2     12   11     11    2     10
+--R         - -- %B32   - -- %B32   - -- %B32   + -- %B32   + -- %B32   + -- %B32
+--R           54          27          54          27          54          27
+--R       + 
+--R            1     9    7     8    1     7   1     6   1     5   1     4       3
+--R         - -- %B32  - -- %B32  - -- %B32  - - %B32  - - %B32  - - %B32  - %B32
+--R           54         27         54         9         6         9
+--R       + 
+--R           2     2   1        3
+--R         - - %B32  + - %B32 + -
+--R           3         2        2
+--R       ,
+--R
+--R            1     15    1     14    1     13    2     12   11     11    2     10
+--R         - -- %B32   - -- %B32   - -- %B32   + -- %B32   + -- %B32   + -- %B32
+--R           54          27          54          27          54          27
+--R       + 
+--R            1     9    7     8    1     7   1     6   1     5   1     4       3
+--R         - -- %B32  - -- %B32  - -- %B32  - - %B32  - - %B32  - - %B32  - %B32
+--R           54         27         54         9         6         9
+--R       + 
+--R           2     2   1        3
+--R         - - %B32  + - %B32 + -
+--R           3         2        2
+--R       ]
+--R     ,
+--R
+--R     [%B33,
+--R
+--R          1     15    2     14    1     13    4     12   11     11    4     10
+--R         -- %B33   + -- %B33   + -- %B33   - -- %B33   - -- %B33   - -- %B33
+--R         27          27          27          27          27          27
+--R       + 
+--R          1     9   14     8    1     7   2     6   1     5   2     4       3
+--R         -- %B33  + -- %B33  + -- %B33  + - %B33  + - %B33  + - %B33  + %B33
+--R         27         27         27         9         3         9
+--R       + 
+--R         4     2
+--R         - %B33  - %B33 - 2
+--R         3
+--R       ,
+--R
+--R            1     15    1     14    1     13    2     12   11     11    2     10
+--R         - -- %B33   - -- %B33   - -- %B33   + -- %B33   + -- %B33   + -- %B33
+--R           54          27          54          27          54          27
+--R       + 
+--R            1     9    7     8    1     7   1     6   1     5   1     4       3
+--R         - -- %B33  - -- %B33  - -- %B33  - - %B33  - - %B33  - - %B33  - %B33
+--R           54         27         54         9         6         9
+--R       + 
+--R           2     2   1        3
+--R         - - %B33  + - %B33 + -
+--R           3         2        2
+--R       ,
+--R
+--R            1     15    1     14    1     13    2     12   11     11    2     10
+--R         - -- %B33   - -- %B33   - -- %B33   + -- %B33   + -- %B33   + -- %B33
+--R           54          27          54          27          54          27
+--R       + 
+--R            1     9    7     8    1     7   1     6   1     5   1     4       3
+--R         - -- %B33  - -- %B33  - -- %B33  - - %B33  - - %B33  - - %B33  - %B33
+--R           54         27         54         9         6         9
+--R       + 
+--R           2     2   1        3
+--R         - - %B33  + - %B33 + -
+--R           3         2        2
+--R       ]
+--R     ,
+--R
+--R     [%B34,
+--R
+--R          1     15    2     14    1     13    4     12   11     11    4     10
+--R         -- %B34   + -- %B34   + -- %B34   - -- %B34   - -- %B34   - -- %B34
+--R         27          27          27          27          27          27
+--R       + 
+--R          1     9   14     8    1     7   2     6   1     5   2     4       3
+--R         -- %B34  + -- %B34  + -- %B34  + - %B34  + - %B34  + - %B34  + %B34
+--R         27         27         27         9         3         9
+--R       + 
+--R         4     2
+--R         - %B34  - %B34 - 2
+--R         3
+--R       ,
+--R
+--R            1     15    1     14    1     13    2     12   11     11    2     10
+--R         - -- %B34   - -- %B34   - -- %B34   + -- %B34   + -- %B34   + -- %B34
+--R           54          27          54          27          54          27
+--R       + 
+--R            1     9    7     8    1     7   1     6   1     5   1     4       3
+--R         - -- %B34  - -- %B34  - -- %B34  - - %B34  - - %B34  - - %B34  - %B34
+--R           54         27         54         9         6         9
+--R       + 
+--R           2     2   1        3
+--R         - - %B34  + - %B34 + -
+--R           3         2        2
+--R       ,
+--R
+--R            1     15    1     14    1     13    2     12   11     11    2     10
+--R         - -- %B34   - -- %B34   - -- %B34   + -- %B34   + -- %B34   + -- %B34
+--R           54          27          54          27          54          27
+--R       + 
+--R            1     9    7     8    1     7   1     6   1     5   1     4       3
+--R         - -- %B34  - -- %B34  - -- %B34  - - %B34  - - %B34  - - %B34  - %B34
+--R           54         27         54         9         6         9
+--R       + 
+--R           2     2   1        3
+--R         - - %B34  + - %B34 + -
+--R           3         2        2
+--R       ]
+--R     ,
+--R    [- 1,1,0,1], [- 1,1,1,0],
+--R
+--R     [%B23,
+--R
+--R            1     15    1     14    1     13    2     12   11     11    2     10
+--R         - -- %B23   - -- %B23   - -- %B23   + -- %B23   + -- %B23   + -- %B23
+--R           54          27          54          27          54          27
+--R       + 
+--R            1     9    7     8    1     7   1     6   1     5   1     4       3
+--R         - -- %B23  - -- %B23  - -- %B23  - - %B23  - - %B23  - - %B23  - %B23
+--R           54         27         54         9         6         9
+--R       + 
+--R           2     2   1        3
+--R         - - %B23  + - %B23 + -
+--R           3         2        2
+--R       ,
+--R      %B30,
+--R
+--R                   1     15    1     14    1     13    2     12   11     11
+--R         - %B30 + -- %B23   + -- %B23   + -- %B23   - -- %B23   - -- %B23
+--R                  54          27          54          27          54
+--R       + 
+--R            2     10    1     9    7     8    1     7   1     6   1     5
+--R         - -- %B23   + -- %B23  + -- %B23  + -- %B23  + - %B23  + - %B23
+--R           27          54         27         54         9         6
+--R       + 
+--R         1     4   2     2   1        1
+--R         - %B23  + - %B23  - - %B23 - -
+--R         9         3         2        2
+--R       ]
+--R     ,
+--R
+--R     [%B23,
+--R
+--R            1     15    1     14    1     13    2     12   11     11    2     10
+--R         - -- %B23   - -- %B23   - -- %B23   + -- %B23   + -- %B23   + -- %B23
+--R           54          27          54          27          54          27
+--R       + 
+--R            1     9    7     8    1     7   1     6   1     5   1     4       3
+--R         - -- %B23  - -- %B23  - -- %B23  - - %B23  - - %B23  - - %B23  - %B23
+--R           54         27         54         9         6         9
+--R       + 
+--R           2     2   1        3
+--R         - - %B23  + - %B23 + -
+--R           3         2        2
+--R       ,
+--R      %B31,
+--R
+--R                   1     15    1     14    1     13    2     12   11     11
+--R         - %B31 + -- %B23   + -- %B23   + -- %B23   - -- %B23   - -- %B23
+--R                  54          27          54          27          54
+--R       + 
+--R            2     10    1     9    7     8    1     7   1     6   1     5
+--R         - -- %B23   + -- %B23  + -- %B23  + -- %B23  + - %B23  + - %B23
+--R           27          54         27         54         9         6
+--R       + 
+--R         1     4   2     2   1        1
+--R         - %B23  + - %B23  - - %B23 - -
+--R         9         3         2        2
+--R       ]
+--R     ,
+--R
+--R     [%B24,
+--R
+--R            1     15    1     14    1     13    2     12   11     11    2     10
+--R         - -- %B24   - -- %B24   - -- %B24   + -- %B24   + -- %B24   + -- %B24
+--R           54          27          54          27          54          27
+--R       + 
+--R            1     9    7     8    1     7   1     6   1     5   1     4       3
+--R         - -- %B24  - -- %B24  - -- %B24  - - %B24  - - %B24  - - %B24  - %B24
+--R           54         27         54         9         6         9
+--R       + 
+--R           2     2   1        3
+--R         - - %B24  + - %B24 + -
+--R           3         2        2
+--R       ,
+--R      %B28,
+--R
+--R                   1     15    1     14    1     13    2     12   11     11
+--R         - %B28 + -- %B24   + -- %B24   + -- %B24   - -- %B24   - -- %B24
+--R                  54          27          54          27          54
+--R       + 
+--R            2     10    1     9    7     8    1     7   1     6   1     5
+--R         - -- %B24   + -- %B24  + -- %B24  + -- %B24  + - %B24  + - %B24
+--R           27          54         27         54         9         6
+--R       + 
+--R         1     4   2     2   1        1
+--R         - %B24  + - %B24  - - %B24 - -
+--R         9         3         2        2
+--R       ]
+--R     ,
+--R
+--R     [%B24,
+--R
+--R            1     15    1     14    1     13    2     12   11     11    2     10
+--R         - -- %B24   - -- %B24   - -- %B24   + -- %B24   + -- %B24   + -- %B24
+--R           54          27          54          27          54          27
+--R       + 
+--R            1     9    7     8    1     7   1     6   1     5   1     4       3
+--R         - -- %B24  - -- %B24  - -- %B24  - - %B24  - - %B24  - - %B24  - %B24
+--R           54         27         54         9         6         9
+--R       + 
+--R           2     2   1        3
+--R         - - %B24  + - %B24 + -
+--R           3         2        2
+--R       ,
+--R      %B29,
+--R
+--R                   1     15    1     14    1     13    2     12   11     11
+--R         - %B29 + -- %B24   + -- %B24   + -- %B24   - -- %B24   - -- %B24
+--R                  54          27          54          27          54
+--R       + 
+--R            2     10    1     9    7     8    1     7   1     6   1     5
+--R         - -- %B24   + -- %B24  + -- %B24  + -- %B24  + - %B24  + - %B24
+--R           27          54         27         54         9         6
+--R       + 
+--R         1     4   2     2   1        1
+--R         - %B24  + - %B24  - - %B24 - -
+--R         9         3         2        2
+--R       ]
+--R     ,
+--R
+--R     [%B25,
+--R
+--R            1     15    1     14    1     13    2     12   11     11    2     10
+--R         - -- %B25   - -- %B25   - -- %B25   + -- %B25   + -- %B25   + -- %B25
+--R           54          27          54          27          54          27
+--R       + 
+--R            1     9    7     8    1     7   1     6   1     5   1     4       3
+--R         - -- %B25  - -- %B25  - -- %B25  - - %B25  - - %B25  - - %B25  - %B25
+--R           54         27         54         9         6         9
+--R       + 
+--R           2     2   1        3
+--R         - - %B25  + - %B25 + -
+--R           3         2        2
+--R       ,
+--R      %B26,
+--R
+--R                   1     15    1     14    1     13    2     12   11     11
+--R         - %B26 + -- %B25   + -- %B25   + -- %B25   - -- %B25   - -- %B25
+--R                  54          27          54          27          54
+--R       + 
+--R            2     10    1     9    7     8    1     7   1     6   1     5
+--R         - -- %B25   + -- %B25  + -- %B25  + -- %B25  + - %B25  + - %B25
+--R           27          54         27         54         9         6
+--R       + 
+--R         1     4   2     2   1        1
+--R         - %B25  + - %B25  - - %B25 - -
+--R         9         3         2        2
+--R       ]
+--R     ,
+--R
+--R     [%B25,
+--R
+--R            1     15    1     14    1     13    2     12   11     11    2     10
+--R         - -- %B25   - -- %B25   - -- %B25   + -- %B25   + -- %B25   + -- %B25
+--R           54          27          54          27          54          27
+--R       + 
+--R            1     9    7     8    1     7   1     6   1     5   1     4       3
+--R         - -- %B25  - -- %B25  - -- %B25  - - %B25  - - %B25  - - %B25  - %B25
+--R           54         27         54         9         6         9
+--R       + 
+--R           2     2   1        3
+--R         - - %B25  + - %B25 + -
+--R           3         2        2
+--R       ,
+--R      %B27,
+--R
+--R                   1     15    1     14    1     13    2     12   11     11
+--R         - %B27 + -- %B25   + -- %B25   + -- %B25   - -- %B25   - -- %B25
+--R                  54          27          54          27          54
+--R       + 
+--R            2     10    1     9    7     8    1     7   1     6   1     5
+--R         - -- %B25   + -- %B25  + -- %B25  + -- %B25  + - %B25  + - %B25
+--R           27          54         27         54         9         6
+--R       + 
+--R         1     4   2     2   1        1
+--R         - %B25  + - %B25  - - %B25 - -
+--R         9         3         2        2
+--R       ]
+--R     ,
+--R    [1,%B21,- %B21,0], [1,%B22,- %B22,0], [1,%B19,0,- %B19], [1,%B20,0,- %B20],
+--R            1     3   1   1     3   1   1     3   1
+--R    [%B17,- - %B17  + -,- - %B17  + -,- - %B17  + -],
+--R            3         3   3         3   3         3
+--R            1     3   1   1     3   1   1     3   1
+--R    [%B18,- - %B18  + -,- - %B18  + -,- - %B18  + -]]
+--R            3         3   3         3   3         3
+--R                                 Type: List List RealClosure Fraction Integer
+--E 25
+
+--S 26 of 28
+#lr2
+--R 
+--R
+--R   (26)  27
+--R                                                        Type: PositiveInteger
+--E 26
+
+--S 27 of 28
+lpr2 := positiveSolve(lf)$pack
+--R 
+--R
+--R                  1     3   1   1     3   1   1     3   1
+--R   (27)  [[%B40,- - %B40  + -,- - %B40  + -,- - %B40  + -]]
+--R                  3         3   3         3   3         3
+--R                                 Type: List List RealClosure Fraction Integer
+--E 27
+
+--S 28 of 28
+[approximate(r,1/10**21)::Float for r in lpr2.1]
+--R 
+--R
+--R   (28)
+--R   [0.3221853546 2608559291, 0.3221853546 2608559291, 0.3221853546 2608559291,
+--R    0.3221853546 2608559291]
+--R                                                             Type: List Float
+--E 28
+)spool
+)lisp (bye)
+@
+<<ZeroDimensionalSolvePackage.help>>=
+====================================================================
+ZeroDimensionalSolvePackage examples
+====================================================================
+
+The ZeroDimensionalSolvePackage package constructor provides
+operations for computing symbolically the complex or real roots of
+zero-dimensional algebraic systems.
+
+The package provides 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
+univariateSolve operation (by calling the
+InternalRationalUnivariateRepresentationPackage package constructor
+which does the job).
+
+Real roots are given by means of tuples of coordinates lying in the
+RealClosure of the coefficient ring.  They are computed by the
+realSolve and positiveSolve 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 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 zeroSetSplit operation from the REGSET
+domain constructor.  In that case, no Groebner bases are computed.
+This strategy is used by default.  Secondly, by applying the zeroSetSplit 
+from LEXTRIPK.  To use this later strategy with the operations 
+univariateSolve, realSolve and positiveSolve one just needs to use an 
+extra boolean argument.
+
+Note that the way of understanding triangular decompositions is
+detailed in the example of the RegularTriangularSet constructor.
+
+The ZeroDimensionalSolvePackage constructor takes three arguments.The 
+first one R is the coefficient ring; it must belong to the categories 
+OrderedRing, EuclideanDomain, CharacteristicZero and RealConstant. This 
+means essentially that R is Integer or Fraction(Integer).  The second 
+argument ls is the list of variables involved in the systems to solve.  
+The third one MUST BE concat(ls,s) where s is an additional symbol used 
+for the univariate representations. The abbreviation for 
+ZeroDimensionalSolvePackage is ZDSOLVE.
+
+We illustrate now how to use the constructor ZDSOLVE by two examples:
+the Arnborg and Lazard system and the L-3 system (Aubry and Moreno
+Maza).  Note that the use of this package is also demonstrated in the
+example of the LexTriangularPackage constructor.
+
+Define the coefficient ring.
+
+  R := Integer
+    Integer
+                        Type: Domain
+
+Define the lists of variables:
+
+  ls : List Symbol := [x,y,z,t]
+    [x,y,z,t]
+                        Type: List Symbol
+
+and:
+
+  ls2 : List Symbol := [x,y,z,t,new()$Symbol]
+    [x,y,z,t,%A]
+                        Type: List Symbol
+
+Call the package:
+
+  pack := ZDSOLVE(R,ls,ls2)
+    ZeroDimensionalSolvePackage(Integer,[x,y,z,t],[x,y,z,t,%A])
+                        Type: Domain
+
+Define a polynomial system (Arnborg-Lazard)
+
+  p1 := x**2*y*z + x*y**2*z + x*y*z**2 + x*y*z + x*y + x*z + y*z
+         2       2     2
+    x y z  + (x y  + (x  + x + 1)y + x)z + x y
+                        Type: Polynomial Integer
+
+  p2 := x**2*y**2*z + x*y**2*z**2 + x**2*y*z + x*y*z + y*z + x + z
+       2 2     2 2     2
+    x y z  + (x y  + (x  + x + 1)y + 1)z + x
+                        Type: Polynomial Integer
+
+  p3 := x**2*y**2*z**2 + x**2*y**2*z + x*y**2*z + x*y*z + x*z + z + 1
+     2 2 2      2      2
+    x y z  + ((x  + x)y  + x y + x + 1)z + 1
+                        Type: Polynomial Integer
+
+  lp := [p1, p2, p3]
+         2       2     2
+   [x y z  + (x y  + (x  + x + 1)y + x)z + x y,
+       2 2     2 2     2
+    x y z  + (x y  + (x  + x + 1)y + 1)z + x,
+     2 2 2      2      2
+    x y z  + ((x  + x)y  + x y + x + 1)z + 1]
+                        Type: List Polynomial Integer
+
+Note that these polynomials do not involve the variable t; we will use
+it in the second example.
+
+First compute a decomposition into regular chains (i.e. regular 
+triangular sets).
+
+  triangSolve(lp)$pack
+   [
+    {
+         20     19      18      17       16      15       14       13       12
+        z   - 6z   - 41z   + 71z   + 106z   + 92z   + 197z   + 145z   + 257z
+      + 
+            11       10       9       8       7       6      5       4      3
+        278z   + 201z   + 278z  + 257z  + 145z  + 197z  + 92z  + 106z  + 71z
+      + 
+             2
+        - 41z  - 6z + 1
+      ,
+                      19            18             17             16
+            14745844z   + 50357474z   - 130948857z   - 185261586z
+          + 
+                        15             14             13             12
+            - 180077775z   - 338007307z   - 275379623z   - 453190404z
+          + 
+                        11             10             9             8
+            - 474597456z   - 366147695z   - 481433567z  - 430613166z
+          + 
+                        7             6             5             4
+            - 261878358z  - 326073537z  - 163008796z  - 177213227z
+          + 
+                        3            2
+            - 104356755z  + 65241699z  + 9237732z - 1567348
+       *
+          y
+      + 
+                19           18            17            16            15
+        1917314z   + 6508991z   - 16973165z   - 24000259z   - 23349192z
+      + 
+                   14            13            12            11            10
+        - 43786426z   - 35696474z   - 58724172z   - 61480792z   - 47452440z
+      + 
+                   9            8            7            6            5
+        - 62378085z  - 55776527z  - 33940618z  - 42233406z  - 21122875z
+      + 
+                   4            3           2
+        - 22958177z  - 13504569z  + 8448317z  + 1195888z - 202934
+      ,
+        3       2       3    2               2              2
+     ((z  - 2z)y  + (- z  - z  - 2z - 1)y - z  - z + 1)x + z  - 1}
+    ]
+                     Type: List RegularChain(Integer,[x,y,z,t])
+
+We can see easily from this decomposition (consisting of a single
+regular chain) that the input system has 20 complex roots.
+
+Then we compute a univariate representation of this regular chain.
+
+  univariateSolve(lp)$pack
+   [
+    [
+      complexRoots =
+           12      11      10     9     8      7      6      5     4     3
+          ?   - 12?   + 24?   + 4?  - 9?  + 27?  - 21?  + 27?  - 9?  + 4?
+        + 
+             2
+          24?  - 12? + 1
+      ,
+       coordinates =
+        [
+                      11        10         9        8        7         6
+            63x + 62%A   - 721%A   + 1220%A  + 705%A  - 285%A  + 1512%A
+          + 
+                   5         4       3        2
+            - 735%A  + 1401%A  - 21%A  + 215%A  + 1577%A - 142
+          ,
+                       11        10         9        8        7         6
+            63y - 75%A   + 890%A   - 1682%A  - 516%A  + 588%A  - 1953%A
+          + 
+                  5         4        3        2
+            1323%A  - 1815%A  + 426%A  - 243%A  - 1801%A + 679
+          ,
+         z - %A]
+      ]
+    ,
+                     6    5    4    3    2
+    [complexRoots= ?  + ?  + ?  + ?  + ?  + ? + 1,
+                         5       3
+     coordinates= [x - %A ,y - %A ,z - %A]]
+    ,
+                   2
+   [complexRoots= ?  + 5? + 1,coordinates= [x - 1,y - 1,z - %A]]]
+           Type: List Record(complexRoots: SparseUnivariatePolynomial Integer,
+                             coordinates: List Polynomial Integer)
+
+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 p(?) which defines a simple
+algebraic extension of the field of fractions of R.  The second one
+consists of multivariate polynomials pol1(x,%A), pol2(y,%A) and
+pol3(z,%A).  Each of these polynomials involve two variables: one is
+an indeterminate x, y or z of the input system lp and the other is %A
+which represents any root of p(?).  Recall that this %A is the last
+element of the third parameter of ZDSOLVE.  Thus any complex root ? of
+p(?) leads to a solution of the input system lp by replacing %A by
+this ? in pol1(x,%A), pol2(y,%A) and pol3(z,%A).  Note that the
+polynomials pol1(x,%A), pol2(y,%A) and pol3(z,%A) have degree one
+w.r.t. x, y or z respectively.  This is always the case for all
+univariate representations.  Hence the operation univariateSolve
+replaces a system of multivariate polynomials by a list of univariate
+polynomials, what justifies its name.  Another example of univariate
+representations illustrates the LexTriangularPackage package constructor.
+
+We now compute the solutions with real coordinates:
+
+  lr := realSolve(lp)$pack
+   [
+    [%B1,
+        1184459    19   2335702    18   5460230    17   79900378    16
+        ------- %B1   - ------- %B1   - ------- %B1   + -------- %B1
+        1645371          548457          182819          1645371
+      + 
+        43953929    15   13420192    14   553986    13   193381378    12
+        -------- %B1   + -------- %B1   + ------ %B1   + --------- %B1
+         548457           182819           3731           1645371
+      + 
+        35978916    11   358660781    10   271667666    9   118784873    8
+        -------- %B1   + --------- %B1   + --------- %B1  + --------- %B1
+         182819           1645371           1645371           548457
+      + 
+        337505020    7   1389370    6   688291    5   3378002    4
+        --------- %B1  + ------- %B1  + ------ %B1  + ------- %B1
+         1645371          11193          4459          42189
+      + 
+        140671876    3   32325724    2   8270       9741532
+        --------- %B1  + -------- %B1  - ---- %B1 - -------
+         1645371          548457          343       1645371
+      ,
+           91729    19   487915    18   4114333    17   1276987    16
+        - ------ %B1   + ------ %B1   + ------- %B1   - ------- %B1
+          705159         705159          705159          235053
+      + 
+          13243117    15   16292173    14   26536060    13   722714    12
+        - -------- %B1   - -------- %B1   - -------- %B1   - ------ %B1
+           705159           705159           705159           18081
+      + 
+          5382578    11   15449995    10   14279770    9   6603890    8
+        - ------- %B1   - -------- %B1   - -------- %B1  - ------- %B1
+           100737          235053           235053          100737
+      + 
+          409930    7   37340389    6   34893715    5   26686318    4
+        - ------ %B1  - -------- %B1  - -------- %B1  - -------- %B1
+           6027          705159          705159          705159
+      + 
+          801511    3   17206178    2   4406102       377534
+        - ------ %B1  - -------- %B1  - ------- %B1 + ------
+           26117         705159          705159       705159
+      ]
+    ,
+     [%B2,
+        1184459    19   2335702    18   5460230    17   79900378    16
+        ------- %B2   - ------- %B2   - ------- %B2   + -------- %B2
+        1645371          548457          182819          1645371
+      + 
+        43953929    15   13420192    14   553986    13   193381378    12
+        -------- %B2   + -------- %B2   + ------ %B2   + --------- %B2
+         548457           182819           3731           1645371
+      + 
+        35978916    11   358660781    10   271667666    9   118784873    8
+        -------- %B2   + --------- %B2   + --------- %B2  + --------- %B2
+         182819           1645371           1645371           548457
+      + 
+        337505020    7   1389370    6   688291    5   3378002    4
+        --------- %B2  + ------- %B2  + ------ %B2  + ------- %B2
+         1645371          11193          4459          42189
+      + 
+        140671876    3   32325724    2   8270       9741532
+        --------- %B2  + -------- %B2  - ---- %B2 - -------
+         1645371          548457          343       1645371
+      ,
+           91729    19   487915    18   4114333    17   1276987    16
+        - ------ %B2   + ------ %B2   + ------- %B2   - ------- %B2
+          705159         705159          705159          235053
+      + 
+          13243117    15   16292173    14   26536060    13   722714    12
+        - -------- %B2   - -------- %B2   - -------- %B2   - ------ %B2
+           705159           705159           705159           18081
+      + 
+          5382578    11   15449995    10   14279770    9   6603890    8
+        - ------- %B2   - -------- %B2   - -------- %B2  - ------- %B2
+           100737          235053           235053          100737
+      + 
+          409930    7   37340389    6   34893715    5   26686318    4
+        - ------ %B2  - -------- %B2  - -------- %B2  - -------- %B2
+           6027          705159          705159          705159
+      + 
+          801511    3   17206178    2   4406102       377534
+        - ------ %B2  - -------- %B2  - ------- %B2 + ------
+           26117         705159          705159       705159
+      ]
+    ,
+     [%B3,
+        1184459    19   2335702    18   5460230    17   79900378    16
+        ------- %B3   - ------- %B3   - ------- %B3   + -------- %B3
+        1645371          548457          182819          1645371
+      + 
+        43953929    15   13420192    14   553986    13   193381378    12
+        -------- %B3   + -------- %B3   + ------ %B3   + --------- %B3
+         548457           182819           3731           1645371
+      + 
+        35978916    11   358660781    10   271667666    9   118784873    8
+        -------- %B3   + --------- %B3   + --------- %B3  + --------- %B3
+         182819           1645371           1645371           548457
+      + 
+        337505020    7   1389370    6   688291    5   3378002    4
+        --------- %B3  + ------- %B3  + ------ %B3  + ------- %B3
+         1645371          11193          4459          42189
+      + 
+        140671876    3   32325724    2   8270       9741532
+        --------- %B3  + -------- %B3  - ---- %B3 - -------
+         1645371          548457          343       1645371
+      ,
+           91729    19   487915    18   4114333    17   1276987    16
+        - ------ %B3   + ------ %B3   + ------- %B3   - ------- %B3
+          705159         705159          705159          235053
+      + 
+          13243117    15   16292173    14   26536060    13   722714    12
+        - -------- %B3   - -------- %B3   - -------- %B3   - ------ %B3
+           705159           705159           705159           18081
+      + 
+          5382578    11   15449995    10   14279770    9   6603890    8
+        - ------- %B3   - -------- %B3   - -------- %B3  - ------- %B3
+           100737          235053           235053          100737
+      + 
+          409930    7   37340389    6   34893715    5   26686318    4
+        - ------ %B3  - -------- %B3  - -------- %B3  - -------- %B3
+           6027          705159          705159          705159
+      + 
+          801511    3   17206178    2   4406102       377534
+        - ------ %B3  - -------- %B3  - ------- %B3 + ------
+           26117         705159          705159       705159
+      ]
+    ,
+     [%B4,
+        1184459    19   2335702    18   5460230    17   79900378    16
+        ------- %B4   - ------- %B4   - ------- %B4   + -------- %B4
+        1645371          548457          182819          1645371
+      + 
+        43953929    15   13420192    14   553986    13   193381378    12
+        -------- %B4   + -------- %B4   + ------ %B4   + --------- %B4
+         548457           182819           3731           1645371
+      + 
+        35978916    11   358660781    10   271667666    9   118784873    8
+        -------- %B4   + --------- %B4   + --------- %B4  + --------- %B4
+         182819           1645371           1645371           548457
+      + 
+        337505020    7   1389370    6   688291    5   3378002    4
+        --------- %B4  + ------- %B4  + ------ %B4  + ------- %B4
+         1645371          11193          4459          42189
+      + 
+        140671876    3   32325724    2   8270       9741532
+        --------- %B4  + -------- %B4  - ---- %B4 - -------
+         1645371          548457          343       1645371
+      ,
+           91729    19   487915    18   4114333    17   1276987    16
+        - ------ %B4   + ------ %B4   + ------- %B4   - ------- %B4
+          705159         705159          705159          235053
+      + 
+          13243117    15   16292173    14   26536060    13   722714    12
+        - -------- %B4   - -------- %B4   - -------- %B4   - ------ %B4
+           705159           705159           705159           18081
+      + 
+          5382578    11   15449995    10   14279770    9   6603890    8
+        - ------- %B4   - -------- %B4   - -------- %B4  - ------- %B4
+           100737          235053           235053          100737
+      + 
+          409930    7   37340389    6   34893715    5   26686318    4
+        - ------ %B4  - -------- %B4  - -------- %B4  - -------- %B4
+           6027          705159          705159          705159
+      + 
+          801511    3   17206178    2   4406102       377534
+        - ------ %B4  - -------- %B4  - ------- %B4 + ------
+           26117         705159          705159       705159
+      ]
+    ,
+     [%B5,
+        1184459    19   2335702    18   5460230    17   79900378    16
+        ------- %B5   - ------- %B5   - ------- %B5   + -------- %B5
+        1645371          548457          182819          1645371
+      + 
+        43953929    15   13420192    14   553986    13   193381378    12
+        -------- %B5   + -------- %B5   + ------ %B5   + --------- %B5
+         548457           182819           3731           1645371
+      + 
+        35978916    11   358660781    10   271667666    9   118784873    8
+        -------- %B5   + --------- %B5   + --------- %B5  + --------- %B5
+         182819           1645371           1645371           548457
+      + 
+        337505020    7   1389370    6   688291    5   3378002    4
+        --------- %B5  + ------- %B5  + ------ %B5  + ------- %B5
+         1645371          11193          4459          42189
+      + 
+        140671876    3   32325724    2   8270       9741532
+        --------- %B5  + -------- %B5  - ---- %B5 - -------
+         1645371          548457          343       1645371
+      ,
+           91729    19   487915    18   4114333    17   1276987    16
+        - ------ %B5   + ------ %B5   + ------- %B5   - ------- %B5
+          705159         705159          705159          235053
+      + 
+          13243117    15   16292173    14   26536060    13   722714    12
+        - -------- %B5   - -------- %B5   - -------- %B5   - ------ %B5
+           705159           705159           705159           18081
+      + 
+          5382578    11   15449995    10   14279770    9   6603890    8
+        - ------- %B5   - -------- %B5   - -------- %B5  - ------- %B5
+           100737          235053           235053          100737
+      + 
+          409930    7   37340389    6   34893715    5   26686318    4
+        - ------ %B5  - -------- %B5  - -------- %B5  - -------- %B5
+           6027          705159          705159          705159
+      + 
+          801511    3   17206178    2   4406102       377534
+        - ------ %B5  - -------- %B5  - ------- %B5 + ------
+           26117         705159          705159       705159
+      ]
+    ,
+     [%B6,
+        1184459    19   2335702    18   5460230    17   79900378    16
+        ------- %B6   - ------- %B6   - ------- %B6   + -------- %B6
+        1645371          548457          182819          1645371
+      + 
+        43953929    15   13420192    14   553986    13   193381378    12
+        -------- %B6   + -------- %B6   + ------ %B6   + --------- %B6
+         548457           182819           3731           1645371
+      + 
+        35978916    11   358660781    10   271667666    9   118784873    8
+        -------- %B6   + --------- %B6   + --------- %B6  + --------- %B6
+         182819           1645371           1645371           548457
+      + 
+        337505020    7   1389370    6   688291    5   3378002    4
+        --------- %B6  + ------- %B6  + ------ %B6  + ------- %B6
+         1645371          11193          4459          42189
+      + 
+        140671876    3   32325724    2   8270       9741532
+        --------- %B6  + -------- %B6  - ---- %B6 - -------
+         1645371          548457          343       1645371
+      ,
+           91729    19   487915    18   4114333    17   1276987    16
+        - ------ %B6   + ------ %B6   + ------- %B6   - ------- %B6
+          705159         705159          705159          235053
+      + 
+          13243117    15   16292173    14   26536060    13   722714    12
+        - -------- %B6   - -------- %B6   - -------- %B6   - ------ %B6
+           705159           705159           705159           18081
+      + 
+          5382578    11   15449995    10   14279770    9   6603890    8
+        - ------- %B6   - -------- %B6   - -------- %B6  - ------- %B6
+           100737          235053           235053          100737
+      + 
+          409930    7   37340389    6   34893715    5   26686318    4
+        - ------ %B6  - -------- %B6  - -------- %B6  - -------- %B6
+           6027          705159          705159          705159
+      + 
+          801511    3   17206178    2   4406102       377534
+        - ------ %B6  - -------- %B6  - ------- %B6 + ------
+           26117         705159          705159       705159
+      ]
+    ,
+     [%B7,
+        1184459    19   2335702    18   5460230    17   79900378    16
+        ------- %B7   - ------- %B7   - ------- %B7   + -------- %B7
+        1645371          548457          182819          1645371
+      + 
+        43953929    15   13420192    14   553986    13   193381378    12
+        -------- %B7   + -------- %B7   + ------ %B7   + --------- %B7
+         548457           182819           3731           1645371
+      + 
+        35978916    11   358660781    10   271667666    9   118784873    8
+        -------- %B7   + --------- %B7   + --------- %B7  + --------- %B7
+         182819           1645371           1645371           548457
+      + 
+        337505020    7   1389370    6   688291    5   3378002    4
+        --------- %B7  + ------- %B7  + ------ %B7  + ------- %B7
+         1645371          11193          4459          42189
+      + 
+        140671876    3   32325724    2   8270       9741532
+        --------- %B7  + -------- %B7  - ---- %B7 - -------
+         1645371          548457          343       1645371
+      ,
+           91729    19   487915    18   4114333    17   1276987    16
+        - ------ %B7   + ------ %B7   + ------- %B7   - ------- %B7
+          705159         705159          705159          235053
+      + 
+          13243117    15   16292173    14   26536060    13   722714    12
+        - -------- %B7   - -------- %B7   - -------- %B7   - ------ %B7
+           705159           705159           705159           18081
+      + 
+          5382578    11   15449995    10   14279770    9   6603890    8
+        - ------- %B7   - -------- %B7   - -------- %B7  - ------- %B7
+           100737          235053           235053          100737
+      + 
+          409930    7   37340389    6   34893715    5   26686318    4
+        - ------ %B7  - -------- %B7  - -------- %B7  - -------- %B7
+           6027          705159          705159          705159
+      + 
+          801511    3   17206178    2   4406102       377534
+        - ------ %B7  - -------- %B7  - ------- %B7 + ------
+           26117         705159          705159       705159
+      ]
+    ,
+     [%B8,
+        1184459    19   2335702    18   5460230    17   79900378    16
+        ------- %B8   - ------- %B8   - ------- %B8   + -------- %B8
+        1645371          548457          182819          1645371
+      + 
+        43953929    15   13420192    14   553986    13   193381378    12
+        -------- %B8   + -------- %B8   + ------ %B8   + --------- %B8
+         548457           182819           3731           1645371
+      + 
+        35978916    11   358660781    10   271667666    9   118784873    8
+        -------- %B8   + --------- %B8   + --------- %B8  + --------- %B8
+         182819           1645371           1645371           548457
+      + 
+        337505020    7   1389370    6   688291    5   3378002    4
+        --------- %B8  + ------- %B8  + ------ %B8  + ------- %B8
+         1645371          11193          4459          42189
+      + 
+        140671876    3   32325724    2   8270       9741532
+        --------- %B8  + -------- %B8  - ---- %B8 - -------
+         1645371          548457          343       1645371
+      ,
+           91729    19   487915    18   4114333    17   1276987    16
+        - ------ %B8   + ------ %B8   + ------- %B8   - ------- %B8
+          705159         705159          705159          235053
+      + 
+          13243117    15   16292173    14   26536060    13   722714    12
+        - -------- %B8   - -------- %B8   - -------- %B8   - ------ %B8
+           705159           705159           705159           18081
+      + 
+          5382578    11   15449995    10   14279770    9   6603890    8
+        - ------- %B8   - -------- %B8   - -------- %B8  - ------- %B8
+           100737          235053           235053          100737
+      + 
+          409930    7   37340389    6   34893715    5   26686318    4
+        - ------ %B8  - -------- %B8  - -------- %B8  - -------- %B8
+           6027          705159          705159          705159
+      + 
+          801511    3   17206178    2   4406102       377534
+        - ------ %B8  - -------- %B8  - ------- %B8 + ------
+           26117         705159          705159       705159
+      ]
+    ]
+                    Type: List List RealClosure Fraction Integer
+
+The number of real solutions for the input system is:
+
+  # lr
+    8
+                    Type: PositiveInteger
+
+Each of these real solutions is given by a list of elements in
+RealClosure(R).  In these 8 lists, the first element is a value of z,
+the second of y and the last of x.  This is logical since by setting
+the list of variables of the package to [x,y,z,t] we mean that the
+elimination ordering on the variables is t < z < y < x.  Note that
+each system treated by the 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.
+
+We can approximate these real numbers as follows.  This computation
+takes between 30 sec. and 5 min, depending on your machine.
+
+  [ [approximate(r,1/1000000) for r in point] for point in lr]
+   [
+        10048059
+     [- --------,
+         2097152
+
+        4503057316985387943524397913838966414596731976211768219335881208385516_
+         314058924567176091423629695777403099833360761048898228916578137094309_
+         838597331137202584846939132376157019506760357601165917454986815382098_
+         789094851523420392811293126141329856546977145464661495487825919941188_
+         447041722440491921567263542158028061437758844364634410045253024786561_
+         923163288214175
+      /
+        4503057283025245488516511806985826635083100693757320465280554706865644_
+         949577509916867201889438090408354817931718593862797624551518983570793_
+         048774424291488708829840324189200301436123314860200821443733790755311_
+         243632919864895421704228949571290016119498807957023663865443069392027_
+         148979688266712323356043491523434068924275280417338574817381189277066_
+         143312396681216
+       ,
+
+        2106260768823475073894798680486016596249607148690685538763683715020639_
+         680858649650790055889505646893309447097099937802187329095325898785247_
+         249020717504983660482075156618738724514685333060011202964635166381351_
+         543255982200250305283981086837110614842307026091211297929876896285681_
+         830479054760056380762664905618462055306047816191782011588703789138988_
+         1895
+      /
+        2106260609498464192472113804816474175341962953296434102413903142368757_
+         967685273888585590975965211778862189872881953943640246297357061959812_
+         326103659799025126863258676567202342106877031710184247484181423288921_
+         837681237062708470295706218485928867400771937828499200923760593314168_
+         901000666373896347598118228556731037072026474496776228383762993923280_
+         0768
+       ]
+     ,
+
+        2563013
+     [- -------,
+        2097152
+
+       -
+           2611346176791927789698617693237757719238259963063541781922752330440_
+            189899668072928338490768623593207442125925986733815932243504809294_
+            837523030237337236806668167446173001727271353311571242897
+         /
+           1165225400505222530583981916004589143757226610276858990008790134819_
+            914940922413753983971394019523433320408139928153188829495755455163_
+            963417619308395977544797140231469234269034921938055593984
+       ,
+
+        3572594550275917221096588729615788272998517054675603239578198141006034_
+         091735282826590621902304466963941971038923304526273329316373757450061_
+         9789892286110976997087250466235373
+      /
+        1039548269345598936877071244834026055800814551120170592200522366591759_
+         409659486442339141029452950265179989960104811875822530205346505131581_
+         2439017247289173865014702966308864
+       ]
+     ,
+
+        1715967
+     [- -------,
+        2097152
+
+       -
+           4213093533784303521084839517977082390377261503969586224828998436606_
+            030656076359374564813773498376603121267822565801436206939519951465_
+            18222580524697287410022543952491
+         /
+           9441814144185374458649692034349224052436597470966253663930641960795_
+            805882585493199840191699917659443264824641135187383583888147867340_
+            19307857605820364195856822304768
+       ,
+
+        7635833347112644222515625424410831225347475669008589338834162172501904_
+         994376346730876809042845208919919925302105720971453918982731389072591_
+         4035
+      /
+        2624188764086097199784297610478066633934230467895851602278580978503784_
+         549205788499019640602266966026891580103543567625039018629887141284916_
+         75648
+       ]
+     ,
+
+         437701
+     [- -------,
+        2097152
+
+        1683106908638349588322172332654225913562986313181951031452750161441497_
+         473455328150721364868355579646781603507777199075077835213366484533654_
+         91383623741304759
+      /
+        1683106868095213389001709982705913638963077668731226111167785188004907_
+         425226298680325887810962614140298597366984264887998908377068799998454_
+         23381649008099328
+       ,
+
+        4961550109835010186422681013422108735958714801003760639707968096646912_
+         82670847283444311723917219104249213450966312411133
+      /
+        4961549872757738315509192078210209029852897118611097126236384040829376_
+         59261914313170254867464792718363492160482442215424
+       ]
+     ,
+
+       222801
+     [-------,
+      2097152
+
+       -
+           8994884880402428265107595121970691427136045692541978275573001865213_
+            759921588137716696126349101655220195142994932299137183241705867672_
+            383477
+         /
+           1167889998665026372177765100691888582708969960229934769690835752457_
+            077779416435209473767866507769405888942764587718542434255625992456_
+            372224
+       ,
+
+       -
+           2389704888133156878320801544373808395612771509208491019847452991885_
+            509546519525467839016613593999693886640036283570552321155037871291_
+            458703265
+         /
+           5355487273645096326090403286689931905988225444685411433221593833681_
+            192957562833671468654290340746993656285925599117602120446183443145_
+            479421952
+       ]
+     ,
+
+       765693
+     [-------,
+      2097152
+
+        8558969219816716267873244761178198088724698958616670140213765754322002_
+         303251685786118678330840203328837654339523418704917749518340772512899_
+         000391009630373148561
+      /
+        2941442445533010790976428411376393499815580215945856917906452535495723_
+         013856818941702330228779890141296236721138154231997238917322156711965_
+         2444639331719460159488
+       ,
+
+       -
+           2057618230582572101247650324860242561111302581543588808843923662767_
+            549382241659362712290777612800192921420574408948085193743688582762_
+            2246433251878894899015
+         /
+           2671598203325735538097952353501450220576313759890835097091722520642_
+            710198771902667183948906289863714759678360292483949204616471537777_
+            775324180661095366656
+       ]
+     ,
+
+      5743879
+     [-------,
+      2097152
+
+        1076288816968906847955546394773570208171456724942618614023663123574768_
+         960850434263971398072546592772662158833449797698617455397887562900072_
+         984768000608343553189801693408727205047612559889232757563830528688953_
+         535421809482771058917542602890060941949620874083007858366669453501766_
+         24841488732463225
+      /
+        3131768957080317946648461940023552044190376613458584986228549631916196_
+         601616219781765615532532294746529648276430583810894079374566460757823_
+         146888581195556029208515218838883200318658407469399426063260589828612_
+         309231596669129707986481319851571942927230340622934023923486703042068_
+         1530440845099008
+       ,
+
+       -
+           2113286699185750918364120475565458437870172489865485994389828135335_
+            264444665284557526492734931691731407872701432935503473348172076098_
+            720545849008780077564160534317894688366119529739980502944162668550_
+            098127961950496210221942878089359674925850594427768502251789758706_
+            752831632503615
+         /
+           1627615584937987580242906624347104580889144466168459718043153839408_
+            372525533309808070363699585502216011211087103263609551026027769414_
+            087391148126221168139781682587438075322591466131939975457200522349_
+            838568964285634448018562038272378787354460106106141518010935617205_
+            1706396253618176
+       ]
+     ,
+
+      19739877
+     [--------,
+       2097152
+
+       -
+           2997249936832703303799015804861520949215040387500707177701285766720_
+            192530579422478953566024359860143101547801638082771611160372212874_
+            847778035809872843149225484238365858013629341705321702582333350918_
+            009601789937023985935304900460493389873837030853410347089908880814_
+            853981132018464582458800615394770741699487295875960210750215891948_
+            814476854871031530931295467332190133702671098200902282300510751860_
+            7185928457030277807397796525813862762239286996106809728023675
+         /
+           2308433274852278590728910081191811023906504141321432646123936794873_
+            933319270608960702138193417647898360620229519176632937631786851455_
+            014766027206259022252505551741823688896883806636602574431760472240_
+            292093196729475160247268834121141893318848728661844434927287285112_
+            897080767552864895056585864033178565910387065006112801516403522741_
+            037360990556054476949527059227070809593049491257519554708879259595_
+            52929920110858560812556635485429471554031675979542656381353984
+       ,
+
+       -
+           5128189263548228489096276397868940080600938410663080459407966335845_
+            009264109490520459825316250084723010047035024497436523038925818959_
+            289312931584701353927621435434398674263047293909122850133851990696_
+            490231566094371994333795070782624011727587749989296611277318372294_
+            624207116537910436554574146082884701305543912620419354885410735940_
+            157775896602822364575864611831512943973974715166920465061850603762_
+            87516256195847052412587282839139194642913955
+         /
+           2288281939778439330531208793181290471183631092455368990386390824243_
+            509463644236249773080647438987739144921607794682653851741189091711_
+            741868145114978337284191822497675868358729486644730856622552687209_
+            203724411800481405702837198310642291275676195774614443815996713502_
+            629391749783590041470860127752372996488627742672487622480063268808_
+            889324891850842494934347337603075939980268208482904859678177751444_
+            65749979827872616963053217673201717237252096
+       ]
+     ]
+                     Type: List List Fraction Integer
+
+We can also concentrate on the solutions with real (strictly) positive
+coordinates:
+
+  lpr := positiveSolve(lp)$pack
+    []
+                     Type: List List RealClosure Fraction Integer
+
+Thus we have checked that the input system has no solution with
+strictly positive coordinates.
+
+Let us define another polynomial system (L-3).
+
+  f0 := x**3 + y + z + t- 1
+              3
+     z + y + x  + t - 1
+                      Type: Polynomial Integer
+
+  f1 := x + y**3 + z + t -1
+          3
+     z + y  + x + t - 1
+                      Type: Polynomial Integer
+
+  f2 := x + y + z**3 + t-1
+      3
+     z  + y + x + t - 1
+                      Type: Polynomial Integer
+
+  f3 := x + y + z + t**3 -1
+                  3
+     z + y + x + t  - 1
+                      Type: Polynomial Integer
+
+  lf := [f0, f1, f2, f3]
+            3              3              3                              3
+  [z + y + x  + t - 1,z + y  + x + t - 1,z  + y + x + t - 1,z + y + x + t  - 1]
+                      Type: List Polynomial Integer
+
+First compute a decomposition into regular chains (i.e. regular 
+triangular sets).
+
+  lts := triangSolve(lf)$pack
+  [
+      2           3        3
+    {t  + t + 1, z  - z - t  + t,
+                3      2      2      3           6     3            3      2
+        (3z + 3t  - 3)y  + (3z  + (6t  - 6)z + 3t  - 6t  + 3)y + (3t  - 3)z
+      + 
+           6     3          9     6     3
+        (3t  - 6t  + 3)z + t  - 3t  + 5t  - 3t
+      ,
+     x + y + z}
+    ,
+      16     13     10     7      4      2
+    {t   - 6t   + 9t   + 4t  + 15t  - 54t  + 27,
+                    15            14             13            12            11
+            4907232t   + 40893984t   - 115013088t   + 22805712t   + 36330336t
+          + 
+                      10             9             8             7
+            162959040t   - 159859440t  - 156802608t  + 117168768t
+          + 
+                      6             5             4             3
+            126282384t  - 129351600t  + 306646992t  + 475302816t
+          + 
+                         2
+            - 1006837776t  - 237269088t + 480716208
+       *
+          z
+      + 
+           54       51        48      46         45        43          42
+        48t   - 912t   + 8232t   - 72t   - 46848t   + 1152t   + 186324t
+      + 
+               40          39        38         37           36         35
+        - 3780t   - 543144t   - 3168t   - 21384t   + 1175251t   + 41184t
+      + 
+               34           33          32           31           30
+        278003t   - 1843242t   - 301815t   - 1440726t   + 1912012t
+      + 
+                29           28          27           26            25
+        1442826t   + 4696262t   - 922481t   - 4816188t   - 10583524t
+      + 
+                 24            23            22          21            20
+        - 208751t   + 11472138t   + 16762859t   - 857663t   - 19328175t
+      + 
+                   19           18            17            16           15
+        - 18270421t   + 4914903t   + 22483044t   + 12926517t   - 8605511t
+      + 
+                   14           13           12           11          10
+        - 17455518t   - 5014597t   + 8108814t   + 8465535t   + 190542t
+      + 
+                  9           8          7           6          5          4
+        - 4305624t  - 2226123t  + 661905t  + 1169775t  + 226260t  - 209952t
+      + 
+                 3
+        - 141183t  + 27216t
+      ,
+                3      2      2      3           6     3            3      2
+        (3z + 3t  - 3)y  + (3z  + (6t  - 6)z + 3t  - 6t  + 3)y + (3t  - 3)z
+      + 
+           6     3          9     6     3
+        (3t  - 6t  + 3)z + t  - 3t  + 5t  - 3t
+      ,
+                  3
+     x + y + z + t  - 1}
+    ,
+             2                       2                     2
+   {t,z - 1,y  - 1,x + y}, {t - 1,z,y  - 1,x + y}, {t - 1,z  - 1,z y + 1,x},
+      16     13     10     7      4      2
+    {t   - 6t   + 9t   + 4t  + 15t  - 54t  + 27,
+                    29            28             27           26             25
+            4907232t   + 40893984t   - 115013088t   - 1730448t   - 168139584t
+          + 
+                      24             23             22              21
+            738024480t   - 195372288t   + 315849456t   - 2567279232t
+          + 
+                      20              19              18              17
+            937147968t   + 1026357696t   + 4780488240t   - 2893767696t
+          + 
+                         16              15              14              13
+            - 5617160352t   - 3427651728t   + 5001100848t   + 8720098416t
+          + 
+                       12             11               10              9
+            2331732960t   - 499046544t   - 16243306272t   - 9748123200t
+          + 
+                       8               7               6               5
+            3927244320t  + 25257280896t  + 10348032096t  - 17128672128t
+          + 
+                          4             3               2
+            - 14755488768t  + 544086720t  + 10848188736t  + 1423614528t
+          + 
+            - 2884297248
+       *
+          z
+      + 
+            68        65         62       60          59        57          56
+       - 48t   + 1152t   - 13560t   + 360t   + 103656t   - 7560t   - 572820t
+      + 
+              54           53        52          51           50         49
+        71316t   + 2414556t   + 2736t   - 402876t   - 7985131t   - 49248t
+      + 
+                48            47          46           45            44
+        1431133t   + 20977409t   + 521487t   - 2697635t   - 43763654t
+      + 
+                  43           42            41            40            39
+        - 3756573t   - 2093410t   + 71546495t   + 19699032t   + 35025028t
+      + 
+                   38            37             36            35             34
+        - 89623786t   - 77798760t   - 138654191t   + 87596128t   + 235642497t
+      + 
+                  33            32             31             30             29
+        349607642t   - 93299834t   - 551563167t   - 630995176t   + 186818962t
+      + 
+                  28             27             26              25
+        995427468t   + 828416204t   - 393919231t   - 1076617485t
+      + 
+                     24             23              22              21
+        - 1609479791t   + 595738126t   + 1198787136t   + 4342832069t
+      + 
+                     20              19              18              17
+        - 2075938757t   - 4390835799t   - 4822843033t   + 6932747678t
+      + 
+                   16              15              14              13
+        6172196808t   + 1141517740t   - 4981677585t   - 9819815280t
+      + 
+                     12             11               10               9
+        - 7404299976t   - 157295760t   + 29124027630t   + 14856038208t
+      + 
+                      8               7              6               5
+        - 16184101410t  - 26935440354t  - 3574164258t  + 10271338974t
+      + 
+                    4              3              2
+        11191425264t  + 6869861262t  - 9780477840t  - 3586674168t + 2884297248
+      ,
+           3      3      2      6      3           9     6    3
+        (3z  + (6t  - 6)z  + (6t  - 12t  + 3)z + 2t  - 6t  + t  + 3t)y
+      + 
+           3      3      6      3      2      9      6      3          12     9
+        (3t  - 3)z  + (6t  - 12t  + 6)z  + (4t  - 12t  + 11t  - 3)z + t   - 4t
+      + 
+          6     3
+        5t  - 2t
+      ,
+                  3
+     x + y + z + t  - 1}
+    ,
+           2
+   {t - 1,z  - 1,y,x + z},
+      8    7    6     5     4     3      2
+    {t  + t  + t  - 2t  - 2t  - 2t  + 19t  + 19t - 8,
+                    7           6           5            4           3
+            2395770t  + 3934440t  - 3902067t  - 10084164t  - 1010448t
+          + 
+                     2
+            32386932t  + 22413225t - 10432368
+       *
+          z
+      + 
+                 7           6           5           4            3
+        - 463519t  + 3586833t  + 9494955t  - 8539305t  - 33283098t
+      + 
+                 2
+        35479377t  + 46263256t - 17419896
+      ,
+              4      3      3       6      3      2          3
+            3z  + (9t  - 9)z  + (12t  - 24t  + 9)z  + (- 152t  + 219t - 67)z
+          + 
+                 6      4      3
+            - 41t  + 57t  + 25t  - 57t + 16
+       *
+          y
+      + 
+           3      4      6      3      3          3              2
+        (3t  - 3)z  + (9t  - 18t  + 9)z  + (- 181t  + 270t - 89)z
+      + 
+              6       4      3                    7      6      4       3
+        (- 92t  + 135t  + 49t  - 135t + 43)z + 27t  - 27t  - 54t  + 396t
+      + 
+        - 486t + 144
+      ,
+                  3
+     x + y + z + t  - 1}
+    ,
+           3
+   {t,z - t  + 1,y - 1,x - 1}, {t - 1,z,y,x}, {t,z - 1,y,x}, {t,z,y - 1,x},
+   {t,z,y,x - 1}]
+                     Type: List RegularChain(Integer,[x,y,z,t])
+
+Then we compute a univariate representation.
+
+  univariateSolve(lf)$pack
+  [[complexRoots= ?,coordinates= [x - 1,y - 1,z + 1,t - %A]],
+   [complexRoots= ?,coordinates= [x,y - 1,z,t - %A]],
+   [complexRoots= ? - 1,coordinates= [x,y,z,t - %A]],
+   [complexRoots= ?,coordinates= [x - 1,y,z,t - %A]],
+   [complexRoots= ?,coordinates= [x,y,z - 1,t - %A]],
+   [complexRoots= ? - 2,coordinates= [x - 1,y + 1,z,t - 1]],
+   [complexRoots= ?,coordinates= [x + 1,y - 1,z,t - 1]],
+   [complexRoots= ? - 1,coordinates= [x - 1,y + 1,z - 1,t]],
+   [complexRoots= ? + 1,coordinates= [x + 1,y - 1,z - 1,t]],
+
+                    6     3     2
+    [complexRoots= ?  - 2?  + 3?  - 3,
+                          3                 3
+     coordinates= [2x + %A  + %A - 1,2y + %A  + %A - 1,z - %A,t - %A]]
+    ,
+
+                    5     3     2
+    [complexRoots= ?  + 3?  - 2?  + 3? - 3,
+                                       3
+     coordinates= [x - %A,y - %A,z + %A  + 2%A - 1,t - %A]]
+    ,
+
+                    4    3     2
+    [complexRoots= ?  - ?  - 2?  + 3,
+                         3                3                3
+     coordinates= [x + %A  - %A - 1,y + %A  - %A - 1,z - %A  + 2%A + 1,t - %A]]
+    ,
+   [complexRoots= ? + 1,coordinates= [x - 1,y - 1,z,t - %A]],
+
+                    6     3     2
+    [complexRoots= ?  + 2?  + 3?  - 3,
+                          3                        3
+     coordinates= [2x - %A  - %A - 1,y + %A,2z - %A  - %A - 1,t + %A]]
+    ,
+
+                    6      4      3      2
+    [complexRoots= ?  + 12?  + 20?  - 45?  - 42? - 953,
+
+      coordinates =
+                      5       4       3        2
+        [12609x + 23%A  + 49%A  - 46%A  + 362%A  - 5015%A - 8239,
+                      5       4       3        2
+         25218y + 23%A  + 49%A  - 46%A  + 362%A  + 7594%A - 8239,
+                      5       4       3        2
+         25218z + 23%A  + 49%A  - 46%A  + 362%A  + 7594%A - 8239,
+                      5       4       3        2
+         12609t + 23%A  + 49%A  - 46%A  + 362%A  - 5015%A - 8239]
+      ]
+    ,
+
+                    5      3      2
+    [complexRoots= ?  + 12?  - 16?  + 48? - 96,
+                          3
+     coordinates= [8x + %A  + 8%A - 8,2y - %A,2z - %A,2t - %A]]
+    ,
+
+                    5    4     3     2
+    [complexRoots= ?  + ?  - 5?  - 3?  + 9? + 3,
+
+      coordinates =
+                3                   3                   3
+        [2x - %A  + 2%A - 1, 2y + %A  - 4%A + 1, 2z - %A  + 2%A - 1,
+                3
+         2t - %A  + 2%A - 1]
+      ]
+    ,
+
+                    4     3     2
+    [complexRoots= ?  - 3?  + 4?  - 6? + 13,
+
+      coordinates =
+                 3      2                  3      2
+        [9x - 2%A  + 4%A  - %A + 2, 9y + %A  - 2%A  + 5%A - 1,
+                3      2                   3      2
+         9z + %A  - 2%A  + 5%A - 1, 9t + %A  - 2%A  - 4%A - 1]
+      ]
+    ,
+
+                    4      2
+    [complexRoots= ?  - 11?  + 37,
+
+      coordinates =
+                2            2                  2            2
+        [3x - %A  + 7,6y + %A  + 3%A - 7,3z - %A  + 7,6t + %A  - 3%A - 7]
+      ]
+    ,
+   [complexRoots= ? + 1,coordinates= [x - 1,y,z - 1,t + 1]],
+   [complexRoots= ? + 2,coordinates= [x,y - 1,z - 1,t + 1]],
+   [complexRoots= ? - 2,coordinates= [x,y - 1,z + 1,t - 1]],
+   [complexRoots= ?,coordinates= [x,y + 1,z - 1,t - 1]],
+   [complexRoots= ? - 2,coordinates= [x - 1,y,z + 1,t - 1]],
+   [complexRoots= ?,coordinates= [x + 1,y,z - 1,t - 1]],
+
+                    4     3      2
+    [complexRoots= ?  + 5?  + 16?  + 30? + 57,
+
+      coordinates =
+                    3       2                          3       2
+        [151x + 15%A  + 54%A  + 104%A + 93, 151y - 10%A  - 36%A  - 19%A - 62,
+                   3       2                        3       2
+         151z - 5%A  - 18%A  - 85%A - 31, 151t - 5%A  - 18%A  - 85%A - 31]
+      ]
+    ,
+
+                    4    3     2
+    [complexRoots= ?  - ?  - 2?  + 3,
+                         3                 3                       3
+     coordinates= [x - %A  + 2%A + 1,y + %A  - %A - 1,z - %A,t + %A  - %A - 1]]
+    ,
+
+                    4     3     2
+    [complexRoots= ?  + 2?  - 8?  + 48,
+
+      coordinates =
+                3                          3                  3
+        [8x - %A  + 4%A - 8,2y + %A,8z + %A  - 8%A + 8,8t - %A  + 4%A - 8]
+      ]
+    ,
+
+                    5    4     3     2
+    [complexRoots= ?  + ?  - 2?  - 4?  + 5? + 8,
+                          3            3            3
+     coordinates= [3x + %A  - 1,3y + %A  - 1,3z + %A  - 1,t - %A]]
+    ,
+                   3
+   [complexRoots= ?  + 3? - 1,coordinates= [x - %A,y - %A,z - %A,t - %A]]]
+          Type: List Record(complexRoots: SparseUnivariatePolynomial Integer,
+                            coordinates: List Polynomial Integer)
+
+Note that this computation is made from the input system lf.
+
+However it is possible to reuse a pre-computed regular chain as follows:
+
+  ts := lts.1
+     2           3        3
+   {t  + t + 1, z  - z - t  + t,
+
+               3      2      2      3           6     3            3      2
+       (3z + 3t  - 3)y  + (3z  + (6t  - 6)z + 3t  - 6t  + 3)y + (3t  - 3)z
+     + 
+          6     3          9     6     3
+       (3t  - 6t  + 3)z + t  - 3t  + 5t  - 3t
+     ,
+    x + y + z}
+                       Type: RegularChain(Integer,[x,y,z,t])
+
+  univariateSolve(ts)$pack
+  [
+                    4     3      2
+    [complexRoots= ?  + 5?  + 16?  + 30? + 57,
+      coordinates =
+                    3       2                          3       2
+        [151x + 15%A  + 54%A  + 104%A + 93, 151y - 10%A  - 36%A  - 19%A - 62,
+                   3       2                        3       2
+         151z - 5%A  - 18%A  - 85%A - 31, 151t - 5%A  - 18%A  - 85%A - 31]
+      ]
+    ,
+                    4    3     2
+    [complexRoots= ?  - ?  - 2?  + 3,
+                         3                 3                       3
+     coordinates= [x - %A  + 2%A + 1,y + %A  - %A - 1,z - %A,t + %A  - %A - 1]]
+    ,
+                    4     3     2
+    [complexRoots= ?  + 2?  - 8?  + 48,
+      coordinates =
+                3                          3                  3
+        [8x - %A  + 4%A - 8,2y + %A,8z + %A  - 8%A + 8,8t - %A  + 4%A - 8]
+      ]
+    ]
+         Type: List Record(complexRoots: SparseUnivariatePolynomial Integer,
+                           coordinates: List Polynomial Integer)
+
+  realSolve(ts)$pack
+    []
+                        Type: List List RealClosure Fraction Integer
+
+We compute now the full set of points with real coordinates:
+
+  lr2 := realSolve(lf)$pack
+  [[0,- 1,1,1], [0,0,1,0], [1,0,0,0], [0,0,0,1], [0,1,0,0], [1,0,%B37,- %B37],
+   [1,0,%B38,- %B38], [0,1,%B35,- %B35], [0,1,%B36,- %B36], [- 1,0,1,1],
+    [%B32,
+         1     15    2     14    1     13    4     12   11     11    4     10
+        -- %B32   + -- %B32   + -- %B32   - -- %B32   - -- %B32   - -- %B32
+        27          27          27          27          27          27
+      + 
+         1     9   14     8    1     7   2     6   1     5   2     4       3
+        -- %B32  + -- %B32  + -- %B32  + - %B32  + - %B32  + - %B32  + %B32
+        27         27         27         9         3         9
+      + 
+        4     2
+        - %B32  - %B32 - 2
+        3
+      ,
+           1     15    1     14    1     13    2     12   11     11    2     10
+        - -- %B32   - -- %B32   - -- %B32   + -- %B32   + -- %B32   + -- %B32
+          54          27          54          27          54          27
+      + 
+           1     9    7     8    1     7   1     6   1     5   1     4       3
+        - -- %B32  - -- %B32  - -- %B32  - - %B32  - - %B32  - - %B32  - %B32
+          54         27         54         9         6         9
+      + 
+          2     2   1        3
+        - - %B32  + - %B32 + -
+          3         2        2
+      ,
+           1     15    1     14    1     13    2     12   11     11    2     10
+        - -- %B32   - -- %B32   - -- %B32   + -- %B32   + -- %B32   + -- %B32
+          54          27          54          27          54          27
+      + 
+           1     9    7     8    1     7   1     6   1     5   1     4       3
+        - -- %B32  - -- %B32  - -- %B32  - - %B32  - - %B32  - - %B32  - %B32
+          54         27         54         9         6         9
+      + 
+          2     2   1        3
+        - - %B32  + - %B32 + -
+          3         2        2
+      ]
+    ,
+    [%B33,
+         1     15    2     14    1     13    4     12   11     11    4     10
+        -- %B33   + -- %B33   + -- %B33   - -- %B33   - -- %B33   - -- %B33
+        27          27          27          27          27          27
+      + 
+         1     9   14     8    1     7   2     6   1     5   2     4       3
+        -- %B33  + -- %B33  + -- %B33  + - %B33  + - %B33  + - %B33  + %B33
+        27         27         27         9         3         9
+      + 
+        4     2
+        - %B33  - %B33 - 2
+        3
+      ,
+           1     15    1     14    1     13    2     12   11     11    2     10
+        - -- %B33   - -- %B33   - -- %B33   + -- %B33   + -- %B33   + -- %B33
+          54          27          54          27          54          27
+      + 
+           1     9    7     8    1     7   1     6   1     5   1     4       3
+        - -- %B33  - -- %B33  - -- %B33  - - %B33  - - %B33  - - %B33  - %B33
+          54         27         54         9         6         9
+      + 
+          2     2   1        3
+        - - %B33  + - %B33 + -
+          3         2        2
+      ,
+           1     15    1     14    1     13    2     12   11     11    2     10
+        - -- %B33   - -- %B33   - -- %B33   + -- %B33   + -- %B33   + -- %B33
+          54          27          54          27          54          27
+      + 
+           1     9    7     8    1     7   1     6   1     5   1     4       3
+        - -- %B33  - -- %B33  - -- %B33  - - %B33  - - %B33  - - %B33  - %B33
+          54         27         54         9         6         9
+      + 
+          2     2   1        3
+        - - %B33  + - %B33 + -
+          3         2        2
+      ]
+    ,
+    [%B34,
+         1     15    2     14    1     13    4     12   11     11    4     10
+        -- %B34   + -- %B34   + -- %B34   - -- %B34   - -- %B34   - -- %B34
+        27          27          27          27          27          27
+      + 
+         1     9   14     8    1     7   2     6   1     5   2     4       3
+        -- %B34  + -- %B34  + -- %B34  + - %B34  + - %B34  + - %B34  + %B34
+        27         27         27         9         3         9
+      + 
+        4     2
+        - %B34  - %B34 - 2
+        3
+      ,
+           1     15    1     14    1     13    2     12   11     11    2     10
+        - -- %B34   - -- %B34   - -- %B34   + -- %B34   + -- %B34   + -- %B34
+          54          27          54          27          54          27
+      + 
+           1     9    7     8    1     7   1     6   1     5   1     4       3
+        - -- %B34  - -- %B34  - -- %B34  - - %B34  - - %B34  - - %B34  - %B34
+          54         27         54         9         6         9
+      + 
+          2     2   1        3
+        - - %B34  + - %B34 + -
+          3         2        2
+      ,
+           1     15    1     14    1     13    2     12   11     11    2     10
+        - -- %B34   - -- %B34   - -- %B34   + -- %B34   + -- %B34   + -- %B34
+          54          27          54          27          54          27
+      + 
+           1     9    7     8    1     7   1     6   1     5   1     4       3
+        - -- %B34  - -- %B34  - -- %B34  - - %B34  - - %B34  - - %B34  - %B34
+          54         27         54         9         6         9
+      + 
+          2     2   1        3
+        - - %B34  + - %B34 + -
+          3         2        2
+      ]
+    ,
+   [- 1,1,0,1], [- 1,1,1,0],
+    [%B23,
+           1     15    1     14    1     13    2     12   11     11    2     10
+        - -- %B23   - -- %B23   - -- %B23   + -- %B23   + -- %B23   + -- %B23
+          54          27          54          27          54          27
+      + 
+           1     9    7     8    1     7   1     6   1     5   1     4       3
+        - -- %B23  - -- %B23  - -- %B23  - - %B23  - - %B23  - - %B23  - %B23
+          54         27         54         9         6         9
+      + 
+          2     2   1        3
+        - - %B23  + - %B23 + -
+          3         2        2
+      ,
+     %B30,
+                  1     15    1     14    1     13    2     12   11     11
+        - %B30 + -- %B23   + -- %B23   + -- %B23   - -- %B23   - -- %B23
+                 54          27          54          27          54
+      + 
+           2     10    1     9    7     8    1     7   1     6   1     5
+        - -- %B23   + -- %B23  + -- %B23  + -- %B23  + - %B23  + - %B23
+          27          54         27         54         9         6
+      + 
+        1     4   2     2   1        1
+        - %B23  + - %B23  - - %B23 - -
+        9         3         2        2
+      ]
+    ,
+    [%B23,
+           1     15    1     14    1     13    2     12   11     11    2     10
+        - -- %B23   - -- %B23   - -- %B23   + -- %B23   + -- %B23   + -- %B23
+          54          27          54          27          54          27
+      + 
+           1     9    7     8    1     7   1     6   1     5   1     4       3
+        - -- %B23  - -- %B23  - -- %B23  - - %B23  - - %B23  - - %B23  - %B23
+          54         27         54         9         6         9
+      + 
+          2     2   1        3
+        - - %B23  + - %B23 + -
+          3         2        2
+      ,
+     %B31,
+                  1     15    1     14    1     13    2     12   11     11
+        - %B31 + -- %B23   + -- %B23   + -- %B23   - -- %B23   - -- %B23
+                 54          27          54          27          54
+      + 
+           2     10    1     9    7     8    1     7   1     6   1     5
+        - -- %B23   + -- %B23  + -- %B23  + -- %B23  + - %B23  + - %B23
+          27          54         27         54         9         6
+      + 
+        1     4   2     2   1        1
+        - %B23  + - %B23  - - %B23 - -
+        9         3         2        2
+      ]
+    ,
+    [%B24,
+           1     15    1     14    1     13    2     12   11     11    2     10
+        - -- %B24   - -- %B24   - -- %B24   + -- %B24   + -- %B24   + -- %B24
+          54          27          54          27          54          27
+      + 
+           1     9    7     8    1     7   1     6   1     5   1     4       3
+        - -- %B24  - -- %B24  - -- %B24  - - %B24  - - %B24  - - %B24  - %B24
+          54         27         54         9         6         9
+      + 
+          2     2   1        3
+        - - %B24  + - %B24 + -
+          3         2        2
+      ,
+     %B28,
+                  1     15    1     14    1     13    2     12   11     11
+        - %B28 + -- %B24   + -- %B24   + -- %B24   - -- %B24   - -- %B24
+                 54          27          54          27          54
+      + 
+           2     10    1     9    7     8    1     7   1     6   1     5
+        - -- %B24   + -- %B24  + -- %B24  + -- %B24  + - %B24  + - %B24
+          27          54         27         54         9         6
+      + 
+        1     4   2     2   1        1
+        - %B24  + - %B24  - - %B24 - -
+        9         3         2        2
+      ]
+    ,
+    [%B24,
+           1     15    1     14    1     13    2     12   11     11    2     10
+        - -- %B24   - -- %B24   - -- %B24   + -- %B24   + -- %B24   + -- %B24
+          54          27          54          27          54          27
+      + 
+           1     9    7     8    1     7   1     6   1     5   1     4       3
+        - -- %B24  - -- %B24  - -- %B24  - - %B24  - - %B24  - - %B24  - %B24
+          54         27         54         9         6         9
+      + 
+          2     2   1        3
+        - - %B24  + - %B24 + -
+          3         2        2
+      ,
+     %B29,
+                  1     15    1     14    1     13    2     12   11     11
+        - %B29 + -- %B24   + -- %B24   + -- %B24   - -- %B24   - -- %B24
+                 54          27          54          27          54
+      + 
+           2     10    1     9    7     8    1     7   1     6   1     5
+        - -- %B24   + -- %B24  + -- %B24  + -- %B24  + - %B24  + - %B24
+          27          54         27         54         9         6
+      + 
+        1     4   2     2   1        1
+        - %B24  + - %B24  - - %B24 - -
+        9         3         2        2
+      ]
+    ,
+    [%B25,
+           1     15    1     14    1     13    2     12   11     11    2     10
+        - -- %B25   - -- %B25   - -- %B25   + -- %B25   + -- %B25   + -- %B25
+          54          27          54          27          54          27
+      + 
+           1     9    7     8    1     7   1     6   1     5   1     4       3
+        - -- %B25  - -- %B25  - -- %B25  - - %B25  - - %B25  - - %B25  - %B25
+          54         27         54         9         6         9
+      + 
+          2     2   1        3
+        - - %B25  + - %B25 + -
+          3         2        2
+      ,
+     %B26,
+                  1     15    1     14    1     13    2     12   11     11
+        - %B26 + -- %B25   + -- %B25   + -- %B25   - -- %B25   - -- %B25
+                 54          27          54          27          54
+      + 
+           2     10    1     9    7     8    1     7   1     6   1     5
+        - -- %B25   + -- %B25  + -- %B25  + -- %B25  + - %B25  + - %B25
+          27          54         27         54         9         6
+      + 
+        1     4   2     2   1        1
+        - %B25  + - %B25  - - %B25 - -
+        9         3         2        2
+      ]
+    ,
+    [%B25,
+           1     15    1     14    1     13    2     12   11     11    2     10
+        - -- %B25   - -- %B25   - -- %B25   + -- %B25   + -- %B25   + -- %B25
+          54          27          54          27          54          27
+      + 
+           1     9    7     8    1     7   1     6   1     5   1     4       3
+        - -- %B25  - -- %B25  - -- %B25  - - %B25  - - %B25  - - %B25  - %B25
+          54         27         54         9         6         9
+      + 
+          2     2   1        3
+        - - %B25  + - %B25 + -
+          3         2        2
+      ,
+     %B27,
+                  1     15    1     14    1     13    2     12   11     11
+        - %B27 + -- %B25   + -- %B25   + -- %B25   - -- %B25   - -- %B25
+                 54          27          54          27          54
+      + 
+           2     10    1     9    7     8    1     7   1     6   1     5
+        - -- %B25   + -- %B25  + -- %B25  + -- %B25  + - %B25  + - %B25
+          27          54         27         54         9         6
+      + 
+        1     4   2     2   1        1
+        - %B25  + - %B25  - - %B25 - -
+        9         3         2        2
+      ]
+    ,
+   [1,%B21,- %B21,0], [1,%B22,- %B22,0], [1,%B19,0,- %B19], [1,%B20,0,- %B20],
+           1     3   1   1     3   1   1     3   1
+   [%B17,- - %B17  + -,- - %B17  + -,- - %B17  + -],
+           3         3   3         3   3         3
+           1     3   1   1     3   1   1     3   1
+   [%B18,- - %B18  + -,- - %B18  + -,- - %B18  + -]]
+           3         3   3         3   3         3
+                      Type: List List RealClosure Fraction Integer
+
+The number of real solutions for the input system is:
+
+  #lr2
+    27
+                               Type: PositiveInteger
+
+Another example of computation of real solutions illustrates the 
+LexTriangularPackage package constructor.
+
+We concentrate now on the solutions with real (strictly) positive
+coordinates:
+
+  lpr2 := positiveSolve(lf)$pack
+              1     3   1   1     3   1   1     3   1
+     [[%B40,- - %B40  + -,- - %B40  + -,- - %B40  + -]]
+              3         3   3         3   3         3
+                             Type: List List RealClosure Fraction Integer
+
+Finally, we approximate the coordinates of this point with 20 exact digits:
+
+  [approximate(r,1/10**21)::Float for r in lpr2.1]
+   [0.3221853546 2608559291, 0.3221853546 2608559291, 0.3221853546 2608559291,
+    0.3221853546 2608559291]
+                             Type: List Float
+
+See Also:
+o )show ZeroDimensionalSolvePackage
+o $AXIOM/doc/src/algebra/zerodim.spad.dvi
+
+@
 <<package ZDSOLVE ZeroDimensionalSolvePackage>>=
 )abbrev package ZDSOLVE ZeroDimensionalSolvePackage
 ++ Author: Marc Moreno Maza
diff --git a/src/doc/book.pamphlet b/src/doc/book.pamphlet
index a113b73..377d5c6 100644
--- a/src/doc/book.pamphlet
+++ b/src/doc/book.pamphlet
@@ -47667,8 +47667,7 @@ $$
 \returnType{Type: String}
 
 Strings can be changed to upper case or lower case using the
-operations \spadfunFrom{upperCase}{String},
-\spadfunFrom{upperCase}{String}, \spadfunFrom{lowerCase}{String} and
+operations \spadfunFrom{upperCase}{String}, and
 \spadfunFrom{lowerCase}{String}.
 
 \spadcommand{upperCase hello }
@@ -50596,7 +50595,7 @@ x \  {y \sp 2}
 $$
 \returnType{Type: OrderedFreeMonoid Symbol}
 
-The we can compute the right-quotient of {\bf qr} by {\bf r}:
+We can compute the right-quotient of {\bf qr} by {\bf r}:
 
 \spadcommand{rquo(qr,w)  }
 $$
diff --git a/src/doc/spadhelp.pamphlet b/src/doc/spadhelp.pamphlet
index 3275622..21925ae 100644
--- a/src/doc/spadhelp.pamphlet
+++ b/src/doc/spadhelp.pamphlet
@@ -1504,7 +1504,8 @@ Integer (INT)                    IntegerLinearDependence (ZLINDEP)
 IntegerNumberTheoryFunctions (INTHEORY)
 Kernel (KERNEL)                  KeyedAccessFile (KAFILE)
 LexTriangularPackage (LEXTRIPK)  Library (LIB)
-LieExponentials (LEXP)           LinearOrdinaryDifferentialOperator (LODO)
+LieExponentials (LEXP)           LiePolynomial (LPOLY)
+LinearOrdinaryDifferentialOperator (LODO)
 LinearOrdinaryDifferentialOperator1 (LODO1)
 LinearOrdinaryDifferentialOperator2 (LODO2)
 List (LIST)                      LyndonWord (LWORD)
@@ -1516,12 +1517,23 @@ None (NONE)                      Octonion (OCT)
 OneDimensionalArray (ARRAY1)     Operator (OP)
 OrderedVariableList (OVAR)       OrderlyDifferentialPolynomial (ODPOL)
 PartialFraction (PFR)            Permanent (PERMAN)
-Polynomial (POLY)                Quaternion (QUAT)
-RadixExpansion (RADIX)           RealClosure (RECLOS)
-PlaneAlgebraicCurvePlot (ACPLOT) RealSolvePackage (REALSOLV)
+PlaneAlgebraicCurvePlot (ACPLOT) Polynomial (POLY)
+Quaternion (QUAT)                RadixExpansion (RADIX)
+RealClosure (RECLOS)             RealSolvePackage (REALSOLV)
 RegularTriangularSet (REGSET)    RomanNumeral (ROMAN)
 Segment (SEG)                    SegmentBinding (SEGBIND)
-Set (SET)                        TwoDimensionalViewport (VIEW2D)
+Set (SET)                        SingleInteger (SINT)
+SparseTable (STBL)               SquareMatrix (SQMATRIX)
+SquareFreeRegularTriangularSet (SREGSET)
+Stream (STREAM)                  String (STRING)
+StringTable (STRTBL)             Symbol (SYMBOL)
+Table (TABLE)                    TextFile (TEXTFILE)
+TwoDimensionalArray (ARRAY2)     TwoDimensionalViewport (VIEW2D)
+UnivariatePolynomial (UP)        UniversalSegment (UNISEG)
+Vector (VECTOR)                  Void (VOID)
+WuWenTsunTriangularSet (WUTSET)  XPBWPolynomial (XPBWPOLY)
+XPolynomial (XPOLY)              XPolynomialRing (XPR)
+ZeroDimensionalSolvePackage (ZDSOLVE)
 
 @ 
 
\start
Date: Mon, 10 Sep 2007 19:01:39 -0700
From: Ed Borasky
To: Tim Daly
Subject: Re: 20070909.01.tpd.patch

Tim Daly wrote:
> The file newton.spad contains the NEWTON domain which also exists
> in duplicate form in fffg.spad. The newton.spad file is removed
> by this patch.
> 
> Tim

I just synced up with the Silver SVN repository last night ... here's
the top of the change log:

20070909 tpd src/algebra/newton.spad included in fffg.spad
20070909 tpd src/algebra/Makefile remove newton.spad (duplicate)
20070907 tpd src/algebra/acplot.spad fix PlaneAlgebraicCurvePlot.help NOISE
20070907 tpd src/algebra/Makefile make regression respect NOISE variable
20070907 tpd src/input/Makefile make regression respect NOISE variable

The "make" step is crashing looking for a rule to make "NEWTON.o":

copying NAALG.nrlib to NAALG.o
copying NAALG-.nrlib to NAALG-.o
make[3]: *** No rule to make target
`/home/data2/axiom/silver/mnt/linux/algebra/NEWTON.o', needed by `src'.
 Stop.
make[3]: Leaving directory `/home/data2/axiom/silver/src/algebra'
make[2]: *** [algebradir] Error 2
make[2]: Leaving directory `/home/data2/axiom/silver/src'
make[1]: *** [srcdir] Error 2
make[1]: Leaving directory `/home/data2/axiom/silver'
make: *** [all] Error 2
znmeb@DreamGate /home/data2/axiom/silver $

Could this be related to the patch??

\start
Date: Mon, 10 Sep 2007 21:24:46 -0500
From: Tim Daly
To: Ed Borasky
Subject: 20070909.01.tpd.patch failure

Hmpf. I did a complete, clean build before checkin.
I must have missed something in the svn command.
I'm looking into it. Thanks.

\start
Date: Tue, 11 Sep 2007 00:10:59 -0500
From: Tim Daly
To: Ed Borasky
Subject: 20070909.01.tpd.patch failure (fix)

Apparently I forgot to do an 'svn add' for the Martin's files.
The test build completes successfully here and runs fine.
The problem you had should be fixed.

\start
Date: Mon, 10 Sep 2007 23:37:40 -0700
From: Ed Borasky
To: Tim Daly
Subject: Re: 20070909.01.tpd.patch failure (fix)

Tim Daly wrote:
> Ed,
> 
> Apparently I forgot to do an 'svn add' for the Martin's files.
> The test build completes successfully here and runs fine.
> The problem you had should be fixed.
> 
> Tim
> 

Sounds like a plan ... I just started the build, so it will be morning
before I know if it worked. Meanwhile, when is the next scheduled
"migration" of Silver to Golden? I'm trying to get Gentoo to replace the
September 2005 tarball they have now with something newer.

\start
Date: Tue, 11 Sep 2007 07:48:13 -0500
From: Tim Daly
To: Ed Borasky
Subject: Gold

> Sounds like a plan ... I just started the build so it will be morning
> before I know if it worked. Meanwhile, when is the next scheduled
> "migration" of Silver to Golden? I'm trying to get Gentoo to replace the
> September 2005 tarball they have now with something newer.

Axiom's last Gold release was on Sept 1, 2007. Arch, Sourceforge CVS,
and Savannah CVS all contain the Sept 2007 sources. Sourceforge SVN
and git contain the Silver sources. Silver has the new )help.

As part of recovery of the project I am going back to the schedule
of Gold releases every 2 months. The major focus of change in the
next release will be more documentation, bug fixes, and regression
testing. You'll notice the difference if you look at the new test
messages which now report the number of tests that pass and fail.
Help documentation and regression tests are extracted from algebra 
files at build time.

I'm also restructuring and documenting sman in src/sman/bookvol6.

\start
Date: Tue, 11 Sep 2007 08:24:45 -0700 (PDT)
From: Cliff Yapp
To: Tim Daly, Ed Borasky
Subject: Re: Gold

--- Tim Daly wrote:

> As part of recovery of the project I am going back to the schedule
> of Gold releases every 2 months.

Tim, the schedule sounds good.  Would you object to a Major.Minor
numbering scheme for Gold to make things "distro-friendly?"  E.g.

Sept 1, 2007:  axiom-4.9.0.tar.bz2  (if that's where we're at, I need
to check.)
Nov 1, 2007:   axiom-4.10.0.tar.bz2
...

We could use the third place if we need to fix something in the tarball
between two month releases - e.g. "opps, we need to add file X to the
archive - axiom-4.9.1".

I'd be glad to set something up and make up tarballs if you agree.

\start
Date: Tue, 11 Sep 2007 14:05:14 -0500
From: Tim Daly
To: Cliff Yapp
Subject: Gold

I'd prefer the binary numbering scheme to reflect the date
of the gold version, so the Gold Sept 2007 version would be
   axiom-7.9.0.tgz
(that is, Sept, 2007 == 7.9). This will be unique and clear.

We need to put up binary distros on the axiom websites
(axiom-developer, sourceforge, savannah). This will be
setup and maintained once I get the new website task to
the top of the list.

\start
Date: Tue, 11 Sep 2007 17:55:30 -0700 (PDT)
From: Cliff Yapp
To: Tim Daly
Subject: Re: Gold

--- Tim Daly wrote:

> I'd prefer the binary numbering scheme to reflect the date
> of the gold version, so the Gold Sept 2007 version would be
>    axiom-7.9.0.tgz
> (that is, Sept, 2007 == 7.9). This will be unique and clear.

It will, but it would break the user convention of major
version number updates corresponding to major user visible
changes/improvements.  I very much think that version
numbers constitute a sort of "advertising" in the sense
that users are trained to expect less or more from a
release depending on the type of version number change.
For example, Emacs 21 to Emacs 22 produced many major
user visible improvements.  Likewise with OpenOffice.org
versions 1 and 2.  Presumably Mathematica works
like this, although I haven't seen various versions in
person so I don't know.

If that is your preference Tim I'm willing to go along,
but it might be worth thinking a moment how we will
catch people's attention when a version with major user
visible changes comes out.  I.e., how do we say "if you
didn't like the user interface before, this version has
a new one so it's time to check again?"  What if that
happens between 10.1 and 10.2?

\start
Date: Tue, 11 Sep 2007 20:57:31 -0500
From: Tim Daly
To: Cliff Yapp
Subject: Gold numbering scheme

We're not in the advertising business. We're doing long term science.

It makes no difference if there are "major" improvements from version
10.1 to 10.2. Every version features improvements.

Linus Torvolds commented that he is constantly asked when "version 3.0"
of linux will be released. He estimates that there will never be a
version 3.0 and people don't like that answer.

It's a number. It has no meaning except what we give it.

The meaning of Axiom's version number is year/month/patch of source release.
2007 September's Gold would be axiom-7.9.0

\start
Date: Tue, 11 Sep 2007 22:11:01 -0400
From: Alfredo Portes
To: Tim Daly
Subject: Re: Gold numbering scheme

> Linus Torvolds commented that he is constantly asked when "version 3.0"
> of linux will be released. He estimates that there will never be a
> version 3.0 and people don't like that answer.

Not for contradicting you, but his answer was because he does not expect
for Linux to break API compatibility any time soon to justify the 3.0 jump.
But the kernel keeps the xx.yy.zz religiously, in my opinion, as a sign of
improvement.

\start
Date: Tue, 11 Sep 2007 20:08:37 -0700
From: Ed Borasky
To: Tim Daly
Subject: Re: Gold

Tim Daly wrote:
> I'd prefer the binary numbering scheme to reflect the date
> of the gold version, so the Gold Sept 2007 version would be
>    axiom-7.9.0.tgz
> (that is, Sept, 2007 == 7.9). This will be unique and clear.

Well ... OK ... but since we are looking for something to last the next
30 years, do we roll to axiom-10.9.0 in September of 2010?


> 
> We need to put up binary distros on the axiom websites
> (axiom-developer, sourceforge, savannah). This will be
> setup and maintained once I get the new website task to
> the top of the list.

Gentoo, on the other hand, only needs a source tarball. :)

Let me know when the source tarball is up and I'll update the Bugzilla
entry with the URL.

\start
Date: Tue, 11 Sep 2007 20:10:56 -0700
From: Ed Borasky
To: Tim Daly
Subject: Re: Gold numbering scheme

Tim Daly wrote:
> Cliff,
> 
> We're not in the advertising business. We're doing long term science.

Maybe so, but a little word of mouth can't hurt. Consider the Ubuntu
phenomenon. ;)

\start
Date: Tue, 11 Sep 2007 21:06:39 -0700 (PDT)
From: Cliff Yapp
To: Tim Daly
Subject: Re: Gold numbering scheme

--- Tim Daly wrote:

> Cliff,
> 
> We're not in the advertising business. We're doing long term science.

OK, fair enough.

> It makes no difference if there are "major" improvements from version
> 10.1 to 10.2. Every version features improvements.

Well, it will certainly avoid arguments about what is "worth" a major
version number increase.

> It's a number. It has no meaning except what we give it.

Ideally yes.  We will probably find that conventions used in other
projects will breed assumptions about what our numbering indicates, but
an issue so minor merits no contention.  If you prefer this scheme it's
OK with me.

> The meaning of Axiom's version number is year/month/patch of source
> release. 2007 September's Gold would be axiom-7.9.0

OK.  Considering Emacs is at version 22, 10.12.0 doesn't bother me.

\start
Date: Wed, 12 Sep 2007 19:52:01 -0700
From: Arthur Ralfs
To: list
Subject: lisp -> spad question

The following lisp seems to do what I want, i.e. capture stuff written to
*standard-output* in a string,

(1) -> )lisp (setq out (with-output-to-string (*standard-output*)
(write-line "hello universe")))
(1) ->
Value = "hello universe
"
(1) -> )lisp (write-line out)
hello universe

Value = "hello universe
"

However when I try to translate this to spad with the following function:

    testCommand2():Void ==
       
SETQ(out$Lisp,WITH_-OUTPUT_-TO_-STRING(LIST(_*STANDARD_-OUTPUT_*$Lisp)$Lisp,
            WriteLine("Hello Universe")$Lisp)$Lisp)$Lisp


I get this:

(1) -> testCommand2()
   Loading /home/arthur/axiom/silver/silver-07-08-25/AXSERV.nrlib/code
      for package AxiomServer

   >> System error:
   #<synonym stream to *TERMINAL-IO*> is not a string with a fill-pointer.

Can anybody tell me what's going on?

\start
Date: Thu, 13 Sep 2007 05:14:51 +0200 (CEST)
From: Waldek Hebisch
To: Arthur Ralfs
Subject: Re: lisp -> spad question

Arthur Ralfs wrote:
> Hello,
> 
> The following lisp seems to do what I want, i.e. capture stuff written to
> *standard-output* in a string,
> 
> (1) -> )lisp (setq out (with-output-to-string (*standard-output*)
> (write-line "hello universe")))
> (1) ->
> Value = "hello universe
> "
> (1) -> )lisp (write-line out)
> hello universe
> 
> Value = "hello universe
> "
> 
> However when I try to translate this to spad with the following function:
> 
>     testCommand2():Void ==
>        
> SETQ(out$Lisp,WITH_-OUTPUT_-TO_-STRING(LIST(_*STANDARD_-OUTPUT_*$Lisp)$Lisp,
>             WriteLine("Hello Universe")$Lisp)$Lisp)$Lisp
> 
> 
> I get this:
> 
> (1) -> testCommand2()
>    Loading /home/arthur/axiom/silver/silver-07-08-25/AXSERV.nrlib/code
>       for package AxiomServer
> 
>    >> System error:
>    #<synonym stream to *TERMINAL-IO*> is not a string with a fill-pointer.
> 
> Can anybody tell me what's going on?
> 

Your Spad code corresponds to:

(setq out (with-output-to-string (list *standard-output*)
          (write-line "hello universe")))

which wants *standard-output* to be a string with fill pointer
(and list would be the resulting stream).  To get your Lisp
you need something like:

SETQ(out$Lisp,WITH_-OUTPUT_-TO_-STRING(_*STANDARD_-OUTPUT_*()$Lisp)$Lisp,
             WriteLine("Hello Universe")$Lisp)$Lisp)$Lisp

(which IMHO is extremally ugly).

I would say that it if you need things like with-output-to-string than
it is better to write your function in Lisp -- Spad version is
impossible to understand without knowing Lisp and a Lisper will
still have trouble translating Spad syntax to Lisp.

\start
Date: Thu, 13 Sep 2007 14:59:19 -0400
From: Alfredo Portes
To: list
Subject: Re: Two hyperdoc questions


On 18 Jun 2007 08:24:33 +0200, Martin Rubey wrote:

> > 2) If I inadvertently quit HyperDoc while running Axiom, I can restart it
> > with )hd.  But )hd doesn't provide a socket connection; this new HyperDoc is
> > "not connected to Axiom".  Is there any way of starting a "connected"
> > HyperDoc from an already-running Axiom?
>
> No, but I'd love to see a fix for that bug, too.

Attached are patches for this problem done by Waldek (Bug 281).
The patch is against current silver.

Regards,

Alfredo

------=_Part_39103_7054220.1189709959257

ZGlmZiAtLWdpdCBhL3NyYy9zbWFuL2Jvb2t2b2w2LnBhbXBobGV0IGIvc3JjL3NtYW4vYm9va3Zv
bDYucGFtcGhsZXQKaW5kZXggZDgwMzg4Yi4uZjBkOWJkNCAxMDA2NDQKLS0tIGEvc3JjL3NtYW4v
Ym9va3ZvbDYucGFtcGhsZXQKKysrIGIvc3JjL3NtYW4vYm9va3ZvbDYucGFtcGhsZXQKQEAgLTgx
Miw2ICs4MTIsOCBAQCB0aGVzZSBzdHJ1Y3R1cmVzIHdoaWNoIG1haW50YWlucyB0aGUgcHJvY2Vz
cyBsaXN0IGZvciBheGlvbS4KICNkZWZpbmUgTmFkYURlbFNoaXRza3kgIDIKIC8qIFdoZW4gYSBw
cm9jZXNzIGRpZXMgc3RhcnQgaXQgdXAgYWdhaW4gKi8KICNkZWZpbmUgRG9JdEFnYWluICAgICAg
IDMKKy8qIFdoZW4gaHlwZXJ0ZXggZGllcywgY2xlYW4gaXRzIHNvY2tldCAqLworI2RlZmluZSBD
bGVhbkh5cGVydGV4U29ja2V0IDQKIAogdHlwZWRlZiBzdHJ1Y3Qgc3BhZF9wcm9jIHsKICAgaW50
CXByb2NfaWQ7CS8qIHByb2Nlc3MgaWQgb2YgY2hpbGQgKi8KQEAgLTE0MDUsNyArMTQwNyw3IEBA
IHN0YXJ0X3RoZV9oeXBlcnRleCh2b2lkKQogICAgIHNwcmludGYocHJvZywgIiVzIC1rIC1ydiAl
cyIsIEh5cGVydGV4UHJvZ3JhbSwgVmVyaWZ5UmVjb3JkRmlsZSk7CiAgICAgc3Bhd25fb2ZfaGVs
bChwcm9nLCBOYWRhRGVsU2hpdHNreSk7CiAgIH0KLSAgZWxzZQlzcGF3bl9vZl9oZWxsKEh5cGVy
dGV4UHJvZ3JhbSwgTmFkYURlbFNoaXRza3kpOworICBlbHNlCXNwYXduX29mX2hlbGwoSHlwZXJ0
ZXhQcm9ncmFtLCBDbGVhbkh5cGVydGV4U29ja2V0KTsKIH0KIAogQApAQCAtMTUxNyw2ICsxNTE5
LDE0IEBAIHN0YXJ0X3RoZV9BeGlvbShjaGFyICoqZW52cCkKIFxzdWJzZWN0aW9ue2NsZWFuXF91
cFxfc29ja2V0c30KIDw8c21hbi5jbGVhbnVwc29ja2V0cz4+PQogc3RhdGljIHZvaWQKK2NsZWFu
X2h5cGVydGV4X3NvY2tldCh2b2lkKQoreworICAgY2hhciBuYW1lWzI1Nl07CisgICBzcHJpbnRm
KG5hbWUsICIlcyVkIiwgTWVudVNlcnZlck5hbWUsIHNlcnZlcl9udW0pOworICAgdW5saW5rKG5h
bWUpOyAKK30KKworc3RhdGljIHZvaWQKIGNsZWFuX3VwX3NvY2tldHModm9pZCkKIHsKICAgY2hh
ciBuYW1lWzI1Nl07CkBAIC0xNTI2LDggKzE1MzYsNyBAQCBjbGVhbl91cF9zb2NrZXRzKHZvaWQp
CiAgIHVubGluayhuYW1lKTsKICAgc3ByaW50ZihuYW1lLCAiJXMlZCIsIFNlc3Npb25JT05hbWUs
IHNlcnZlcl9udW0pOwogICB1bmxpbmsobmFtZSk7Ci0gIHNwcmludGYobmFtZSwgIiVzJWQiLCBN
ZW51U2VydmVyTmFtZSwgc2VydmVyX251bSk7Ci0gIHVubGluayhuYW1lKTsKKyAgY2xlYW5faHlw
ZXJ0ZXhfc29ja2V0KCk7CiB9CiAKIEAKQEAgLTE3MDQsNyArMTcxMyw2IEBAIG1vbml0b3JfY2hp
bGRyZW4odm9pZCkKICAgICBpZiAoZGVhZF9iYWJ5ID09IC0xICYmIGRlYXRoX3NpZ25hbCkgewog
ICAgICAga2lsbF9hbGxfY2hpbGRyZW4oKTsKICAgICAgIGNsZWFuX3VwX3NvY2tldHMoKTsKLSAg
ICAgIGNsZWFuX3VwX3Rlcm1pbmFsKCk7CiAgICAgICBzbGVlcCgyKTsKICAgICAgIGV4aXQoMCk7
CiAgICAgfQpAQCAtMTczMSw3ICsxNzM5LDYgQEAgbW9uaXRvcl9jaGlsZHJlbih2b2lkKQogICAg
IGNhc2UgRGllOgogICAgICAga2lsbF9hbGxfY2hpbGRyZW4oKTsKICAgICAgIGNsZWFuX3VwX3Nv
Y2tldHMoKTsKLSAgICAgIGNsZWFuX3VwX3Rlcm1pbmFsKCk7CiAgICAgICBzbGVlcCgyKTsKICAg
ICAgIGV4aXQoMCk7CiAgICAgY2FzZSBOYWRhRGVsU2hpdHNreToKQEAgLTE3MzksNiArMTc0Niw5
IEBAIG1vbml0b3JfY2hpbGRyZW4odm9pZCkKICAgICBjYXNlIERvSXRBZ2FpbjoKICAgICAgIHNw
YXduX29mX2hlbGwocHJvYy0+Y29tbWFuZCwgRG9JdEFnYWluKTsKICAgICAgIGJyZWFrOworICAg
IGNhc2UgQ2xlYW5IeXBlcnRleFNvY2tldDoKKyAgICAgIGNsZWFuX2h5cGVydGV4X3NvY2tldCgp
OworICAgICAgYnJlYWs7CiAgICAgfQogICB9CiB9Cg==
------=_Part_39103_7054220.1189709959257

ZGlmZiAtLWdpdCBhL3NyYy9pbmNsdWRlL3NtYW4uaDEgYi9zcmMvaW5jbHVkZS9zbWFuLmgxCmlu
ZGV4IDIwZGJjOTAuLjk2NDUyODkgMTAwNzU1Ci0tLSBhL3NyYy9pbmNsdWRlL3NtYW4uaDEKKysr
IGIvc3JjL2luY2x1ZGUvc21hbi5oMQpAQCAtMjUsNiArMjUsNyBAQCBzdGF0aWMgdm9pZCBzdGFy
dF90aGVfZ3JhcGhpY3Modm9pZCk7CiBzdGF0aWMgdm9pZCBmb3JrX0F4aW9tKHZvaWQpOwogc3Rh
dGljIHZvaWQgc3RhcnRfdGhlX0F4aW9tKGNoYXIgKiAqIGVudnApOwogc3RhdGljIHZvaWQgY2xl
YW5fdXBfc29ja2V0cyh2b2lkKTsKK3N0YXRpYyB2b2lkIGNsZWFuX2h5cGVydGV4X3NvY2tldCh2
b2lkKTsKIHN0YXRpYyB2b2lkIHJlYWRfZnJvbV9zcGFkX2lvKGludCBwdGNOdW0pOwogc3RhdGlj
IHZvaWQgcmVhZF9mcm9tX21hbmFnZXIoaW50IHB0Y051bSk7CiBzdGF0aWMgdm9pZCBtYW5hZ2Vf
c3BhZF9pbyhpbnQgcHRjTnVtKTsK
------=_Part_39103_7054220.1189709959257

ZGlmZiAtLWdpdCBhL3NyYy9oeXBlci9oeXBlci5wYW1waGxldCBiL3NyYy9oeXBlci9oeXBlci5w
YW1waGxldAppbmRleCAyMTI2ZGYxLi41M2VjZDlhIDEwMDY0NAotLS0gYS9zcmMvaHlwZXIvaHlw
ZXIucGFtcGhsZXQKKysrIGIvc3JjL2h5cGVyL2h5cGVyLnBhbXBobGV0CkBAIC05NDgsOSArOTQ4
LDExIEBAIG1ha2Vfc2VydmVyX2Nvbm5lY3Rpb25zKHZvaWQpCiAgICAgICAgIGZwcmludGYoc3Rk
ZXJyLCAiKEh5cGVyRG9jKSBXYXJuaW5nOiBOb3QgY29ubmVjdGVkIHRvIEFYSU9NIFNlcnZlciFc
biIpOwogICAgICAgICBNZW51U2VydmVyT3BlbmVkID0gMDsKICAgICB9Ci0gICAgZWxzZQotICAg
ICAgICBNZW51U2VydmVyT3BlbmVkID0gMTsKKyAgICBlbHNlIHsKIAorICAgICAgICBhdGV4aXQo
JmNsZWFuX3NvY2tldCk7CisgICAgICAgIE1lbnVTZXJ2ZXJPcGVuZWQgPSAxOworICAgIH0KIAog
ICAgIC8qCiAgICAgICogSWYgSSBoYXZlIG9wZW5lZCB0aGUgTWVudVNlcnZlciBzb2NrZXQsIHRo
ZW4gSSBzaG91bGQgYWxzbyB0cnkgdG8gb3Blbgo=
------=_Part_39103_7054220.1189709959257--

\start
Date: Thu, 13 Sep 2007 22:35:25 -0500
From: Tim Daly
To: list
Subject: 20070913.01.tpd.patch

This patch tests the equations 14.39-14.80 from Spiegel's Mathematical
Handbook of the Schaum's Outline Series, the 1968 edition. Each equation
is shown to give a zero difference from the book answer where possible.

Note that the book results for 14.73, 14.77, and 14.79 are incorrect.
The correct results are given here.

=========================================================================
diff --git a/changelog b/changelog
index 6ff3473..1a831be 100644
--- a/changelog
+++ b/changelog
@@ -1,3 +1,5 @@
+20070913 tpd src/input/Makefile schaum1.input added
+20070913 tpd src/input/schaum1.input added
 20070909 tpd src/algebra/newton.spad included in fffg.spad
 20070909 tpd src/algebra/Makefile remove newton.spad (duplicate)
 20070907 tpd src/algebra/acplot.spad fix PlaneAlgebraicCurvePlot.help NOISE
diff --git a/src/input/Makefile.pamphlet b/src/input/Makefile.pamphlet
index 2123928..16a3b98 100644
--- a/src/input/Makefile.pamphlet
+++ b/src/input/Makefile.pamphlet
@@ -345,6 +345,7 @@ REGRES= algaggr.regress algbrbf.regress  algfacob.regress alist.regress  \
     r21bugsbig.regress r21bugs.regress radff.regress    radix.regress \
     realclos.regress  reclos.regress   repa6.regress    robidoux.regress \
     roman.regress     roots.regress    ruleset.regress  rules.regress \
+    schaum1.regress \
     scherk.regress    scope.regress    segbind.regress  seg.regress \
     series2.regress   series.regress   sersolve.regress set.regress \
     sincosex.regress  sint.regress     skew.regress     slowint.regress \
@@ -601,7 +602,8 @@ FILES= ${OUT}/algaggr.input  ${OUT}/algbrbf.input    ${OUT}/algfacob.input \
        ${OUT}/radff.input    ${OUT}/radix.input      ${OUT}/realclos.input \
        ${OUT}/reclos.input   ${OUT}/regset.input     \
        ${OUT}/robidoux.input ${OUT}/roman.input      ${OUT}/roots.input \
-       ${OUT}/ruleset.input  ${OUT}/rules.input      ${OUT}/saddle.input \
+       ${OUT}/ruleset.input  ${OUT}/rules.input      ${OUT}/schaum1.input \
+       ${OUT}/saddle.input \
        ${OUT}/scherk.input   ${OUT}/scope.input \
        ${OUT}/segbind.input  ${OUT}/seg.input        ${OUT}/series2.input \
        ${OUT}/series.input   ${OUT}/sersolve.input   ${OUT}/set.input \
@@ -879,6 +881,7 @@ DOCFILES= \
   ${DOC}/robidoux.input.dvi    ${DOC}/roman.input.dvi      \
   ${DOC}/romnum.as.dvi         ${DOC}/roots.input.dvi      \
   ${DOC}/ruleset.input.dvi     ${DOC}/rules.input.dvi      \
+  ${DOC}/schaum1.input.dvi \
   ${DOC}/s01eaf.input.dvi      ${DOC}/s13aaf.input.dvi     \
   ${DOC}/s13acf.input.dvi      ${DOC}/s13adf.input.dvi     \
   ${DOC}/s14aaf.input.dvi      ${DOC}/s14abf.input.dvi     \
diff --git a/src/input/schaum1.input.pamphlet b/src/input/schaum1.input.pamphlet
new file mode 100644
index 0000000..8507428
--- /dev/null
+++ b/src/input/schaum1.input.pamphlet
@@ -0,0 +1,1265 @@
+\documentclass{article}
+\usepackage{axiom}
+\begin{document}
+\title{\$SPAD/input schaum1.input}
+\author{Timothy Daly}
+\maketitle
+\eject
+\tableofcontents
+\eject
+\section{\cite{1}:14.59~~~~~$\displaystyle\int{\frac{dx}{ax+b}~dx}$}
+$$\int{\frac{dx}{ax+b}~dx}==\frac{1}{a}~\ln(ax+b)$$
+<<*>>=
+)spool schaum1.output
+)set message test on
+)set message auto off
+)clear all
+
+--S 1
+integrate(1/(a*x+b),x)
+--R
+--R        log(a x + b)
+--R   (1)  ------------
+--R              a
+--R                                          Type: Union(Expression Integer,...)
+--E 1
+@
+\section{\cite{1}:14.60~~~~~$\displaystyle\int{\frac{x~dx}{ax+b}}$}
+$$\int{\frac{x~dx}{ax+b}}=\frac{x}{a}-\frac{b}{a^2}~\ln(ax+b)$$
+<<*>>=
+)clear all
+
+--S 2
+integrate(x/(a*x+b),x)
+--R 
+--R
+--R        - b log(a x + b) + a x
+--R   (1)  ----------------------
+--R                   2
+--R                  a
+--R                                          Type: Union(Expression Integer,...)
+--E 2
+@
+\section{\cite{1}:14.61~~~~~$\displaystyle\int{\frac{x^2~dx}{ax+b}}$}
+$$\int{\frac{x^2~dx}{ax+b}}=
+\frac{(ax+b)^2}{2a^3}-\frac{2b(ax+b)}{a^3}+\frac{b^2}{a^3}~\ln(ax+b)$$
+<<*>>=
+)clear all
+
+--S 3
+nn:=integrate(x^2/(a*x+b),x)
+--R
+--R          2                2 2
+--R        2b log(a x + b) + a x  - 2a b x
+--R   (1)  -------------------------------
+--R                        3
+--R                      2a
+--R                                          Type: Union(Expression Integer,...)
+--E 3
+@
+To see that these are the same answers we put the prior result over
+a common fraction:
+<<*>>=
+--S 4
+mm:=((a*x+b)^2-2*2*b*(a*x+b)+2*b^2*log(a*x+b))/(2*a^3)
+--R
+--R          2                2 2              2
+--R        2b log(a x + b) + a x  - 2a b x - 3b
+--R   (2)  -------------------------------------
+--R                           3
+--R                         2a
+--R                                                     Type: Expression Integer
+--E 4
+@
+and we take their difference:
+<<*>>=
+--S 5
+pp:=mm-nn
+--R
+--R            2
+--R          3b
+--R   (3)  - ---
+--R            3
+--R          2a
+--R                                                     Type: Expression Integer
+--E 5
+@
+which is a constant with respect to x, and thus the constant C.
+<<*>>=
+--S 6
+D(pp,x)
+--R
+--R   (4)  0
+--R                                                     Type: Expression Integer
+--E 6
+@
+Alternatively we can differentiate the answers with respect to x:
+<<*>>=
+--S 7
+D(nn,x)
+--R
+--R            2
+--R           x
+--R   (5)  -------
+--R        a x + b
+--R                                                     Type: Expression Integer
+--E 7
+@
+<<*>>=
+--S 8
+D(mm,x)
+--R
+--R            2
+--R           x
+--R   (6)  -------
+--R        a x + b
+--R                                                     Type: Expression Integer
+--E 8
+@
+and see that they are indeed the same.
+
+\section{\cite{1}:14.62~~~~~$\displaystyle\int{\frac{x^3~dx}{ax+b}}$}
+$$\int{\frac{x^3~dx}{ax+b}}=
+\frac{(ax+b)^3}{3a^4}-\frac{3b(ax+b)^2}{2a^4}+
+\frac{3b^2(ax+b)}{a^4}-\frac{b^3}{a^4}~\ln(ax+b)$$
+<<*>>=
+)clear all
+
+--S 9
+aa:=integrate(x^3/(a*x+b),x)
+--R
+--R            3                 3 3     2   2       2
+--R        - 6b log(a x + b) + 2a x  - 3a b x  + 6a b x
+--R   (1)  --------------------------------------------
+--R                               4
+--R                             6a
+--R                                          Type: Union(Expression Integer,...)
+--E 9
+@
+and the book expression is:
+<<*>>=
+--S 10
+bb:=(a*x+b)^3/(3*a^4)-(3*b*(a*x+b)^2)/(2*a^4)+(3*b^2*(a*x+b))/a^4-(b^3/a^4)*log(a*x+b)
+--R
+--R            3                 3 3     2   2       2       3
+--R        - 6b log(a x + b) + 2a x  - 3a b x  + 6a b x + 11b
+--R   (2)  ---------------------------------------------------
+--R                                  4
+--R                                6a
+--R                                                     Type: Expression Integer
+--E 10
+@
+
+The difference is a constant with respect to x:
+<<*>>=
+--S 11
+aa-bb
+--R
+--R             3
+--R          11b
+--R   (3)  - ----
+--R             4
+--R           6a
+--R                                                     Type: Expression Integer
+--E 11
+@
+
+If we differentiate each expression we see
+<<*>>=
+--S 12
+cc:=D(aa,x)
+--R
+--R            3
+--R           x
+--R   (4)  -------
+--R        a x + b
+--R                                                     Type: Expression Integer
+--E 12
+@
+<<*>>=
+--S 13
+dd:=D(bb,x)
+--R
+--R            3
+--R           x
+--R   (5)  -------
+--R        a x + b
+--R                                                     Type: Expression Integer
+--E 13
+@
+<<*>>=
+--S 14
+cc-dd
+--R
+--R   (6)  0
+--R                                                     Type: Expression Integer
+--E 14
+@
+
+\section{\cite{1}:14.63~~~~~$\displaystyle\int{\frac{dx}{x~(ax+b)}}$}
+$$\int{\frac{dx}{x~(ax+b)}}=\frac{1}{b}~\ln\left(\frac{x}{ax+b}\right)$$
+<<*>>=
+)clear all
+
+--S 15
+ff:=integrate(1/(x*(a*x+b)),x)
+--R
+--R        - log(a x + b) + log(x)
+--R   (1)  -----------------------
+--R                   b
+--R                                          Type: Union(Expression Integer,...)
+--E 15
+@
+but we know that $$\log(a)-\log(b)=\log(\frac{a}{b})$$
+
+We can express this fact as a rule:
+<<*>>=
+--S 16
+logdiv:=rule(log(a)-log(b) == log(a/b))
+--R
+--R                                      a
+--I   (2)  - log(b) + log(a) + %I == log(-) + %I
+--R                                      b
+--R                        Type: RewriteRule(Integer,Integer,Expression Integer)
+--E 16
+@
+and use this rule to rewrite the logs into divisions:
+<<*>>=
+--S 17
+logdiv ff
+--R
+--R               x
+--R        log(-------)
+--R            a x + b
+--R   (3)  ------------
+--R              b
+--R                                                     Type: Expression Integer
+--E 17
+@
+so we can see the equivalence directly.
+
+\section{\cite{1}:14.64~~~~~$\displaystyle\int{\frac{dx}{x^2~(ax+b)}}$}
+$$\int{\frac{dx}{x^2~(ax+b)}}=
+-\frac{1}{bx}+\frac{a}{b^2}~\ln\left(\frac{ax+b}{x}\right)$$
+<<*>>=
+)clear all
+
+--S 18
+aa:=integrate(1/(x^2*(a*x+b)),x)
+--R
+--R        a x log(a x + b) - a x log(x) - b
+--R   (1)  ---------------------------------
+--R                        2
+--R                       b x
+--R                                          Type: Union(Expression Integer,...)
+--E 18
+@
+
+The original form given in the book expands to:
+<<*>>=
+--S 19
+bb:=-1/(b*x)+a/b^2*log((a*x+b)/x)
+--R
+--R                a x + b
+--R        a x log(-------) - b
+--R                   x
+--R   (2)  --------------------
+--R                  2
+--R                 b x
+--R                                                     Type: Expression Integer
+--E 19
+@
+
+We can define the following rule to expand log forms:
+<<*>>=
+--S 20
+divlog:=rule(log(a/b) == log(a) - log(b))
+--R
+--R            a
+--R   (3)  log(-) == - log(b) + log(a)
+--R            b
+--R                        Type: RewriteRule(Integer,Integer,Expression Integer)
+--E 20
+@
+and apply it to the book form:
+<<*>>=
+--S 21
+cc:= divlog bb
+--R
+--R        a x log(a x + b) - a x log(x) - b
+--R   (4)  ---------------------------------
+--R                        2
+--R                       b x
+--R                                                     Type: Expression Integer
+--E 21
+@
+and we can now see that the results are identical.
+<<*>>=
+--S 22
+aa-cc
+--R
+--R   (5)  0
+--R                                                     Type: Expression Integer
+--E 22
+@
+
+\section{\cite{1}:14.65~~~~~$\displaystyle\int{\frac{dx}{x^3~(ax+b)}}$}
+$$\int{\frac{dx}{x^3~(ax+b)}}=
+\frac{2ax-b}{2b^2x^2}+\frac{a^2}{b^3}~\ln\left(\frac{x}{ax+b}\right)$$
+<<*>>=
+)clear all
+--S 23
+aa:=integrate(1/(x^3*(a*x+b)),x)
+--R
+--R            2 2                 2 2                   2
+--R        - 2a x log(a x + b) + 2a x log(x) + 2a b x - b
+--R   (1)  -----------------------------------------------
+--R                               3 2
+--R                             2b x
+--R                                          Type: Union(Expression Integer,...)
+--E 23
+@
+
+<<*>>=
+--S 24
+bb:=(2*a*x-b)/(2*b^2*x^2)+a^2/b^3*log(x/(a*x+b))
+--R
+--R          2 2       x                 2
+--R        2a x log(-------) + 2a b x - b
+--R                 a x + b
+--R   (2)  -------------------------------
+--R                       3 2
+--R                     2b x
+--R                                                     Type: Expression Integer
+--E 24
+@
+
+<<*>>=
+--S 25
+divlog:=rule(log(a/b) == log(a) - log(b))
+--R
+--R            a
+--R   (3)  log(-) == - log(b) + log(a)
+--R            b
+--R                        Type: RewriteRule(Integer,Integer,Expression Integer)
+--E 25
+@
+
+<<*>>=
+--S 26
+cc:=divlog bb
+--R
+--R            2 2                 2 2                   2
+--R        - 2a x log(a x + b) + 2a x log(x) + 2a b x - b
+--R   (4)  -----------------------------------------------
+--R                               3 2
+--R                             2b x
+--R                                                     Type: Expression Integer
+--E 26
+@
+
+<<*>>=
+--S 27
+cc-aa
+--R
+--R   (5)  0
+--R                                                     Type: Expression Integer
+--E 27
+@
+
+\section{\cite{1}:14.66~~~~~$\displaystyle\int{\frac{dx}{(ax+b)^2}}$}
+$$\int{\frac{dx}{(ax+b)^2}}=\frac{-1}{a~(ax+b)}$$
+<<*>>=
+)clear all
+
+--S 28
+integrate(1/(a*x+b)^2,x)
+--R
+--R              1
+--R   (1)  - ---------
+--R           2
+--R          a x + a b
+--R                                          Type: Union(Expression Integer,...)
+--E 28
+@
+
+\section{\cite{1}:14.67~~~~~$\displaystyle\int{\frac{x~dx}{(ax+b)^2}}$}
+$$\int{\frac{x~dx}{(ax+b)^2}}=
+\frac{b}{a^2~(ax+b)}+\frac{1}{a^2}~\ln(ax+b)$$
+<<*>>=
+)clear all
+
+--S 29
+integrate(x/(a*x+b)^2,x)
+--R
+--R        (a x + b)log(a x + b) + b
+--R   (1)  -------------------------
+--R                 3     2
+--R                a x + a b
+--R                                          Type: Union(Expression Integer,...)
+--E 29
+@
+and the book form expands to:
+<<*>>=
+--S 30
+b/(a^2*(a*x+b))+(1/a^2)*log(a*x+b)
+--R
+--R        (a x + b)log(a x + b) + b
+--R   (2)  -------------------------
+--R                 3     2
+--R                a x + a b
+--R                                                     Type: Expression Integer
+--E 30
+@
+
+\section{\cite{1}:14.68~~~~~$\displaystyle\int{\frac{x^2~dx}{(ax+b)^2}}$}
+$$\int{\frac{x^2~dx}{(ax+b)^2}}=
+\frac{ax+b}{a^3}-\frac{b^2}{a^3~(ax+b)}
+-\frac{2b}{a^3}~\ln(ax+b)$$
+<<*>>=
+)clear all
+
+--S 31
+aa:=integrate(x^2/(a*x+b)^2,x)
+--R
+--R                      2                 2 2            2
+--R        (- 2a b x - 2b )log(a x + b) + a x  + a b x - b
+--R   (1)  ------------------------------------------------
+--R                             4     3
+--R                            a x + a b
+--R                                          Type: Union(Expression Integer,...)
+--E 31
+@
+and the book expression expands into
+<<*>>=
+--S 32
+bb:=(a*x+b)/a^3-b^2/(a^3*(a*x+b))-((2*b)/a^3)*log(a*x+b)
+--R
+--R                      2                 2 2
+--R        (- 2a b x - 2b )log(a x + b) + a x  + 2a b x
+--R   (2)  --------------------------------------------
+--R                           4     3
+--R                          a x + a b
+--R                                                     Type: Expression Integer
+--E 32
+@
+
+These two expressions differ by the constant
+<<*>>=
+--S 33
+aa-bb
+--R
+--R           b
+--R   (3)  - --
+--R           3
+--R          a
+--R                                                     Type: Expression Integer
+--E 33
+@
+
+These are the same integrands as can be shown by differentiation:
+<<*>>=
+--S 34
+D(aa,x)
+--R
+--R                 2
+--R                x
+--R   (4)  ------------------
+--R         2 2             2
+--R        a x  + 2a b x + b
+--R                                                     Type: Expression Integer
+--E 34
+@
+
+<<*>>=
+--S 35
+D(bb,x)
+--R
+--R                 2
+--R                x
+--R   (5)  ------------------
+--R         2 2             2
+--R        a x  + 2a b x + b
+--R                                                     Type: Expression Integer
+--E 35
+@
+
+\section{\cite{1}:14.69~~~~~$\displaystyle\int{\frac{x^3~dx}{(ax+b)^2}}$}
+$$\int{\frac{x^3~dx}{(ax+b)^2}}=
+\frac{(ax+b)^2}{2a^4}-\frac{3b(ax+b)}{a^4}+\frac{b^3}{a^4(ax+b)}
++\frac{3b^2}{a^4}~\ln(ax+b)$$
+<<*>>=
+)clear all
+
+--S 36
+aa:=integrate(x^3/(a*x+b)^2,x)
+--R
+--R             2      3                 3 3     2   2       2      3
+--R        (6a b x + 6b )log(a x + b) + a x  - 3a b x  - 4a b x + 2b
+--R   (1)  ----------------------------------------------------------
+--R                                  5      4
+--R                                2a x + 2a b
+--R                                          Type: Union(Expression Integer,...)
+--E 36
+@
+
+<<*>>=
+--S 37
+bb:=(a*x+b)^2/(2*a^4)-(3*b*(a*x+b))/a^4+b^3/(a^4*(a*x+b))+(3*b^2/a^4)*log(a*x+b)
+--R
+--R             2      3                 3 3     2   2       2      3
+--R        (6a b x + 6b )log(a x + b) + a x  - 3a b x  - 9a b x - 3b
+--R   (2)  ----------------------------------------------------------
+--R                                  5      4
+--R                                2a x + 2a b
+--R                                                     Type: Expression Integer
+--E 37
+@
+
+<<*>>=
+--S 38
+aa-bb
+--R
+--R          2
+--R        5b
+--R   (3)  ---
+--R          4
+--R        2a
+--R                                                     Type: Expression Integer
+--E 38
+@
+
+<<*>>=
+--S 39
+cc:=D(aa,x)
+--R
+--R                 3
+--R                x
+--R   (4)  ------------------
+--R         2 2             2
+--R        a x  + 2a b x + b
+--R                                                     Type: Expression Integer
+--E 39
+@
+
+<<*>>=
+--S 40
+dd:=D(bb,x)
+--R
+--R                 3
+--R                x
+--R   (5)  ------------------
+--R         2 2             2
+--R        a x  + 2a b x + b
+--R                                                     Type: Expression Integer
+--E 40
+@
+
+<<*>>=
+--S 41
+cc-dd
+--R
+--R   (6)  0
+--R                                                     Type: Expression Integer
+--E 41
+@
+
+\section{\cite{1}:14.70~~~~~$\displaystyle\int{\frac{dx}{x~(ax+b)^2}}$}
+$$\int{\frac{dx}{x~(ax+b)^2}}=
+\frac{1}{b~(ax+b)}+\frac{1}{b^2}~\ln\left(\frac{x}{ax+b}\right)$$
+<<*>>=
+)clear all
+
+--S 42
+aa:=integrate(1/(x*(a*x+b)^2),x)
+--R
+--R        (- a x - b)log(a x + b) + (a x + b)log(x) + b
+--R   (1)  ---------------------------------------------
+--R                             2     3
+--R                          a b x + b
+--R                                          Type: Union(Expression Integer,...)
+--E 42
+@
+and the book says:
+<<*>>=
+--S 43
+bb:=(1/(b*(a*x+b))+(1/b^2)*log(x/(a*x+b)))
+--R
+--R                        x
+--R        (a x + b)log(-------) + b
+--R                     a x + b
+--R   (2)  -------------------------
+--R                   2     3
+--R                a b x + b
+--R                                                     Type: Expression Integer
+--E 43
+@
+
+So we look at the divlog rule again:
+<<*>>=
+--S 44
+divlog:=rule(log(a/b) == log(a) - log(b))
+--R
+--R            a
+--R   (3)  log(-) == - log(b) + log(a)
+--R            b
+--R                        Type: RewriteRule(Integer,Integer,Expression Integer)
+--E 44
+@
+
+we apply it:
+<<*>>=
+--S 45
+cc:=divlog bb
+--R
+--R        (- a x - b)log(a x + b) + (a x + b)log(x) + b
+--R   (4)  ---------------------------------------------
+--R                             2     3
+--R                          a b x + b
+--R                                                     Type: Expression Integer
+--E 45
+@
+and we difference the two to find they are identical:
+<<*>>=
+--S 46
+cc-aa
+--R
+--R   (5)  0
+--R                                                     Type: Expression Integer
+--E 46
+@
+
+\section{\cite{1}:14.71~~~~~$\displaystyle\int{\frac{dx}{x^2~(ax+b)^2}}$}
+$$\int{\frac{dx}{x^2~(ax+b)^2}}=
+\frac{-a}{b^2~(ax+b)}-\frac{1}{b^2~x}+
+\frac{2a}{b^3}~\ln\left(\frac{ax+b}{x}\right)$$
+<<*>>=
+)clear all
+
+--S 47
+aa:=integrate(1/(x^2*(a*x+b)^2),x)
+--R
+--R           2 2                              2 2                             2
+--R        (2a x  + 2a b x)log(a x + b) + (- 2a x  - 2a b x)log(x) - 2a b x - b
+--R   (1)  ---------------------------------------------------------------------
+--R                                        3 2    4
+--R                                     a b x  + b x
+--R                                          Type: Union(Expression Integer,...)
+--E 47
+@
+and the book says:
+<<*>>=
+--S 48
+bb:=(-a/(b^2*(a*x+b)))-(1/(b^2*x))+((2*a)/b^3)*log((a*x+b)/x)
+--R
+--R           2 2              a x + b              2
+--R        (2a x  + 2a b x)log(-------) - 2a b x - b
+--R                               x
+--R   (2)  ------------------------------------------
+--R                          3 2    4
+--R                       a b x  + b x
+--R                                                     Type: Expression Integer
+--E 48
+@
+which calls for our divlog rule:
+<<*>>=
+--S 49
+divlog:=rule(log(a/b) == log(a) - log(b))
+--R
+--R            a
+--R   (3)  log(-) == - log(b) + log(a)
+--R            b
+--R                        Type: RewriteRule(Integer,Integer,Expression Integer)
+--E 49
+@
+which we use to transform the result:
+<<*>>=
+--S 50
+cc:=divlog bb
+--R
+--R           2 2                              2 2                             2
+--R        (2a x  + 2a b x)log(a x + b) + (- 2a x  - 2a b x)log(x) - 2a b x - b
+--R   (4)  ---------------------------------------------------------------------
+--R                                        3 2    4
+--R                                     a b x  + b x
+--R                                                     Type: Expression Integer
+--E 50
+@
+and we show they are identical:
+<<*>>=
+--S 51
+dd:=aa-cc
+--R
+--R   (5)  0
+--R                                                     Type: Expression Integer
+--E 51
+@
+
+\section{\cite{1}:14.72~~~~~$\displaystyle\int{\frac{dx}{x^3~(ax+b)^2}}$}
+$$\int{\frac{dx}{x^3~(ax+b)^2}}=
+-\frac{(ax+b)^2}{2b^4x^2}+\frac{3a(ax+b)}{b^4x}-
+\frac{a^3x}{b^4(ax+b)}-\frac{3a^2}{b^4}~\ln\left(\frac{ax+b}{x}\right)$$
+<<*>>=
+)clear all
+
+--S 52
+aa:=integrate(1/(x^3*(a*x+b)^2),x)
+--R
+--R   (1)
+--R            3 3     2   2                   3 3     2   2            2   2
+--R       (- 6a x  - 6a b x )log(a x + b) + (6a x  + 6a b x )log(x) + 6a b x
+--R     + 
+--R           2     3
+--R       3a b x - b
+--R  /
+--R         4 3     5 2
+--R     2a b x  + 2b x
+--R                                          Type: Union(Expression Integer,...)
+--E 52
+@
+
+<<*>>=
+--S 53
+bb:=-(a*x+b)^2/(2*b^4*x^2)+(3*a*(a*x+b))/(b^4*x)-(a^3*x)/(b^4*(a*x+b))-((3*a^2)/b^4)*log((a*x+b)/x)
+--R
+--R             3 3     2   2     a x + b      3 3     2   2       2     3
+--R        (- 6a x  - 6a b x )log(-------) + 3a x  + 9a b x  + 3a b x - b
+--R                                  x
+--R   (2)  ---------------------------------------------------------------
+--R                                    4 3     5 2
+--R                                2a b x  + 2b x
+--R                                                     Type: Expression Integer
+--E 53
+@
+
+<<*>>=
+--S 54
+divlog:=rule(log(a/b) == log(a) - log(b))
+--R
+--R            a
+--R   (3)  log(-) == - log(b) + log(a)
+--R            b
+--R                        Type: RewriteRule(Integer,Integer,Expression Integer)
+--E 54
+@
+
+<<*>>=
+--S 55
+cc:=divlog bb
+--R
+--R   (4)
+--R            3 3     2   2                   3 3     2   2            3 3
+--R       (- 6a x  - 6a b x )log(a x + b) + (6a x  + 6a b x )log(x) + 3a x
+--R     + 
+--R         2   2       2     3
+--R       9a b x  + 3a b x - b
+--R  /
+--R         4 3     5 2
+--R     2a b x  + 2b x
+--R                                                     Type: Expression Integer
+--E 55
+@
+
+<<*>>=
+--S 56
+cc-aa
+--R
+--R          2
+--R        3a
+--R   (5)  ---
+--R          4
+--R        2b
+--R                                                     Type: Expression Integer
+--E 56
+@
+
+<<*>>=
+--S 57
+dd:=D(aa,x)
+--R
+--R                  1
+--R   (6)  ---------------------
+--R         2 5         4    2 3
+--R        a x  + 2a b x  + b x
+--R                                                     Type: Expression Integer
+--E 57
+@
+
+<<*>>=
+--S 58
+ee:=D(bb,x)
+--R
+--R                  1
+--R   (7)  ---------------------
+--R         2 5         4    2 3
+--R        a x  + 2a b x  + b x
+--R                                                     Type: Expression Integer
+--E 58
+@
+
+<<*>>=
+--S 59
+dd-ee
+--R
+--R   (8)  0
+--R                                                     Type: Expression Integer
+--E 59
+@
+
+\section{\cite{1}:14.73~~~~~$\displaystyle\int{\frac{dx}{(ax+b)^3}}$}
+$$\int{\frac{dx}{(ax+b)^3}}=\frac{-1}{2a(ax+b)^2}$$
+<<*>>=
+)clear all
+
+--S 60
+aa:=integrate(1/(a*x+b)^3,x)
+--R
+--R                     1
+--R   (1)  - ----------------------
+--R            3 2     2          2
+--R          2a x  + 4a b x + 2a b
+--R                                          Type: Union(Expression Integer,...)
+--E 60
+@
+
+{\bf NOTE: }There is a missing factor of $1/a$ in the published book.
+This factor has been inserted here.
+<<*>>=
+--S 61
+bb:=-1/(2*a*(a*x+b)^2)
+--R
+--R                     1
+--R   (2)  - ----------------------
+--R            3 2     2          2
+--R          2a x  + 4a b x + 2a b
+--R                                            Type: Fraction Polynomial Integer
+--E 61
+@
+
+<<*>>=
+--S 62
+aa-bb
+--R
+--R   (3)  0
+--R                                                     Type: Expression Integer
+--E 62
+@
+
+\section{\cite{1}:14.74~~~~~$\displaystyle\int{\frac{x~dx}{(ax+b)^3}}$}
+$$\int{\frac{x~dx}{(ax+b)^3}}=
+\frac{-1}{a^2(ax+b)}+\frac{b}{2a^2(ax+b)^2}$$
+<<*>>=
+)clear all
+
+--S 63
+aa:=integrate(x/(a*x+b)^3,x)
+--R
+--R              - 2a x - b
+--R   (1)  ----------------------
+--R          4 2     3        2 2
+--R        2a x  + 4a b x + 2a b
+--R                                          Type: Union(Expression Integer,...)
+--E 63
+@
+
+<<*>>=
+--S 64
+bb:=-1/(a^2*(a*x+b))+b/(2*a^2*(a*x+b)^2)
+--R
+--R              - 2a x - b
+--R   (2)  ----------------------
+--R          4 2     3        2 2
+--R        2a x  + 4a b x + 2a b
+--R                                            Type: Fraction Polynomial Integer
+--E 64
+@
+
+<<*>>=
+--S 65
+aa-bb
+--R
+--R   (3)  0
+--R                                                     Type: Expression Integer
+--E 65
+@
+
+\section{\cite{1}:14.75~~~~~$\displaystyle\int{\frac{x^2~dx}{(ax+b)^3}}$}
+$$\int{\frac{x^2~dx}{(ax+b)^3}}=
+\frac{2b}{a^3(ax+b)}-\frac{b^2}{2a^3(ax+b)^2}+
+\frac{1}{a^3}~\ln(ax+b)$$
+<<*>>=
+)clear all
+
+--S 66
+aa:=integrate(x^2/(a*x+b)^3,x)
+--R
+--R           2 2              2                           2
+--R        (2a x  + 4a b x + 2b )log(a x + b) + 4a b x + 3b
+--R   (1)  -------------------------------------------------
+--R                        5 2     4        3 2
+--R                      2a x  + 4a b x + 2a b
+--R                                          Type: Union(Expression Integer,...)
+--E 66
+@
+
+<<*>>=
+--S 67
+bb:=(2*b)/(a^3*(a*x+b))-(b^2)/(2*a^3*(a*x+b)^2)+1/a^3*log(a*x+b)
+--R
+--R           2 2              2                           2
+--R        (2a x  + 4a b x + 2b )log(a x + b) + 4a b x + 3b
+--R   (2)  -------------------------------------------------
+--R                        5 2     4        3 2
+--R                      2a x  + 4a b x + 2a b
+--R                                                     Type: Expression Integer
+--E 67
+@
+
+<<*>>=
+--S 68
+aa-bb
+--R
+--R   (3)  0
+--R                                                     Type: Expression Integer
+--E 68
+@
+
+\section{\cite{1}:14.76~~~~~$\displaystyle\int{\frac{x^3~dx}{(ax+b)^3}}$}
+$$\int{\frac{x^3~dx}{(ax+b)^3}}=
+\frac{x}{a^3}-\frac{3b^2}{a^4(ax+b)}+\frac{b^3}{2a^4(ax+b)^2}-
+\frac{3b}{a^4}~\ln(ax+b)$$
+<<*>>=
+)clear all
+--S 69
+aa:=integrate(x^3/(a*x+b)^3,x)
+--R
+--R   (1)
+--R        2   2        2      3                  3 3     2   2       2      3
+--R   (- 6a b x  - 12a b x - 6b )log(a x + b) + 2a x  + 4a b x  - 4a b x - 5b
+--R   ------------------------------------------------------------------------
+--R                              6 2     5        4 2
+--R                            2a x  + 4a b x + 2a b
+--R                                          Type: Union(Expression Integer,...)
+--E 69
+@
+
+<<*>>=
+--S 70
+bb:=(x/a^3)-(3*b^2)/(a^4*(a*x+b))+b^3/(2*a^4*(a*x+b)^2)-(3*b)/a^4*log(a*x+b)
+--R
+--R   (2)
+--R        2   2        2      3                  3 3     2   2       2      3
+--R   (- 6a b x  - 12a b x - 6b )log(a x + b) + 2a x  + 4a b x  - 4a b x - 5b
+--R   ------------------------------------------------------------------------
+--R                              6 2     5        4 2
+--R                            2a x  + 4a b x + 2a b
+--R                                                     Type: Expression Integer
+--E 70
+@
+
+<<*>>=
+--S 71
+aa-bb
+--R
+--R   (3)  0
+--R                                                     Type: Expression Integer
+--E 71
+@
+
+\section{\cite{1}:14.77~~~~~$\displaystyle\int{\frac{dx}{x(ax+b)^3}}$}
+$$\int{\frac{dx}{x(ax+b)^3}}=
+\frac{3}{2b(ax+b)^2}+\frac{2ax}{2b^2(ax+b)^2}-
+\frac{1}{b^3}*\ln\left(\frac{ax+b}{x}\right)$$
+
+{\bf NOTE: }The equation given in the book is wrong. This is correct.
+
+<<*>>=
+)clear all
+
+--S 72
+aa:=integrate(1/(x*(a*x+b)^3),x)
+--R
+--R   (1)
+--R            2 2              2                   2 2              2
+--R       (- 2a x  - 4a b x - 2b )log(a x + b) + (2a x  + 4a b x + 2b )log(x)
+--R     + 
+--R                  2
+--R       2a b x + 3b
+--R  /
+--R       2 3 2       4      5
+--R     2a b x  + 4a b x + 2b
+--R                                          Type: Union(Expression Integer,...)
+--E 72
+@
+
+<<*>>=
+--S 73
+bb:=3/(2*b*(a*x+b)^2)+(2*a*x)/(2*b^2*(a*x+b)^2)-1/b^3*log((a*x+b)/x)
+--R
+--R             2 2              2     a x + b               2
+--R        (- 2a x  - 4a b x - 2b )log(-------) + 2a b x + 3b
+--R                                       x
+--R   (2)  ---------------------------------------------------
+--R                         2 3 2       4      5
+--R                       2a b x  + 4a b x + 2b
+--R                                                     Type: Expression Integer
+--E 73
+@
+
+<<*>>=
+--S 74
+divlog:=rule(log(a/b) == log(a) - log(b))
+--R
+--R            a
+--R   (3)  log(-) == - log(b) + log(a)
+--R            b
+--R                        Type: RewriteRule(Integer,Integer,Expression Integer)
+--E 74
+@
+
+<<*>>=
+--S 75
+cc:=divlog bb
+--R
+--R   (4)
+--R            2 2              2                   2 2              2
+--R       (- 2a x  - 4a b x - 2b )log(a x + b) + (2a x  + 4a b x + 2b )log(x)
+--R     + 
+--R                  2
+--R       2a b x + 3b
+--R  /
+--R       2 3 2       4      5
+--R     2a b x  + 4a b x + 2b
+--R                                                     Type: Expression Integer
+--E 75
+@
+
+<<*>>=
+--S 76
+aa-cc
+--R
+--R   (5)  0
+--R                                                     Type: Expression Integer
+--E 76
+@
+
+\section{\cite{1}:14.78~~~~~$\displaystyle\int{\frac{dx}{x^2(ax+b)^3}}$}
+$$\int{\frac{dx}{x^2(ax+b)^3}}=
+\frac{-a}{2b^2(ax+b)^2}-\frac{2a}{b^3(ax+b)}-
+\frac{1}{b^3x}+\frac{3a}{b^4}~\ln\left(\frac{ax+b}{x}\right)$$
+<<*>>=
+)clear all
+
+--S 77
+aa:=integrate(1/(x^2*(a*x+b)^3),x)
+--R
+--R   (1)
+--R          3 3      2   2       2
+--R       (6a x  + 12a b x  + 6a b x)log(a x + b)
+--R     + 
+--R            3 3      2   2       2             2   2       2      3
+--R       (- 6a x  - 12a b x  - 6a b x)log(x) - 6a b x  - 9a b x - 2b
+--R  /
+--R       2 4 3       5 2     6
+--R     2a b x  + 4a b x  + 2b x
+--R                                          Type: Union(Expression Integer,...)
+--E 77
+@
+
+<<*>>=
+--S 78
+bb:=-a/(2*b^2*(a*x+b)^2)-(2*a)/(b^3*(a*x+b))-1/(b^3*x)+((3*a)/b^4)*log((a*x+b)/x)
+--R
+--R           3 3      2   2       2      a x + b      2   2       2      3
+--R        (6a x  + 12a b x  + 6a b x)log(-------) - 6a b x  - 9a b x - 2b
+--R                                          x
+--R   (2)  ----------------------------------------------------------------
+--R                              2 4 3       5 2     6
+--R                            2a b x  + 4a b x  + 2b x
+--R                                                     Type: Expression Integer
+--E 78
+@
+
+<<*>>=
+--S 79
+divlog:=rule(log(a/b) == log(a) - log(b))
+--R
+--R            a
+--R   (3)  log(-) == - log(b) + log(a)
+--R            b
+--R                        Type: RewriteRule(Integer,Integer,Expression Integer)
+--E 79
+@
+
+<<*>>=
+--S 80
+cc:=divlog bb
+--R
+--R   (4)
+--R          3 3      2   2       2
+--R       (6a x  + 12a b x  + 6a b x)log(a x + b)
+--R     + 
+--R            3 3      2   2       2             2   2       2      3
+--R       (- 6a x  - 12a b x  - 6a b x)log(x) - 6a b x  - 9a b x - 2b
+--R  /
+--R       2 4 3       5 2     6
+--R     2a b x  + 4a b x  + 2b x
+--R                                                     Type: Expression Integer
+--E 80
+@
+
+<<*>>=
+--S 81
+cc-aa
+--R
+--R   (5)  0
+--R                                                     Type: Expression Integer
+--E 81
+@
+
+\section{\cite{1}:14.79~~~~~$\displaystyle\int{\frac{dx}{x^3(ax+b)^3}}$}
+$$\int{\frac{dx}{x^3(ax+b)^3}}=$$
+$$-\frac{1}{2bx^2(ax+b)^2}+
+\frac{2a}{b^2x(ax+b)^2}+
+\frac{9a^2}{b^3(ax+b)^2}+
+\frac{6a^3x}{b^4(ax+b)^2}-
+\frac{6a^2}{b^5}~\ln\left(\frac{ax+b}{x}\right)$$
+
+{\bf NOTE: }The equation given in the book is wrong. This is correct.
+
+<<*>>=
+)clear all
+
+--S 82
+aa:=integrate(1/(x^3*(a*x+b)^3),x)
+--R
+--R   (1)
+--R             4 4      3   3      2 2 2
+--R       (- 12a x  - 24a b x  - 12a b x )log(a x + b)
+--R     + 
+--R           4 4      3   3      2 2 2             3   3      2 2 2       3     4
+--R       (12a x  + 24a b x  + 12a b x )log(x) + 12a b x  + 18a b x  + 4a b x - b
+--R  /
+--R       2 5 4       6 3     7 2
+--R     2a b x  + 4a b x  + 2b x
+--R                                          Type: Union(Expression Integer,...)
+--E 82
+@
+
+<<*>>=
+--S 83
+bb:=-1/(2*b*x^2*(a*x+b)^2)_
+    +(2*a)/(b^2*x*(a*x+b)^2)_
+    +(9*a^2)/(b^3*(a*x+b)^2)_
+    +(6*a^3*x)/(b^4*(a*x+b)^2)_
+    +(-6*a^2)/b^5*log((a*x+b)/x)
+--R
+--R   (2)
+--R             4 4      3   3      2 2 2     a x + b       3   3      2 2 2
+--R       (- 12a x  - 24a b x  - 12a b x )log(-------) + 12a b x  + 18a b x
+--R                                              x
+--R     + 
+--R           3     4
+--R       4a b x - b
+--R  /
+--R       2 5 4       6 3     7 2
+--R     2a b x  + 4a b x  + 2b x
+--R                                                     Type: Expression Integer
+--E 83
+@
+<<*>>=
+--S 84
+cc:=aa-bb
+--R
+--R            2                 2           2    a x + b
+--R        - 6a log(a x + b) + 6a log(x) + 6a log(-------)
+--R                                                  x
+--R   (3)  -----------------------------------------------
+--R                                5
+--R                               b
+--R                                                     Type: Expression Integer
+--E 84
+@
+
+<<*>>=
+--S 85
+divlog:=rule(log(a/b) == log(a) - log(b))
+--R
+--R            a
+--R   (4)  log(-) == - log(b) + log(a)
+--R            b
+--R                        Type: RewriteRule(Integer,Integer,Expression Integer)
+--E 85
+@
+
+<<*>>=
+--S 86
+divlog cc
+--R
+--R   (5)  0
+--R                                                     Type: Expression Integer
+--E 86
+@
+
+\section{\cite{1}:14.80~~~~~$\displaystyle\int{(ax+b)^n~dx}$}
+$$\int{(ax+b)^n~dx}=
+\frac{(ax+b)^{n+1}}{(n+1)a}{\rm\ provided\ }n \ne -1$$
+<<*>>=
+)clear all
+--S 87
+aa:=integrate((a*x+b)^n,x)
+--R
+--R                   n log(a x + b)
+--R        (a x + b)%e
+--R   (1)  -------------------------
+--R                 a n + a
+--R                                          Type: Union(Expression Integer,...)
+--E 87
+@
+
+<<*>>=
+--S 88
+explog:=rule(%e^(n*log(x)) == x^n)
+--R
+--R          n log(x)     n
+--R   (2)  %e         == x
+--R                        Type: RewriteRule(Integer,Integer,Expression Integer)
+--E 88
+@
+
+<<*>>=
+--S 89 
+explog aa
+--R
+--R                          n
+--R        (a x + b)(a x + b)
+--R   (3)  -------------------
+--R              a n + a
+--R                                                     Type: Expression Integer
+--E 89
+@
+
+\section{\cite{1}:14.81~~~~~$\displaystyle\int{x(ax+b)^n~dx}$}
+$$\int{x(ax+b)^n~dx}=
+\frac{(ax+b)^{n+2}}{(n+2)a^2}-\frac{b(ax+b)^{n+1}}{(n+1)a^2}
+{\rm\ provided\ }n \ne -1,-2$$
+
+\section{\cite{1}:14.82~~~~~$\displaystyle\int{x^2(ax+b)^n~dx}$}
+$$\int{x^2(ax+b)^n~dx}=
+\frac{(ax+b)^{n+2}}{(n+3)a^3}-
+\frac{2b(ax+b)^{n+2}}{(n+2)a^3}+
+\frac{b^2(ax+b)^{n+1}}{(n+1)a^3}
+{\rm\ provided\ }n \ne -1,-2,-3$$
+
+<<*>>=
+)spool
+)lisp (bye)
+@
+
+\eject
+\begin{thebibliography}{99}
+\bibitem{1} Spiegel, Murray R.
+{\sl Mathematical Handbook of Formulas and Tables}\\
+Schaum's Outline Series McGraw-Hill 1968 pp60-61
+\end{thebibliography}
+\end{document}

\start
Date: Thu, 13 Sep 2007 21:53:21 -0700
From: Arthur Ralfs
To: list
Subject: Axiom server

This is a multi-part message in MIME format.
--------------040400070103020008060305

Here's a simple axiom  server example.  It consists of
three files, axserver.spad, http.lisp  and axiomax.xml, which I've
attached.  To test it out put the axserver.spad and http.lisp files
in a suitable place, like the directory from which you start axiom,
then issue the commands:

->  )set output mathml on
->  )lisp (load "http.lisp")
->  )compile axserver
->  axServer(8085,multiServ$AXSERV)

If I put the axiomax.xml file in my axiom directory then I enter the
URL http://127.0.0.1:8085/home/arthur/axiom/axiomax.xml into Firefox
to get the file.  Commands can then be entered via the text box.

Arthur Ralfs



--------------040400070103020008060305
 name="axiomax.xml"
 filename="axiomax.xml"

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1 plus MathML 2.0//EN" "http://www.w3.org/Math/DTD/mathml2/xhtml-math11-f.dtd" [
<!ENTITY mathml "http://www.w3.org/1998/Math/MathML">
<!ENTITY InvisibleTimes " ">
]>
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:xlink="http://www.w3.org/1999/xlink">
<head>
<title>Axiom Interface</title>
<script type="text/javascript">
<!--
 This software is to enable displaying Axiom output on the Firefox 
 web browser.  It falls under the GNU version 2 general public license and comes 
 WITHOUT ANY WARRANTY WHATSOEVER.
 COPYRIGHT : (C) 2006 Arthur C. Ralfs
-->

function init() {
}


function makeRequest() {
//    The following instantiation of the XMLHttpRequest object is for
//    browsers other than IE.  IE requires something different.
    http_request = new XMLHttpRequest();	 
    var command = document.getElementById('comm').value;
    http_request.open('POST', '127.0.0.1:8085', true);
    http_request.onreadystatechange = handleResponse;
//    http_request.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded');
//    http_request.send("command="+encodeURIComponent(command));
    http_request.setRequestHeader('Content-Type', 'text/plain');
    http_request.send("command="+command);
}

function handleResponse() {
    if (http_request.readyState == 4) {
	if (http_request.status == 200) {
// stick response in div=mathBox
	    var mathString = http_request.responseText;
            var mathRange = document.createRange();
	    var mathBox = document.createElementNS('http://www.w3.org/1999/xhtml','div');
            mathRange.selectNodeContents(mathBox);
            var mathFragment = mathRange.createContextualFragment(mathString);
            mathBox.appendChild(mathFragment);
// set id on mathBox
//	    var stepNum = mathBox.firstChild.firstChild.data;
//	    mathBox.setAttribute('id', 'step'+stepNum);
//	    mathBox.setAttribute('class', 'mathbox');
// remove old mathbox
            document.getElementById('mathAns').removeChild(document.getElementById('mathAns').firstChild)

// insert everything into the document

	    document.getElementById('mathAns').appendChild(mathBox);

// delete linenum box
//            mathBox.removeChild(mathBox.firstChild);

	} else
	{
	    alert('There was a problem with the request.'+ http_request.statusText);
	}
    }
}

</script>

</head>

<body id="body">
  <form id="commreq" action="javascript:makeRequest();">
    <p>
      Enter command: <input type="text" id="comm" name="command" size="80"/>
      <input type="submit" value="submit command"/>
    </p>
  </form>

<div id="mathAns"><div></div></div>



</body>

</html>
--------------040400070103020008060305
 name="axserver.spad"
 filename="axserver.spad"

)abbrev package AXSERV AxiomServer
AxiomServer: public == private where

  public == with

    axServer: (Integer, SExpression->Void) -> Void
    multiServ: SExpression -> Void
    fileserver: SExpression -> Void
    axget: SExpression -> Void
    axpost: SExpression -> Void


  private == add

    getFile: (SExpression,String) -> Void
    getCommand: (SExpression,String) -> Void
    lastStep: () -> String
    lastType: () -> String
    formatMessages: String -> String
    formatMessages1: String -> String


    axServer(port:Integer,serverfunc:SExpression->Void):Void ==
      WriteLine("socketServer")$Lisp
      s := SiSock(port,serverfunc)$Lisp
      -- To listen for just one connection and then close the socket
      -- uncomment i := 0.
      i:Integer := 1
      while (i > 0) repeat
        if not null?(SiListen(s)$Lisp)$SExpression then
          w := SiAccept(s)$Lisp
          serverfunc(w)
--	  i := 0

    multiServ(s:SExpression):Void ==
          WriteLine("multiServ")$Lisp
	  headers:String := ""
	  char:String
	  -- read in the http headers
          while (char := STRING(READ_-CHAR_-NO_-HANG(s,NIL$Lisp,'EOF)$Lisp)$Lisp) ^= "EOF" repeat
              headers := concat [headers,char]
	  sayTeX$Lisp headers
          StringMatch("([^ ]*)", headers)$Lisp
          u:UniversalSegment(Integer)
          u := segment(MatchBeginning(1)$Lisp+1,MatchEnd(1)$Lisp)$UniversalSegment(Integer)
          reqtype:String := headers.u
          sayTeX$Lisp  concat ["request type: ",reqtype]
          if  reqtype = "GET" then
              StringMatch("GET ([^ ]*)",headers)$Lisp
              u:UniversalSegment(Integer)
              u := segment(MatchBeginning(1)$Lisp+1,MatchEnd(1)$Lisp)$UniversalSegment(Integer)
              getFile(s,headers.u)
          if reqtype = "POST" then
              StringMatch("command=(.*)$",headers)$Lisp
              u:UniversalSegment(Integer)
              u := segment(MatchBeginning(1)$Lisp+1,MatchEnd(1)$Lisp)$UniversalSegment(Integer)
              getCommand(s,headers.u)

    getFile(s:SExpression,pathvar:String):Void ==
        WriteLine("getFile")$Lisp
        if not null? PATHNAME_-NAME(PATHNAME(pathvar)$Lisp)$Lisp then
        -- display contents of file
            q:=OPEN(pathvar)$Lisp
        else
            q:=MAKE_-STRING_-INPUT_-STREAM("Problem with file path")$Lisp
        file:String := ""
        while (char := STRING(READ_-CHAR_-NO_-HANG(q,NIL$Lisp,'EOF)$Lisp)$Lisp) ^= "EOF" repeat
            file := concat [file,char]
        CLOSE(q)$Lisp
        file := concat ["Content-Length: ",string(#file),STRING(NewLine$Lisp)$Lisp,STRING(NewLine$Lisp)$Lisp,file]
	file := concat ["Connection: close",STRING(NewLine$Lisp)$Lisp,file]
	file := concat ["Content-Type: application/xhtml+xml",STRING(NewLine$Lisp)$Lisp,file]
	file := concat ["HTTP/1.1 200 OK",STRING(NewLine$Lisp)$Lisp,file]
        f:=MAKE_-STRING_-INPUT_-STREAM(file)$Lisp
        SiCopyStream(f,s)$Lisp
        CLOSE(f)$Lisp
	CLOSE(s)$Lisp

    getCommand(s:SExpression,command:String):Void ==
        WriteLine$Lisp concat ["getCommand: ",command]
	SETQ(tmpmathml$Lisp, MAKE_-STRING_-OUTPUT_-STREAM()$Lisp)$Lisp
	SETQ(tmpalgebra$Lisp, MAKE_-STRING_-OUTPUT_-STREAM()$Lisp)$Lisp
	SETQ(savemathml$Lisp, _$texOutputStream$Lisp)$Lisp
	SETQ(savealgebra$Lisp, _$algebraOutputStream$Lisp)$Lisp
	SETQ(_$texOutputStream$Lisp,tmpmathml$Lisp)$Lisp
	SETQ(_$algebraOutputStream$Lisp,tmpalgebra$Lisp)$Lisp
--	parseAndInterpret$Lisp command
--	parseAndEvalStr$Lisp command
-- The previous two commands don't exit nicely when a syntactically incorrect command is
-- given to them.  They somehow need to be wrapped in CATCH statements but I haven't 
-- figured out how to do this.  parseAndEvalToStringEqNum  uses the following CATCH
-- statements to call parseAndEvalStr but when I try these they don't work.  I get a
-- "NIL is not a valid identifier to use in AXIOM" message. Using parseAndEvalToStringEqNum
-- works and doesn't crash on a syntax error.
--        v := CATCH('SPAD__READER, CATCH('top__level, parseAndEvalStr$Lisp command)$Lisp)$Lisp
--        v = 'restart => ['"error"]
        ans := string parseAndEvalToStringEqNum$Lisp command
	SETQ(resultmathml$Lisp,GET_-OUTPUT_-STREAM_-STRING(_$texOutputStream$Lisp)$Lisp)$Lisp
	SETQ(resultalgebra$Lisp,GET_-OUTPUT_-STREAM_-STRING(_$algebraOutputStream$Lisp)$Lisp)$Lisp
	SETQ(_$texOutputStream$Lisp,savemathml$Lisp)$Lisp
	SETQ(_$algebraOutputStream$Lisp,savealgebra$Lisp)$Lisp
	CLOSE(tmpmathml$Lisp)$Lisp
	CLOSE(tmpalgebra$Lisp)$Lisp
	-- Since strings returned from axiom are going to be displayed in html I
	-- should really check for the characters &,<,> and replace them with
	-- &amp;,&lt;,&gt;.  At present I only check for ampersands in formatMessages.
	mathml:String := string(resultmathml$Lisp)
	algebra:String := string(resultalgebra$Lisp)
	algebra := formatMessages(algebra)
	-- At this point mathml contains the mathml for the output but does not
	-- include step number or type information.  We should also save the command.
        -- I get the type and step number from the $internalHistoryTable
	axans:String := concat ["<div><div class=_"command_">Input: ",command,"</div><div class=_"stepnum_">Step number: ",lastStep(),"</div><div class=_"algebra_">",algebra,"</div><div class=_"mathml_">",mathml,"</div><div class=_"type_">Type: ",lastType(),"</div></div>"]
	WriteLine$Lisp concat ["mathml answer: ",mathml]
        WriteLine$Lisp concat ["algebra answer: ",algebra]
        q:=MAKE_-STRING_-INPUT_-STREAM(axans)$Lisp
        SiCopyStream(q,s)$Lisp
        CLOSE(q)$Lisp
	CLOSE(s)$Lisp


    lastType():String ==
--  The last history entry is the first item in the $internalHistoryTable list so 
--  car(_$internalHistoryTable$Lisp) selects it.  Here's an example:
--  (3 (x+y)**3 (% (value (Polynomial (Integer)) WRAPPED 1 y (3 0 . 1) (2 1 x (1 0 . 3)) (1 1 x (2 0 . 3)) (0 1 x (3 0 . 1)))))
--  This corresponds to the input "(x+y)**3" being issued as the third command after
--  starting axiom.  The following line selects the type information.
        string car(cdr(car(cdr(car(cdr(cdr(car(_$internalHistoryTable$Lisp)$Lisp)$Lisp)$Lisp)$Lisp)$Lisp)$Lisp)$Lisp)$Lisp


    lastStep():String ==
        string car(car(_$internalHistoryTable$Lisp)$Lisp)$Lisp
	

    formatMessages(str:String):String ==
        WriteLine("formatMessages")$Lisp
	-- I need to replace any ampersands with &amp; and may also need to
	-- replace < and > with &lt; and &gt;
	strlist:List String
	WriteLine(str)$Lisp
	strlist := split(str,char "&")
	str := ""
	for s in strlist repeat
	    str := concat [str,s,"&amp;"]
	strlen:Integer := #str
	str := str.(1..(#str - 5))
	WriteLine(str)$Lisp
	-- Here I split the string into lines and put each line in a "div".
	strlist := split(str, char string NewlineChar$Lisp)
	str := ""
	WriteLine("formatMessages1")$Lisp
	WriteLine(concat strlist)$Lisp
	for s in strlist repeat
	    WriteLine(s)$Lisp
	    str := concat [str,"<div>",s,"</div>"]
        str
        
--------------040400070103020008060305
 name="http.lisp"
 filename="http.lisp"

;; file: http.lisp

(defvar |StandardOutput| *standard-output*)

(defvar  |NewLine| '#\NewLine)

;; some regexp stuff

(defun |StringMatch| (s1 s2)
  (si::string-match s1 s2)
  )



(defun |ListMatches| (&rest args)
  (si::list-matches args)
  )

(defun |MatchBeginning| (i)
  (si::match-beginning i)
  )

(defun |MatchEnd| (i)
  (si::match-end i)
  )

;; the socket stuff


(defun |SiSock| (p spadfn)
;;  (format t "SiSocket-1")
  (si::socket p :server
	      (function
	       (lambda (w) (SPADCALL w spadfn) )
	       )
	      :daemon nil)
  )

(defun |SiListen| (s) 
;;  (format t "SiListen-1")
  (si::listen s)
  )
(defun |SiAccept| (s) (si::accept s))
(defun |SiCopyStream| (q s) (si::copy-stream q s))

;; Camm Maguire's modified demo server

(defun foo (s)
  (setq get "" pathvar "")
  (do ((c (read-char s) (read-char s)))
      ((eq c '#\Space))
      (setq get (concat get (string c)))
      )
  (write-line "get: ")
  (write-line get)
  (do ((c (read-char s) (read-char s nil 'the-end)))
      ((eq c '#\Space))
      (setq pathvar (concat pathvar (string c)))
      )
  (write-line "pathvar: ")
  (write-line pathvar)
  (when pathvar
    (if (pathname-name (pathname pathvar))
	(with-open-file (q pathvar) (si::copy-stream q s))
      (dolist (l (directory pathvar)) (format s "~a~%" (namestring l)))
      )
    )
  (close s)
  )
 

(defun bar (p fn) 
  (let ((s (si::socket p :server fn))) 
        (tagbody l 
                (when (si::listen s) 
                        (let ((w (si::accept s))) 
                                (foo w))) 
                (sleep 3) 
                (go l))))

;;(bar 8080 #'foo)
--------------040400070103020008060305--

\start
Date: Thu, 13 Sep 2007 22:30:24 -0700
From: Ed Borasky
To: list
Subject: GCL on an AMD64 Linux system?

Is there some reason the GCL in Axiom shouldn't build on a 64-bit Linux
system (gcc 4.2.0)? I've got three systems. Two are 32-bit and one is
64-bit. Both gold and silver build fine on the 32-bit ones, but both
crash building GCL on the 64-bit system. Here's a trace ("silver", if it
matters):

ar: creating libgcl.a
touch raw_gcl_map
gcc -o raw_gcl /home/axiom/silver/obj/linux/lib/cfuns-c.o
/home/axiom/silver/obj/linux/lib/sockio-c.o \
                -L.  -Wl,-Map raw_gcl_map   -lgcl -lm  -lgmp -lreadline
-lncurses -lc -lgclp /home/axiom/silver/obj/linux/lib/libspad.a
./libgcl.a(sys_gcl.o): In function `gcl_init_system':
sys_gcl.c:(.text+0x35bd): undefined reference to `init_gcl_cmpwt'
sys_gcl.c:(.text+0x363a): undefined reference to `init_gcl_predlib'
sys_gcl.c:(.text+0x36b7): undefined reference to `init_gcl_setf'
sys_gcl.c:(.text+0x3734): undefined reference to `init_gcl_assert'
sys_gcl.c:(.text+0x37b1): undefined reference to `init_gcl_arraylib'
sys_gcl.c:(.text+0x382e): undefined reference to `init_gcl_defstruct'
sys_gcl.c:(.text+0x38ab): undefined reference to `init_gcl_describe'
sys_gcl.c:(.text+0x3928): undefined reference to `init_gcl_numlib'
sys_gcl.c:(.text+0x39a5): undefined reference to `init_gcl_listlib'
sys_gcl.c:(.text+0x3a22): undefined reference to `init_gcl_seq'
sys_gcl.c:(.text+0x3a9f): undefined reference to `init_gcl_iolib'
sys_gcl.c:(.text+0x3b1c): undefined reference to `init_gcl_packlib'
sys_gcl.c:(.text+0x3b99): undefined reference to `init_gcl_mislib'
sys_gcl.c:(.text+0x3c16): undefined reference to `init_gcl_seqlib'
sys_gcl.c:(.text+0x3c93): undefined reference to `init_gcl_trace'
sys_gcl.c:(.text+0x3d10): undefined reference to `init_gcl_cmpenv'
sys_gcl.c:(.text+0x3d8d): undefined reference to `init_gcl_cmputil'
sys_gcl.c:(.text+0x3e0a): undefined reference to `init_gcl_cmploc'
sys_gcl.c:(.text+0x3e87): undefined reference to `init_gcl_loop'
sys_gcl.c:(.text+0x3f04): undefined reference to `init_gcl_cmpif'
sys_gcl.c:(.text+0x3f81): undefined reference to `init_gcl_cmpbind'
sys_gcl.c:(.text+0x3ffe): undefined reference to `init_gcl_cmptag'
sys_gcl.c:(.text+0x407b): undefined reference to `init_gcl_serror'
sys_gcl.c:(.text+0x40f8): undefined reference to `init_gcl_cmpflet'
sys_gcl.c:(.text+0x4175): undefined reference to `init_gcl_info'
sys_gcl.c:(.text+0x41f2): undefined reference to `init_gcl_cmpmulti'
sys_gcl.c:(.text+0x426f): undefined reference to `init_gcl_make_defpackage'
sys_gcl.c:(.text+0x42ec): undefined reference to `init_gcl_cmplam'
sys_gcl.c:(.text+0x4369): undefined reference to `init_gcl_cmpcall'
sys_gcl.c:(.text+0x43e6): undefined reference to `init_gcl_cmpvar'
sys_gcl.c:(.text+0x4463): undefined reference to `init_gcl_sloop'
sys_gcl.c:(.text+0x44e0): undefined reference to `init_gcl_cmpeval'
sys_gcl.c:(.text+0x455d): undefined reference to `init_gcl_debug'
sys_gcl.c:(.text+0x45da): undefined reference to `init_gcl_cmpmap'
sys_gcl.c:(.text+0x4657): undefined reference to `init_gcl_defpackage'
sys_gcl.c:(.text+0x46d4): undefined reference to `init_gcl_cmplabel'
sys_gcl.c:(.text+0x4751): undefined reference to `init_gcl_cmpblock'
sys_gcl.c:(.text+0x47ce): undefined reference to `init_gcl_cmptop'
sys_gcl.c:(.text+0x484b): undefined reference to
`init_gcl_destructuring_bind'
sys_gcl.c:(.text+0x48c8): undefined reference to `init_gcl_cmpfun'
sys_gcl.c:(.text+0x4945): undefined reference to `init_gcl_cmptype'
sys_gcl.c:(.text+0x49c2): undefined reference to `init_gcl_cmpspecial'
sys_gcl.c:(.text+0x4a3f): undefined reference to `init_gcl_cmpinline'
sys_gcl.c:(.text+0x4abc): undefined reference to `init_gcl_cmplet'
sys_gcl.c:(.text+0x4b39): undefined reference to `init_gcl_cmpcatch'
sys_gcl.c:(.text+0x4bb2): undefined reference to `init_gcl_cmpvs'
./libgcl.a(sys_gcl.o): In function `gcl_init_init':
sys_gcl.c:(.text+0x525d): undefined reference to `init_gcl_defmacro'
sys_gcl.c:(.text+0x52c7): undefined reference to `init_gcl_evalmacros'
sys_gcl.c:(.text+0x5331): undefined reference to `init_gcl_top'
sys_gcl.c:(.text+0x539c): undefined reference to `init_gcl_module'
collect2: ld returned 1 exit status
make[4]: *** [raw_gcl_map] Error 1
make[4]: Leaving directory `/home/axiom/silver/lsp/gcl-2.6.8pre/unixport'
make[3]: *** [unixport/saved_gcl] Error 2
make[3]: Leaving directory `/home/axiom/silver/lsp/gcl-2.6.8pre'
/bin/sh: line 5: unixport/saved_gcl: No such file or directory
make[2]: *** [gcldir] Error 127
make[2]: Leaving directory `/home/axiom/silver/lsp'
make[1]: *** [lspdir] Error 2
make[1]: Leaving directory `/home/axiom/silver'
make: *** [all] Error 2


P.S.: The native GCL that comes with the system (Gentoo Linux) is 2.6.7
and installs fine.

\start
Date: Fri, 14 Sep 2007 06:16:00 -0000
From: Tim Daly
To: Camm Maguire, Ed Borasky
Subject: GCL on an AMD64 Linux system?

Ed,

I've forwarded your email to Camm Maguire, the GCL maintainer.

It appears to be failing during GCL build. If you are using the
Axiom distribution there is a variable in the top level 
Makefile that can be set to different distributions of GCL
(the old distros are available in the CVS archives in the zips 
directory, I probably have a copy if you can't find it). 
If you have the appropriate GCL tar file, for example
  gcl-2.6.7.tgz
and you set the 
  GCLVERSION=gcl-2.6.7
then Axiom will build on that version of GCL from the zips archive.

Tim

------- Start of forwarded message -------

Is there some reason the GCL in Axiom shouldn't build on a 64-bit Linux
system (gcc 4.2.0)? I've got three systems. Two are 32-bit and one is
64-bit. Both gold and silver build fine on the 32-bit ones, but both
crash building GCL on the 64-bit system. Here's a trace ("silver", if it
matters):

ar: creating libgcl.a
touch raw_gcl_map
gcc -o raw_gcl /home/axiom/silver/obj/linux/lib/cfuns-c.o
/home/axiom/silver/obj/linux/lib/sockio-c.o \
                -L.  -Wl,-Map raw_gcl_map   -lgcl -lm  -lgmp -lreadline
- -lncurses -lc -lgclp /home/axiom/silver/obj/linux/lib/libspad.a
./libgcl.a(sys_gcl.o): In function `gcl_init_system':
sys_gcl.c:(.text+0x35bd): undefined reference to `init_gcl_cmpwt'
sys_gcl.c:(.text+0x363a): undefined reference to `init_gcl_predlib'
sys_gcl.c:(.text+0x36b7): undefined reference to `init_gcl_setf'
sys_gcl.c:(.text+0x3734): undefined reference to `init_gcl_assert'
sys_gcl.c:(.text+0x37b1): undefined reference to `init_gcl_arraylib'
sys_gcl.c:(.text+0x382e): undefined reference to `init_gcl_defstruct'
sys_gcl.c:(.text+0x38ab): undefined reference to `init_gcl_describe'
sys_gcl.c:(.text+0x3928): undefined reference to `init_gcl_numlib'
sys_gcl.c:(.text+0x39a5): undefined reference to `init_gcl_listlib'
sys_gcl.c:(.text+0x3a22): undefined reference to `init_gcl_seq'
sys_gcl.c:(.text+0x3a9f): undefined reference to `init_gcl_iolib'
sys_gcl.c:(.text+0x3b1c): undefined reference to `init_gcl_packlib'
sys_gcl.c:(.text+0x3b99): undefined reference to `init_gcl_mislib'
sys_gcl.c:(.text+0x3c16): undefined reference to `init_gcl_seqlib'
sys_gcl.c:(.text+0x3c93): undefined reference to `init_gcl_trace'
sys_gcl.c:(.text+0x3d10): undefined reference to `init_gcl_cmpenv'
sys_gcl.c:(.text+0x3d8d): undefined reference to `init_gcl_cmputil'
sys_gcl.c:(.text+0x3e0a): undefined reference to `init_gcl_cmploc'
sys_gcl.c:(.text+0x3e87): undefined reference to `init_gcl_loop'
sys_gcl.c:(.text+0x3f04): undefined reference to `init_gcl_cmpif'
sys_gcl.c:(.text+0x3f81): undefined reference to `init_gcl_cmpbind'
sys_gcl.c:(.text+0x3ffe): undefined reference to `init_gcl_cmptag'
sys_gcl.c:(.text+0x407b): undefined reference to `init_gcl_serror'
sys_gcl.c:(.text+0x40f8): undefined reference to `init_gcl_cmpflet'
sys_gcl.c:(.text+0x4175): undefined reference to `init_gcl_info'
sys_gcl.c:(.text+0x41f2): undefined reference to `init_gcl_cmpmulti'
sys_gcl.c:(.text+0x426f): undefined reference to `init_gcl_make_defpackage'
sys_gcl.c:(.text+0x42ec): undefined reference to `init_gcl_cmplam'
sys_gcl.c:(.text+0x4369): undefined reference to `init_gcl_cmpcall'
sys_gcl.c:(.text+0x43e6): undefined reference to `init_gcl_cmpvar'
sys_gcl.c:(.text+0x4463): undefined reference to `init_gcl_sloop'
sys_gcl.c:(.text+0x44e0): undefined reference to `init_gcl_cmpeval'
sys_gcl.c:(.text+0x455d): undefined reference to `init_gcl_debug'
sys_gcl.c:(.text+0x45da): undefined reference to `init_gcl_cmpmap'
sys_gcl.c:(.text+0x4657): undefined reference to `init_gcl_defpackage'
sys_gcl.c:(.text+0x46d4): undefined reference to `init_gcl_cmplabel'
sys_gcl.c:(.text+0x4751): undefined reference to `init_gcl_cmpblock'
sys_gcl.c:(.text+0x47ce): undefined reference to `init_gcl_cmptop'
sys_gcl.c:(.text+0x484b): undefined reference to
`init_gcl_destructuring_bind'
sys_gcl.c:(.text+0x48c8): undefined reference to `init_gcl_cmpfun'
sys_gcl.c:(.text+0x4945): undefined reference to `init_gcl_cmptype'
sys_gcl.c:(.text+0x49c2): undefined reference to `init_gcl_cmpspecial'
sys_gcl.c:(.text+0x4a3f): undefined reference to `init_gcl_cmpinline'
sys_gcl.c:(.text+0x4abc): undefined reference to `init_gcl_cmplet'
sys_gcl.c:(.text+0x4b39): undefined reference to `init_gcl_cmpcatch'
sys_gcl.c:(.text+0x4bb2): undefined reference to `init_gcl_cmpvs'
./libgcl.a(sys_gcl.o): In function `gcl_init_init':
sys_gcl.c:(.text+0x525d): undefined reference to `init_gcl_defmacro'
sys_gcl.c:(.text+0x52c7): undefined reference to `init_gcl_evalmacros'
sys_gcl.c:(.text+0x5331): undefined reference to `init_gcl_top'
sys_gcl.c:(.text+0x539c): undefined reference to `init_gcl_module'
collect2: ld returned 1 exit status
make[4]: *** [raw_gcl_map] Error 1
make[4]: Leaving directory `/home/axiom/silver/lsp/gcl-2.6.8pre/unixport'
make[3]: *** [unixport/saved_gcl] Error 2
make[3]: Leaving directory `/home/axiom/silver/lsp/gcl-2.6.8pre'
/bin/sh: line 5: unixport/saved_gcl: No such file or directory
make[2]: *** [gcldir] Error 127
make[2]: Leaving directory `/home/axiom/silver/lsp'
make[1]: *** [lspdir] Error 2
make[1]: Leaving directory `/home/axiom/silver'
make: *** [all] Error 2


P.S.: The native GCL that comes with the system (Gentoo Linux) is 2.6.7
and installs fine.

\start
Date: 14 Sep 2007 08:52:10 -0400
From: Camm Maguire
To: Tim Daly
Subject: Re: GCL on an AMD64 Linux system?

Greetings!  Your build failure originated much earlier in the log --
could you please forward the entire thing?

Take care,

Tim Daly writes:

> Ed,
> 
> I've forwarded your email to Camm Maguire, the GCL maintainer.
> 
> It appears to be failing during GCL build. If you are using the
> Axiom distribution there is a variable in the top level 
> Makefile that can be set to different distributions of GCL
> (the old distros are available in the CVS archives in the zips 
> directory, I probably have a copy if you can't find it). 
> If you have the appropriate GCL tar file, for example
>   gcl-2.6.7.tgz
> and you set the 
>   GCLVERSION=gcl-2.6.7
> then Axiom will build on that version of GCL from the zips archive.
> 
> Tim
> 
> From: Ed Borasky
> Subject: GCL on an AMD64 Linux system?
> To: list
> Date: Thu, 13 Sep 2007 22:30:24 -0700
> 
> Is there some reason the GCL in Axiom shouldn't build on a 64-bit Linux
> system (gcc 4.2.0)? I've got three systems. Two are 32-bit and one is
> 64-bit. Both gold and silver build fine on the 32-bit ones, but both
> crash building GCL on the 64-bit system. Here's a trace ("silver", if it
> matters):
> 
> ar: creating libgcl.a
> touch raw_gcl_map
> gcc -o raw_gcl /home/axiom/silver/obj/linux/lib/cfuns-c.o
> /home/axiom/silver/obj/linux/lib/sockio-c.o \
>                 -L.  -Wl,-Map raw_gcl_map   -lgcl -lm  -lgmp -lreadline
> - -lncurses -lc -lgclp /home/axiom/silver/obj/linux/lib/libspad.a
> ./libgcl.a(sys_gcl.o): In function `gcl_init_system':
> sys_gcl.c:(.text+0x35bd): undefined reference to `init_gcl_cmpwt'
> sys_gcl.c:(.text+0x363a): undefined reference to `init_gcl_predlib'
> sys_gcl.c:(.text+0x36b7): undefined reference to `init_gcl_setf'
> sys_gcl.c:(.text+0x3734): undefined reference to `init_gcl_assert'
> sys_gcl.c:(.text+0x37b1): undefined reference to `init_gcl_arraylib'
> sys_gcl.c:(.text+0x382e): undefined reference to `init_gcl_defstruct'
> sys_gcl.c:(.text+0x38ab): undefined reference to `init_gcl_describe'
> sys_gcl.c:(.text+0x3928): undefined reference to `init_gcl_numlib'
> sys_gcl.c:(.text+0x39a5): undefined reference to `init_gcl_listlib'
> sys_gcl.c:(.text+0x3a22): undefined reference to `init_gcl_seq'
> sys_gcl.c:(.text+0x3a9f): undefined reference to `init_gcl_iolib'
> sys_gcl.c:(.text+0x3b1c): undefined reference to `init_gcl_packlib'
> sys_gcl.c:(.text+0x3b99): undefined reference to `init_gcl_mislib'
> sys_gcl.c:(.text+0x3c16): undefined reference to `init_gcl_seqlib'
> sys_gcl.c:(.text+0x3c93): undefined reference to `init_gcl_trace'
> sys_gcl.c:(.text+0x3d10): undefined reference to `init_gcl_cmpenv'
> sys_gcl.c:(.text+0x3d8d): undefined reference to `init_gcl_cmputil'
> sys_gcl.c:(.text+0x3e0a): undefined reference to `init_gcl_cmploc'
> sys_gcl.c:(.text+0x3e87): undefined reference to `init_gcl_loop'
> sys_gcl.c:(.text+0x3f04): undefined reference to `init_gcl_cmpif'
> sys_gcl.c:(.text+0x3f81): undefined reference to `init_gcl_cmpbind'
> sys_gcl.c:(.text+0x3ffe): undefined reference to `init_gcl_cmptag'
> sys_gcl.c:(.text+0x407b): undefined reference to `init_gcl_serror'
> sys_gcl.c:(.text+0x40f8): undefined reference to `init_gcl_cmpflet'
> sys_gcl.c:(.text+0x4175): undefined reference to `init_gcl_info'
> sys_gcl.c:(.text+0x41f2): undefined reference to `init_gcl_cmpmulti'
> sys_gcl.c:(.text+0x426f): undefined reference to `init_gcl_make_defpackage'
> sys_gcl.c:(.text+0x42ec): undefined reference to `init_gcl_cmplam'
> sys_gcl.c:(.text+0x4369): undefined reference to `init_gcl_cmpcall'
> sys_gcl.c:(.text+0x43e6): undefined reference to `init_gcl_cmpvar'
> sys_gcl.c:(.text+0x4463): undefined reference to `init_gcl_sloop'
> sys_gcl.c:(.text+0x44e0): undefined reference to `init_gcl_cmpeval'
> sys_gcl.c:(.text+0x455d): undefined reference to `init_gcl_debug'
> sys_gcl.c:(.text+0x45da): undefined reference to `init_gcl_cmpmap'
> sys_gcl.c:(.text+0x4657): undefined reference to `init_gcl_defpackage'
> sys_gcl.c:(.text+0x46d4): undefined reference to `init_gcl_cmplabel'
> sys_gcl.c:(.text+0x4751): undefined reference to `init_gcl_cmpblock'
> sys_gcl.c:(.text+0x47ce): undefined reference to `init_gcl_cmptop'
> sys_gcl.c:(.text+0x484b): undefined reference to
> `init_gcl_destructuring_bind'
> sys_gcl.c:(.text+0x48c8): undefined reference to `init_gcl_cmpfun'
> sys_gcl.c:(.text+0x4945): undefined reference to `init_gcl_cmptype'
> sys_gcl.c:(.text+0x49c2): undefined reference to `init_gcl_cmpspecial'
> sys_gcl.c:(.text+0x4a3f): undefined reference to `init_gcl_cmpinline'
> sys_gcl.c:(.text+0x4abc): undefined reference to `init_gcl_cmplet'
> sys_gcl.c:(.text+0x4b39): undefined reference to `init_gcl_cmpcatch'
> sys_gcl.c:(.text+0x4bb2): undefined reference to `init_gcl_cmpvs'
> ./libgcl.a(sys_gcl.o): In function `gcl_init_init':
> sys_gcl.c:(.text+0x525d): undefined reference to `init_gcl_defmacro'
> sys_gcl.c:(.text+0x52c7): undefined reference to `init_gcl_evalmacros'
> sys_gcl.c:(.text+0x5331): undefined reference to `init_gcl_top'
> sys_gcl.c:(.text+0x539c): undefined reference to `init_gcl_module'
> collect2: ld returned 1 exit status
> make[4]: *** [raw_gcl_map] Error 1
> make[4]: Leaving directory `/home/axiom/silver/lsp/gcl-2.6.8pre/unixport'
> make[3]: *** [unixport/saved_gcl] Error 2
> make[3]: Leaving directory `/home/axiom/silver/lsp/gcl-2.6.8pre'
> /bin/sh: line 5: unixport/saved_gcl: No such file or directory
> make[2]: *** [gcldir] Error 127
> make[2]: Leaving directory `/home/axiom/silver/lsp'
> make[1]: *** [lspdir] Error 2
> make[1]: Leaving directory `/home/axiom/silver'
> make: *** [all] Error 2
> 
> 
> P.S.: The native GCL that comes with the system (Gentoo Linux) is 2.6.7
> and installs fine.

\start
Date: Fri, 14 Sep 2007 09:26:28 -0500
From: Tim Daly
To: Alfredo Portes
Subject: 20070914.01.tpd.patch

This patch has been applied and tested.

Date: Thu, 13 Sep 2007 14:59:19 -0400
From: Alfredo Portes
To: list
Subject: Re: Two hyperdoc questions
On 18 Jun 2007 08:24:33 +0200, Martin Rubey wrote:

> > 2) If I inadvertently quit HyperDoc while running Axiom, I can restart it
> > with )hd.  But )hd doesn't provide a socket connection; this new HyperDoc is
> > "not connected to Axiom".  Is there any way of starting a "connected"
> > HyperDoc from an already-running Axiom?
>
> No, but I'd love to see a fix for that bug, too.

Attached are patches for this problem done by Waldek (Bug 281).
The patch is against current silver.

Regards,

Alfredo

======================================================================
diff --git a/changelog b/changelog
index 1a831be..f161db0 100644
--- a/changelog
+++ b/changelog
@@ -1,3 +1,8 @@
+20070914 jap adapt changes for )hd restart to Axiom sources
+20070914 jap Jose Alfredo Portes
+20070914 wxh src/sman/bookvol6 enable restart of hyperdoc with )hd
+20070914 wxh src/include/sman.h1 enable restart of hyperdoc with )hd
+20070914 wxh src/hyper/hyper enable restart of hyperdoc with )hd
 20070913 tpd src/input/Makefile schaum1.input added
 20070913 tpd src/input/schaum1.input added
 20070909 tpd src/algebra/newton.spad included in fffg.spad
diff --git a/src/hyper/hyper.pamphlet b/src/hyper/hyper.pamphlet
index 2126df1..1e44d61 100644
--- a/src/hyper/hyper.pamphlet
+++ b/src/hyper/hyper.pamphlet
@@ -945,11 +945,14 @@ make_server_connections(void)
      */
 
     if (open_server(MenuServerName) == -2) {
-        fprintf(stderr, "(HyperDoc) Warning: Not connected to AXIOM Server!\n");
-        MenuServerOpened = 0;
+       fprintf(stderr, "(HyperDoc) Warning: Not connected to AXIOM Server!\n");
+       MenuServerOpened = 0;
     }
     else
-        MenuServerOpened = 1;
+     /* In order to allow hyperdoc restarts from the console we clean up
+      * the socket on exit */
+       atexit(&clean_socket);
+       MenuServerOpened = 1;
 
 
     /*
diff --git a/src/include/sman.h1 b/src/include/sman.h1
index 20dbc90..9645289 100755
--- a/src/include/sman.h1
+++ b/src/include/sman.h1
@@ -25,6 +25,7 @@ static void start_the_graphics(void);
 static void fork_Axiom(void);
 static void start_the_Axiom(char * * envp);
 static void clean_up_sockets(void);
+static void clean_hypertex_socket(void);
 static void read_from_spad_io(int ptcNum);
 static void read_from_manager(int ptcNum);
 static void manage_spad_io(int ptcNum);
diff --git a/src/sman/bookvol6.pamphlet b/src/sman/bookvol6.pamphlet
index d80388b..2c2a20c 100644
--- a/src/sman/bookvol6.pamphlet
+++ b/src/sman/bookvol6.pamphlet
@@ -812,6 +812,8 @@ these structures which maintains the process list for axiom.
 #define NadaDelShitsky  2
 /* When a process dies start it up again */
 #define DoItAgain       3
+/* When hypertex dies, clean its socket */
+#define CleanHypertexSocket 4
 
 typedef struct spad_proc {
   int	proc_id;	/* process id of child */
@@ -1405,7 +1407,8 @@ start_the_hypertex(void)
     sprintf(prog, "%s -k -rv %s", HypertexProgram, VerifyRecordFile);
     spawn_of_hell(prog, NadaDelShitsky);
   }
-  else	spawn_of_hell(HypertexProgram, NadaDelShitsky);
+  /* If we restart hyperdoc from the axiom command prompt */
+  else spawn_of_hell(HypertexProgram, CleanHypertexSocket);
 }
 
 @
@@ -1515,8 +1518,18 @@ start_the_Axiom(char **envp)
 
 @
 \subsection{clean\_up\_sockets}
+In order to be able to restart hyperdoc from the axiom command prompt
+we need to remove the socket for this server.
 <<sman.cleanupsockets>>=
 static void
+clean_hypertex_socket(void)
+{
+   char name[256];
+   sprintf(name, "%s%d", MenuServerName, server_num);
+   unlink(name); 
+}
+
+static void
 clean_up_sockets(void)
 {
   char name[256];
@@ -1526,8 +1539,7 @@ clean_up_sockets(void)
   unlink(name);
   sprintf(name, "%s%d", SessionIOName, server_num);
   unlink(name);
-  sprintf(name, "%s%d", MenuServerName, server_num);
-  unlink(name);
+  clean_hypertex_socket();
 }
 
 @
@@ -1700,11 +1712,12 @@ monitor_children(void)
     stat = 0;
     dead_baby = wait(&stat);
     /* Check the value of dead_baby, since wait may have returned
-       a pid but subsequently we have received a signal.  Yeuch! */
+       a pid but subsequently we have received a signal.  Yeuch! 
+       In order to restart hyperdoc from the axiom command prompt
+       we no longer call clean_up_terminal */
     if (dead_baby == -1 && death_signal) {
       kill_all_children();
       clean_up_sockets();
-      clean_up_terminal();
       sleep(2);
       exit(0);
     }
@@ -1728,10 +1741,12 @@ monitor_children(void)
       continue;
     }
     switch(proc->death_action) {
+    /* In order to restart hyperdoc from the axiom command prompt
+       we no longer call clean_up_terminal. Instead we've added a
+       case to just clean up the socket. */
     case Die:
       kill_all_children();
       clean_up_sockets();
-      clean_up_terminal();
       sleep(2);
       exit(0);
     case NadaDelShitsky:
@@ -1739,6 +1754,9 @@ monitor_children(void)
     case DoItAgain:
       spawn_of_hell(proc->command, DoItAgain);
       break;
+    case CleanHypertexSocket:
+      clean_hypertex_socket();
+      break;
     }
   }
 }


\start
Date: Fri, 14 Sep 2007 16:45:09 +0200 (CEST)
From: Waldek Hebisch
To: Tim Daly
Subject: Re: 20070914.01.tpd.patch

> This patch has been applied and tested.
> 
<snip>
> diff --git a/src/hyper/hyper.pamphlet b/src/hyper/hyper.pamphlet
> index 2126df1..1e44d61 100644
> --- a/src/hyper/hyper.pamphlet
> +++ b/src/hyper/hyper.pamphlet
> @@ -945,11 +945,14 @@ make_server_connections(void)
>       */
>  
>      if (open_server(MenuServerName) == -2) {
> -        fprintf(stderr, "(HyperDoc) Warning: Not connected to AXIOM Server!\n");
> -        MenuServerOpened = 0;
> +       fprintf(stderr, "(HyperDoc) Warning: Not connected to AXIOM Server!\n");
> +       MenuServerOpened = 0;
>      }
>      else
> -        MenuServerOpened = 1;
> +     /* In order to allow hyperdoc restarts from the console we clean up
> +      * the socket on exit */
> +       atexit(&clean_socket);
> +       MenuServerOpened = 1;
>  
>  
>      /*

Tim, the above is wrong: you need braces (as I and Alfredo did) if
you put multiple C statements in 'else' branch.  What you wrote
is equivalent to:


>      if (open_server(MenuServerName) == -2) {
>         fprintf(stderr, "(HyperDoc) Warning: Not connected to AXIOM Server!\n\");
>      }
>      else
>      /* In order to allow hyperdoc restarts from the console we clean up
>       * the socket on exit */
>         atexit(&clean_socket);
>
>      MenuServerOpened = 1;

(with dead store eliminated).  In other words, you unconditionally
set MenuServerOpened to 1.  I am not sure if this will show up
in testing, but is clealy wrong.

\start
Date: 14 Sep 2007 09:59:55 -0500
From: Gabriel Dos Reis
To: Waldek Hebisch
Subject: Re: 20070914.01.tpd.patch

Waldek Hebisch writes:

[...]

| >      else
| > -        MenuServerOpened = 1;
| > +     /* In order to allow hyperdoc restarts from the console we clean up
| > +      * the socket on exit */
| > +       atexit(&clean_socket);
| > +       MenuServerOpened = 1;
| >  
| >  
| >      /*
| 
| Tim, the above is wrong: you need braces (as I and Alfredo did) if
| you put multiple C statements in 'else' branch.

Which brings the question:  What was of the motivation of mutilating
the original patch?

\start
Date: Fri, 14 Sep 2007 10:15:59 -0500
From: Tim Daly
To: list
Subject: 20070914.02.tpd.patch

Four of new algebra test files contain duplicate )spool commands at the
end of the input files. This trivial patch fixes that problem.

=======================================================================
diff --git a/changelog b/changelog
index f161db0..849e125 100644
--- a/changelog
+++ b/changelog
@@ -1,3 +1,7 @@
+20070914 tpd src/algebra/fraction.spad remove double )spool command
+20070914 tpd src/algebra/kl.spad remove double )spool command
+20070914 tpd src/algebra/lindep.spad remove double )spool command
+20070914 tpd src/algebra/radix.spad remove double )spool command
 20070914 jap adapt changes for )hd restart to Axiom sources
 20070914 jap Jose Alfredo Portes
 20070914 wxh src/sman/bookvol6 enable restart of hyperdoc with )hd
diff --git a/src/algebra/fraction.spad.pamphlet b/src/algebra/fraction.spad.pamphlet
index 131a301..09dcfe5 100644
--- a/src/algebra/fraction.spad.pamphlet
+++ b/src/algebra/fraction.spad.pamphlet
@@ -513,8 +513,6 @@ g :: FRAC COMPLEX INT
 --R                                               Type: Fraction Complex Integer
 --E 12
 )spool
- 
-)spool
 )lisp (bye)
 @
 <<Fraction.help>>=
diff --git a/src/algebra/kl.spad.pamphlet b/src/algebra/kl.spad.pamphlet
index 3453982..4772c2f 100644
--- a/src/algebra/kl.spad.pamphlet
+++ b/src/algebra/kl.spad.pamphlet
@@ -304,8 +304,6 @@ argument mainKernel e
 --R                                                Type: List Expression Integer
 --E 19
 )spool
- 
-)spool
 )lisp (bye)
 @
 <<Kernel.help>>=
diff --git a/src/algebra/lindep.spad.pamphlet b/src/algebra/lindep.spad.pamphlet
index f5cd057..1aa4795 100644
--- a/src/algebra/lindep.spad.pamphlet
+++ b/src/algebra/lindep.spad.pamphlet
@@ -164,8 +164,6 @@ solveLinearlyOverQ(vector [m1, m3], m2)
 --R                                     Type: Union(Vector Fraction Integer,...)
 --E 8
 )spool
- 
-)spool
 )lisp (bye)
 @
 <<IntegerLinearDependence.help>>=
diff --git a/src/algebra/radix.spad.pamphlet b/src/algebra/radix.spad.pamphlet
index 98364b1..1e76d86 100644
--- a/src/algebra/radix.spad.pamphlet
+++ b/src/algebra/radix.spad.pamphlet
@@ -988,8 +988,6 @@ g := gcd(p, q)
 --R                                        Type: Polynomial HexadecimalExpansion
 --E 7
 )spool
- 
-)spool
 )lisp (bye)
 @
 <<HexadecimalExpansion.help>>=

\start
Date: Fri, 14 Sep 2007 13:29:15 -0500
From: Tim Daly
To: list
Subject: 20070914.03.tpd.patch

This patch fixes a typo in hyper.pamphlet due to bad bracing.

========================================================================
diff --git a/changelog b/changelog
index 849e125..04a20e2 100644
--- a/changelog
+++ b/changelog
@@ -1,3 +1,4 @@
+20070914 wxh src/hyper/hyper fix bad bracing of )hd change
 20070914 tpd src/algebra/fraction.spad remove double )spool command
 20070914 tpd src/algebra/kl.spad remove double )spool command
 20070914 tpd src/algebra/lindep.spad remove double )spool command
diff --git a/src/hyper/hyper.pamphlet b/src/hyper/hyper.pamphlet
index 1e44d61..d9df6c2 100644
--- a/src/hyper/hyper.pamphlet
+++ b/src/hyper/hyper.pamphlet
@@ -948,12 +948,12 @@ make_server_connections(void)
        fprintf(stderr, "(HyperDoc) Warning: Not connected to AXIOM Server!\n");
        MenuServerOpened = 0;
     }
-    else
+    else {
      /* In order to allow hyperdoc restarts from the console we clean up
       * the socket on exit */
        atexit(&clean_socket);
        MenuServerOpened = 1;
-
+    }
 
     /*
      * If I have opened the MenuServer socket, then I should also try to open



\start
Date: Sat, 15 Sep 2007 16:30:03 +0200 (CEST)
From: Waldek Hebisch
To: Gabriel Dos Reis
Subject: Re: numberOfEmptySlots

> 
> Consider the following function from src/interp/clam.boot:
> 
>     numberOfEmptySlots cache==
>       count:= (CAAR cache ='$failed => 1; 0)
>       for x in tails rest cache while NE(x,cache) repeat
> 	if CAAR x='$failed then count:= count+1
>       count
> 
> 
> The SBCL type checker does not like it because:
> 
>   * it is able to infer that cache is a list,
>   * '=' (coming from NE, which mean not =) can be applied only
>     to numbers.
> 
> Consequently, we have conflicting assumptions for the same value.  So, we 
> have a bug.  Now, looking back at the code, the expression
> 
>      NE(x,cache)
> 
> cannot be right.  Was it indended to be
> 
>     x /= cache
> 
> instead?
> 
> Note: a /= b is almost same like (not (equal a b)).
> 

The problem is due to incomplete conversion form old Boot to Shoe.
Originally clam.boot was translated by old Boot and NE was passed
unmolested to Lisp output.  In vmlisp.lisp we have:

(defmacro ne (a b) `(not (equal ,a ,b)))

so original meaning was (not (equal x cache)).  Shoe changes
NE to /= leading to error...
 
\start
Date: Sat, 15 Sep 2007 11:18:53 -0500 (CDT)
From: Gabriel Dos Reis
To: Waldek Hebisch
Subject: Re: numberOfEmptySlots

On Sat, 15 Sep 2007, Waldek Hebisch wrote:

| > 
| > Consider the following function from src/interp/clam.boot:
| > 
| >     numberOfEmptySlots cache==
| >       count:= (CAAR cache ='$failed => 1; 0)
| >       for x in tails rest cache while NE(x,cache) repeat
| > 	if CAAR x='$failed then count:= count+1
| >       count

[...]

| > cannot be right.  Was it indended to be
| > 
| >     x /= cache
| > 
| > instead?
| > 
| > Note: a /= b is almost same like (not (equal a b)).
| > 
| 
| The problem is due to incomplete conversion form old Boot to Shoe.
| Originally clam.boot was translated by old Boot and NE was passed
| unmolested to Lisp output.  In vmlisp.lisp we have:
| 
| (defmacro ne (a b) `(not (equal ,a ,b)))
| 
| so original meaning was (not (equal x cache)).  Shoe changes
| NE to /= leading to error...

I still believe the code is incorrect if `not equal' is intented.
The condition in the loop is testing whether x does not contain
itself.  If equal is used, then I suspect that will end up with
an infinite loop.  Rather, I suspect it should have been `not eq'.

\start
Date: Sat, 15 Sep 2007 11:41:02 -0500
From: Tim Daly
To: list
Subject: 20070915.01.tpd.patch

This is a minor edit to fix regression test numbering in CartesianTensor.
The "of N" numbering is used on output to the .regress files and was not
properly included in this chunk.

=========================================================================
diff --git a/changelog b/changelog
index 04a20e2..d6c0bdd 100644
--- a/changelog
+++ b/changelog
@@ -1,3 +1,4 @@
+20070915 tpd src/algebra/carten minor edit for regression cleanup
 20070914 wxh src/hyper/hyper fix bad bracing of )hd change
 20070914 tpd src/algebra/fraction.spad remove double )spool command
 20070914 tpd src/algebra/kl.spad remove double )spool command
diff --git a/src/algebra/carten.spad.pamphlet b/src/algebra/carten.spad.pamphlet
index 85f7027..5dfedb0 100644
--- a/src/algebra/carten.spad.pamphlet
+++ b/src/algebra/carten.spad.pamphlet
@@ -108,7 +108,7 @@ GradedAlgebra(R: CommutativeRing, E: AbelianMonoid): Category ==
 )set message test on
 )set message auto off
 )clear all
---S 1
+--S 1 of 48
 CT := CARTEN(i0 := 1, 2, Integer)
 --R 
 --R
@@ -116,7 +116,7 @@ CT := CARTEN(i0 := 1, 2, Integer)
 --R                                                                 Type: Domain
 --E 1
 
---S 2
+--S 2 of 48
 t0: CT := 8
 --R 
 --R
@@ -124,7 +124,7 @@ t0: CT := 8
 --R                                           Type: CartesianTensor(1,2,Integer)
 --E 2
 
---S 3
+--S 3 of 48
 rank t0
 --R 
 --R
@@ -132,7 +132,7 @@ rank t0
 --R                                                     Type: NonNegativeInteger
 --E 3
 
---S 4
+--S 4 of 48
 v: DirectProduct(2, Integer) := directProduct [3,4]
 --R 
 --R
@@ -140,7 +140,7 @@ v: DirectProduct(2, Integer) := directProduct [3,4]
 --R                                               Type: DirectProduct(2,Integer)
 --E 4
 
---S 5
+--S 5 of 48
 Tv: CT := v
 --R 
 --R
@@ -148,7 +148,7 @@ Tv: CT := v
 --R                                           Type: CartesianTensor(1,2,Integer)
 --E 5
 
---S 6
+--S 6 of 48
 m: SquareMatrix(2, Integer) := matrix [ [1,2],[4,5] ]
 --R 
 --R
@@ -158,7 +158,7 @@ m: SquareMatrix(2, Integer) := matrix [ [1,2],[4,5] ]
 --R                                                Type: SquareMatrix(2,Integer)
 --E 6
 
---S 7
+--S 7 of 48
 Tm: CT := m
 --R 
 --R
@@ -168,7 +168,7 @@ Tm: CT := m
 --R                                           Type: CartesianTensor(1,2,Integer)
 --E 7
 
---S 8
+--S 8 of 48
 n: SquareMatrix(2, Integer) := matrix [ [2,3],[0,1] ]
 --R 
 --R
@@ -178,7 +178,7 @@ n: SquareMatrix(2, Integer) := matrix [ [2,3],[0,1] ]
 --R                                                Type: SquareMatrix(2,Integer)
 --E 8
 
---S 9
+--S 9 of 48
 Tn: CT := n
 --R 
 --R
@@ -188,7 +188,7 @@ Tn: CT := n
 --R                                           Type: CartesianTensor(1,2,Integer)
 --E 9
 
---S 10
+--S 10 of 48
 t1: CT := [2, 3]
 --R 
 --R
@@ -196,7 +196,7 @@ t1: CT := [2, 3]
 --R                                           Type: CartesianTensor(1,2,Integer)
 --E 10
 
---S 11
+--S 11 of 48
 rank t1
 --R 
 --R
@@ -204,7 +204,7 @@ rank t1
 --R                                                        Type: PositiveInteger
 --E 11
 
---S 12
+--S 12 of 48
 t2: CT := [t1, t1]
 --R 
 --R
@@ -214,7 +214,7 @@ t2: CT := [t1, t1]
 --R                                           Type: CartesianTensor(1,2,Integer)
 --E 12
 
---S 13
+--S 13 of 48
 t3: CT := [t2, t2]
 --R 
 --R
@@ -224,7 +224,7 @@ t3: CT := [t2, t2]
 --R                                           Type: CartesianTensor(1,2,Integer)
 --E 13
 
---S 14
+--S 14 of 48
 tt: CT := [t3, t3]; tt := [tt, tt]
 --R 
 --R
@@ -238,7 +238,7 @@ tt: CT := [t3, t3]; tt := [tt, tt]
 --R                                           Type: CartesianTensor(1,2,Integer)
 --E 14
 
---S 15
+--S 15 of 48
 rank tt
 --R 
 --R
@@ -246,7 +246,7 @@ rank tt
 --R                                                        Type: PositiveInteger
 --E 15
 
---S 16
+--S 16 of 48
 Tmn := product(Tm, Tn)
 --R 
 --R
@@ -260,7 +260,7 @@ Tmn := product(Tm, Tn)
 --R                                           Type: CartesianTensor(1,2,Integer)
 --E 16
 
---S 17
+--S 17 of 48
 Tmv := contract(Tm,2,Tv,1)
 --R 
 --R
@@ -268,7 +268,7 @@ Tmv := contract(Tm,2,Tv,1)
 --R                                           Type: CartesianTensor(1,2,Integer)
 --E 17
 
---S 18
+--S 18 of 48
 Tm*Tv
 --R 
 --R
@@ -276,7 +276,7 @@ Tm*Tv
 --R                                           Type: CartesianTensor(1,2,Integer)
 --E 18
 
---S 19
+--S 19 of 48
 Tmv = m * v
 --R 
 --R
@@ -284,7 +284,7 @@ Tmv = m * v
 --R                                  Type: Equation CartesianTensor(1,2,Integer)
 --E 19
 
---S 20
+--S 20 of 48
 t0()
 --R 
 --R
@@ -292,7 +292,7 @@ t0()
 --R                                                        Type: PositiveInteger
 --E 20
 
---S 21
+--S 21 of 48
 t1(1+1)
 --R 
 --R
@@ -300,7 +300,7 @@ t1(1+1)
 --R                                                        Type: PositiveInteger
 --E 21
 
---S 22
+--S 22 of 48
 t2(2,1)
 --R 
 --R
@@ -308,7 +308,7 @@ t2(2,1)
 --R                                                        Type: PositiveInteger
 --E 22
 
---S 23
+--S 23 of 48
 t3(2,1,2)
 --R 
 --R
@@ -316,7 +316,7 @@ t3(2,1,2)
 --R                                                        Type: PositiveInteger
 --E 23
 
---S 24
+--S 24 of 48
 Tmn(2,1,2,1)
 --R 
 --R
@@ -324,7 +324,7 @@ Tmn(2,1,2,1)
 --R                                                     Type: NonNegativeInteger
 --E 24
 
---S 25
+--S 25 of 48
 t0[]
 --R 
 --R
@@ -332,7 +332,7 @@ t0[]
 --R                                                        Type: PositiveInteger
 --E 25
 
---S 26
+--S 26 of 48
 t1[2]
 --R 
 --R
@@ -340,7 +340,7 @@ t1[2]
 --R                                                        Type: PositiveInteger
 --E 26
 
---S 27
+--S 27 of 48
 t2[2,1]
 --R 
 --R
@@ -348,7 +348,7 @@ t2[2,1]
 --R                                                        Type: PositiveInteger
 --E 27
 
---S 28
+--S 28 of 48
 t3[2,1,2]
 --R 
 --R
@@ -356,7 +356,7 @@ t3[2,1,2]
 --R                                                        Type: PositiveInteger
 --E 28
 
---S 29
+--S 29 of 48
 Tmn[2,1,2,1]
 --R 
 --R
@@ -364,7 +364,7 @@ Tmn[2,1,2,1]
 --R                                                     Type: NonNegativeInteger
 --E 29
 
---S 30
+--S 30 of 48
 cTmn := contract(Tmn,1,2)
 --R 
 --R
@@ -374,7 +374,7 @@ cTmn := contract(Tmn,1,2)
 --R                                           Type: CartesianTensor(1,2,Integer)
 --E 30
 
---S 31
+--S 31 of 48
 trace(m) * n
 --R 
 --R
@@ -384,7 +384,7 @@ trace(m) * n
 --R                                                Type: SquareMatrix(2,Integer)
 --E 31
 
---S 32
+--S 32 of 48
 contract(Tmn,1,2) = trace(m) * n
 --R 
 --R
@@ -394,7 +394,7 @@ contract(Tmn,1,2) = trace(m) * n
 --R                                  Type: Equation CartesianTensor(1,2,Integer)
 --E 32
 
---S 33
+--S 33 of 48
 contract(Tmn,1,3) = transpose(m) * n
 --R 
 --R
@@ -404,7 +404,7 @@ contract(Tmn,1,3) = transpose(m) * n
 --R                                  Type: Equation CartesianTensor(1,2,Integer)
 --E 33
 
---S 34
+--S 34 of 48
 contract(Tmn,1,4) = transpose(m) * transpose(n)
 --R 
 --R
@@ -414,7 +414,7 @@ contract(Tmn,1,4) = transpose(m) * transpose(n)
 --R                                  Type: Equation CartesianTensor(1,2,Integer)
 --E 34
 
---S 35
+--S 35 of 48
 contract(Tmn,2,3) = m * n
 --R 
 --R
@@ -424,7 +424,7 @@ contract(Tmn,2,3) = m * n
 --R                                  Type: Equation CartesianTensor(1,2,Integer)
 --E 35
 
---S 36
+--S 36 of 48
 contract(Tmn,2,4) = m * transpose(n)
 --R 
 --R
@@ -434,7 +434,7 @@ contract(Tmn,2,4) = m * transpose(n)
 --R                                  Type: Equation CartesianTensor(1,2,Integer)
 --E 36
 
---S 37
+--S 37 of 48
 contract(Tmn,3,4) = trace(n) * m
 --R 
 --R
@@ -444,7 +444,7 @@ contract(Tmn,3,4) = trace(n) * m
 --R                                  Type: Equation CartesianTensor(1,2,Integer)
 --E 37
 
---S 38
+--S 38 of 48
 tTmn := transpose(Tmn,1,3)
 --R 
 --R
@@ -458,7 +458,7 @@ tTmn := transpose(Tmn,1,3)
 --R                                           Type: CartesianTensor(1,2,Integer)
 --E 38
 
---S 39
+--S 39 of 48
 transpose Tmn
 --R 
 --R
@@ -472,7 +472,7 @@ transpose Tmn
 --R                                           Type: CartesianTensor(1,2,Integer)
 --E 39
 
---S 40
+--S 40 of 48
 transpose Tm = transpose m
 --R 
 --R
@@ -482,7 +482,7 @@ transpose Tm = transpose m
 --R                                  Type: Equation CartesianTensor(1,2,Integer)
 --E 40
 
---S 41
+--S 41 of 48
 rTmn := reindex(Tmn, [1,4,2,3])
 --R 
 --R
@@ -496,7 +496,7 @@ rTmn := reindex(Tmn, [1,4,2,3])
 --R                                           Type: CartesianTensor(1,2,Integer)
 --E 41
 
---S 42
+--S 42 of 48
 tt := transpose(Tm)*Tn - Tn*transpose(Tm)
 --R 
 --R
@@ -506,7 +506,7 @@ tt := transpose(Tm)*Tn - Tn*transpose(Tm)
 --R                                           Type: CartesianTensor(1,2,Integer)
 --E 42
 
---S 43
+--S 43 of 48
 Tv*(tt+Tn)
 --R 
 --R
@@ -514,7 +514,7 @@ Tv*(tt+Tn)
 --R                                           Type: CartesianTensor(1,2,Integer)
 --E 43
 
---S 44
+--S 44 of 48
 reindex(product(Tn,Tn),[4,3,2,1])+3*Tn*product(Tm,Tm)
 --R 
 --R
@@ -528,7 +528,7 @@ reindex(product(Tn,Tn),[4,3,2,1])+3*Tn*product(Tm,Tm)
 --R                                           Type: CartesianTensor(1,2,Integer)
 --E 44
 
---S 45
+--S 45 of 48
 delta:  CT := kroneckerDelta()
 --R 
 --R
@@ -538,7 +538,7 @@ delta:  CT := kroneckerDelta()
 --R                                           Type: CartesianTensor(1,2,Integer)
 --E 45
 
---S 46
+--S 46 of 48
 contract(Tmn, 2, delta, 1) = reindex(Tmn, [1,3,4,2])
 --R 
 --R
@@ -552,7 +552,7 @@ contract(Tmn, 2, delta, 1) = reindex(Tmn, [1,3,4,2])
 --R                                  Type: Equation CartesianTensor(1,2,Integer)
 --E 46
 
---S 47
+--S 47 of 48
 epsilon:CT := leviCivitaSymbol()
 --R 
 --R
@@ -562,7 +562,7 @@ epsilon:CT := leviCivitaSymbol()
 --R                                           Type: CartesianTensor(1,2,Integer)
 --E 47
 
---S 48
+--S 48 of 48
 contract(epsilon*Tm*epsilon, 1,2) = 2 * determinant m
 --R 
 --R

\start
Date: Sat, 15 Sep 2007 19:10:42 +0200 (CEST)
From: Waldek Hebisch
To: Gabriel Dos Reis
Subject: Re: numberOfEmptySlots

Gabriel Dos Reis wrote:
> On Sat, 15 Sep 2007, Waldek Hebisch wrote:
> | The problem is due to incomplete conversion form old Boot to Shoe.
> | Originally clam.boot was translated by old Boot and NE was passed
> | unmolested to Lisp output.  In vmlisp.lisp we have:
> | 
> | (defmacro ne (a b) `(not (equal ,a ,b)))
> | 
> | so original meaning was (not (equal x cache)).  Shoe changes
> | NE to /= leading to error...
> 
> I still believe the code is incorrect if `not equal' is intented.
> The condition in the loop is testing whether x does not contain
> itself.  If equal is used, then I suspect that will end up with
> an infinite loop.  Rather, I suspect it should have been `not eq'.
> 

I tend to agree: the argument is a circular list so a test is
neccessary and eq is sufficient.  To be more precise: I think
that original code form Ansi point of view has undefined behaviour,
but works in practical implementations.  However using `not eq'
looks cleaner.


BTW: the only way to call numberOfEmptySlots seem to be via clamStats
and clamStats is unused so one have to call it via )lisp command.
However when clamStats is called form command line is seems that
numberOfEmptySlots is still unused, because normally $clamList
contains only hashtables (AFAICS list are used only during
compilation).

\start
Date: Sat, 15 Sep 2007 12:49:41 -0700
From: Ed Borasky
To: Tim Daly
Subject: Re: GCL on an AMD64 Linux system?
Cc: Camm Maguire

root wrote:
> Ed,
> 
> I've forwarded your email to Camm Maguire, the GCL maintainer.
> 
> It appears to be failing during GCL build. If you are using the
> Axiom distribution there is a variable in the top level 
> Makefile that can be set to different distributions of GCL
> (the old distros are available in the CVS archives in the zips 
> directory, I probably have a copy if you can't find it). 
> If you have the appropriate GCL tar file, for example
>   gcl-2.6.7.tgz
> and you set the 
>   GCLVERSION=gcl-2.6.7
> then Axiom will build on that version of GCL from the zips archive.
> 
> Tim
> 
> ------- Start of forwarded message -------
> Date: Thu, 13 Sep 2007 22:30:24 -0700
> From: Ed Borasky
> User-Agent: Thunderbird 2.0.0.6 (X11/20070905)
> To: list
> Content-Type: text/plain; charset=ISO-8859-1
> X-Detected-Kernel: NetCache Data OnTap 5.x
> Subject: GCL on an AMD64 Linux system?
> X-BeenThere: list
> X-Mailman-Version: 2.1.5
> Precedence: list
> List-Id: Axiom Developers <axiom-developer.nongnu.org>
> List-Unsubscribe: <http://lists.nongnu.org/mailman/listinfo/axiom-developer>, 
> List-Archive: <http://lists.gnu.org/pipermail/axiom-developer>
> List-Post: <mailto:list>
> List-Subscribe: <http://lists.nongnu.org/mailman/listinfo/axiom-developer>,
> Sender: axiom-developer-bounces+daly=axiom-developer.org@nongnu.org
> 
> Is there some reason the GCL in Axiom shouldn't build on a 64-bit Linux
> system (gcc 4.2.0)? I've got three systems. Two are 32-bit and one is
> 64-bit. Both gold and silver build fine on the 32-bit ones, but both
> crash building GCL on the 64-bit system. Here's a trace ("silver", if it
> matters):
> 
> ar: creating libgcl.a
> touch raw_gcl_map
> gcc -o raw_gcl /home/axiom/silver/obj/linux/lib/cfuns-c.o
> /home/axiom/silver/obj/linux/lib/sockio-c.o \
>                 -L.  -Wl,-Map raw_gcl_map   -lgcl -lm  -lgmp -lreadline
> - -lncurses -lc -lgclp /home/axiom/silver/obj/linux/lib/libspad.a
> ./libgcl.a(sys_gcl.o): In function `gcl_init_system':
> sys_gcl.c:(.text+0x35bd): undefined reference to `init_gcl_cmpwt'
> sys_gcl.c:(.text+0x363a): undefined reference to `init_gcl_predlib'
> sys_gcl.c:(.text+0x36b7): undefined reference to `init_gcl_setf'
> sys_gcl.c:(.text+0x3734): undefined reference to `init_gcl_assert'
> sys_gcl.c:(.text+0x37b1): undefined reference to `init_gcl_arraylib'
> sys_gcl.c:(.text+0x382e): undefined reference to `init_gcl_defstruct'
> sys_gcl.c:(.text+0x38ab): undefined reference to `init_gcl_describe'
> sys_gcl.c:(.text+0x3928): undefined reference to `init_gcl_numlib'
> sys_gcl.c:(.text+0x39a5): undefined reference to `init_gcl_listlib'
> sys_gcl.c:(.text+0x3a22): undefined reference to `init_gcl_seq'
> sys_gcl.c:(.text+0x3a9f): undefined reference to `init_gcl_iolib'
> sys_gcl.c:(.text+0x3b1c): undefined reference to `init_gcl_packlib'
> sys_gcl.c:(.text+0x3b99): undefined reference to `init_gcl_mislib'
> sys_gcl.c:(.text+0x3c16): undefined reference to `init_gcl_seqlib'
> sys_gcl.c:(.text+0x3c93): undefined reference to `init_gcl_trace'
> sys_gcl.c:(.text+0x3d10): undefined reference to `init_gcl_cmpenv'
> sys_gcl.c:(.text+0x3d8d): undefined reference to `init_gcl_cmputil'
> sys_gcl.c:(.text+0x3e0a): undefined reference to `init_gcl_cmploc'
> sys_gcl.c:(.text+0x3e87): undefined reference to `init_gcl_loop'
> sys_gcl.c:(.text+0x3f04): undefined reference to `init_gcl_cmpif'
> sys_gcl.c:(.text+0x3f81): undefined reference to `init_gcl_cmpbind'
> sys_gcl.c:(.text+0x3ffe): undefined reference to `init_gcl_cmptag'
> sys_gcl.c:(.text+0x407b): undefined reference to `init_gcl_serror'
> sys_gcl.c:(.text+0x40f8): undefined reference to `init_gcl_cmpflet'
> sys_gcl.c:(.text+0x4175): undefined reference to `init_gcl_info'
> sys_gcl.c:(.text+0x41f2): undefined reference to `init_gcl_cmpmulti'
> sys_gcl.c:(.text+0x426f): undefined reference to `init_gcl_make_defpackage'
> sys_gcl.c:(.text+0x42ec): undefined reference to `init_gcl_cmplam'
> sys_gcl.c:(.text+0x4369): undefined reference to `init_gcl_cmpcall'
> sys_gcl.c:(.text+0x43e6): undefined reference to `init_gcl_cmpvar'
> sys_gcl.c:(.text+0x4463): undefined reference to `init_gcl_sloop'
> sys_gcl.c:(.text+0x44e0): undefined reference to `init_gcl_cmpeval'
> sys_gcl.c:(.text+0x455d): undefined reference to `init_gcl_debug'
> sys_gcl.c:(.text+0x45da): undefined reference to `init_gcl_cmpmap'
> sys_gcl.c:(.text+0x4657): undefined reference to `init_gcl_defpackage'
> sys_gcl.c:(.text+0x46d4): undefined reference to `init_gcl_cmplabel'
> sys_gcl.c:(.text+0x4751): undefined reference to `init_gcl_cmpblock'
> sys_gcl.c:(.text+0x47ce): undefined reference to `init_gcl_cmptop'
> sys_gcl.c:(.text+0x484b): undefined reference to
> `init_gcl_destructuring_bind'
> sys_gcl.c:(.text+0x48c8): undefined reference to `init_gcl_cmpfun'
> sys_gcl.c:(.text+0x4945): undefined reference to `init_gcl_cmptype'
> sys_gcl.c:(.text+0x49c2): undefined reference to `init_gcl_cmpspecial'
> sys_gcl.c:(.text+0x4a3f): undefined reference to `init_gcl_cmpinline'
> sys_gcl.c:(.text+0x4abc): undefined reference to `init_gcl_cmplet'
> sys_gcl.c:(.text+0x4b39): undefined reference to `init_gcl_cmpcatch'
> sys_gcl.c:(.text+0x4bb2): undefined reference to `init_gcl_cmpvs'
> ./libgcl.a(sys_gcl.o): In function `gcl_init_init':
> sys_gcl.c:(.text+0x525d): undefined reference to `init_gcl_defmacro'
> sys_gcl.c:(.text+0x52c7): undefined reference to `init_gcl_evalmacros'
> sys_gcl.c:(.text+0x5331): undefined reference to `init_gcl_top'
> sys_gcl.c:(.text+0x539c): undefined reference to `init_gcl_module'
> collect2: ld returned 1 exit status
> make[4]: *** [raw_gcl_map] Error 1
> make[4]: Leaving directory `/home/axiom/silver/lsp/gcl-2.6.8pre/unixport'
> make[3]: *** [unixport/saved_gcl] Error 2
> make[3]: Leaving directory `/home/axiom/silver/lsp/gcl-2.6.8pre'
> /bin/sh: line 5: unixport/saved_gcl: No such file or directory
> make[2]: *** [gcldir] Error 127
> make[2]: Leaving directory `/home/axiom/silver/lsp'
> make[1]: *** [lspdir] Error 2
> make[1]: Leaving directory `/home/axiom/silver'
> make: *** [all] Error 2
> 
> 
> P.S.: The native GCL that comes with the system (Gentoo Linux) is 2.6.7
> and installs fine.
> 
> 
> _______________________________________________
> Axiom-developer mailing list
> list
> http://lists.nongnu.org/mailman/listinfo/axiom-developer
> ------- End of forwarded message -------
> 

Can I have it use the installed GCL? The version in Portage on Gentoo is
2.6.7 and it installs OK.

\start
Date: Sat, 15 Sep 2007 13:05:49 -0700
From: Ed Borasky
To: Tim Daly
Subject: re: GCL on an AMD64 Linux system?
Cc: Camm Maguire

Ed Borasky wrote:
> root wrote:
>> Ed,
>>
>> I've forwarded your email to Camm Maguire, the GCL maintainer.
>>
>> It appears to be failing during GCL build. If you are using the
>> Axiom distribution there is a variable in the top level 
>> Makefile that can be set to different distributions of GCL
>> (the old distros are available in the CVS archives in the zips 
>> directory, I probably have a copy if you can't find it). 
>> If you have the appropriate GCL tar file, for example
>>   gcl-2.6.7.tgz
>> and you set the 
>>   GCLVERSION=gcl-2.6.7
>> then Axiom will build on that version of GCL from the zips archive.
>>
>> Tim
> 
> Can I have it use the installed GCL? The version in Portage on Gentoo is
> 2.6.7 and it installs OK.


It turns out the gcl-2.6.7 tarball is there in "zips", so I just edited
the Makefile for 2.6.7 and it's now building. Meanwhile, I would
actually like to use one of the installed Lisps on my systems to build
Axiom -- I have a choice of SBCL, Clisp, GCL (and CMUCL but only on the
32-bit systems). Normally I just install SBCL because it works with
Maxima and the Lisp music codes I run.

\start
Date: Sun, 16 Sep 2007 00:05:50 -0000
From: Tim Daly
To: Ed Borasky
Subject: re: GCL on an AMD64 Linux system?
Cc: Camm Maguire

Ed,

Ed Borasky wrote:
>> root wrote:
>>> Ed,
>>>
>>> I've forwarded your email to Camm Maguire, the GCL maintainer.
>>>
>>> It appears to be failing during GCL build. If you are using the
>>> Axiom distribution there is a variable in the top level 
>>> Makefile that can be set to different distributions of GCL
>>> (the old distros are available in the CVS archives in the zips 
>>> directory, I probably have a copy if you can't find it). 
>>> If you have the appropriate GCL tar file, for example
>>>   gcl-2.6.7.tgz
>>> and you set the 
>>>   GCLVERSION=gcl-2.6.7
>>> then Axiom will build on that version of GCL from the zips archive.
>>>
>>> Tim
>> 
>> Can I have it use the installed GCL? The version in Portage on Gentoo is
>> 2.6.7 and it installs OK.
>
>
>It turns out the gcl-2.6.7 tarball is there in "zips", so I just edited
>the Makefile for 2.6.7 and it's now building. Meanwhile, I would
>actually like to use one of the installed Lisps on my systems to build
>Axiom -- I have a choice of SBCL, Clisp, GCL (and CMUCL but only on the
>32-bit systems). Normally I just install SBCL because it works with
>Maxima and the Lisp music codes I run.

Axiom cannot use the installed lisp as it is currently configured.
If you wish you could copy the obj/linux/bin/lisp to your system
location and use it as your GCL image. The only change is that it
links some routines used for communications to sman, which should
be transparent for all other uses.

\start
Date: Sat, 15 Sep 2007 17:21:00 -0700
From: Ed Borasky
To: Tim Daly
Subject: re: GCL on an AMD64 Linux system?
Cc: Camm Maguire

root wrote:

> 
> Axiom cannot use the installed lisp as it is currently configured.
> If you wish you could copy the obj/linux/bin/lisp to your system
> location and use it as your GCL image. The only change is that it
> links some routines used for communications to sman, which should
> be transparent for all other uses.

Ah -- I'll try that. Meanwhile, the Axiom build with gcl-2.6.7 completed
fine on the AMD64, so I guess 2.6.8pre2 is broken. One minor hitch:
apparently when you do a "make install", it's not doing a "mkdir -p":

znmeb@DreamScape /home/axiom/silver $ sudo make install
78 installing Axiom in /usr/local/axiom
/bin/sh: /usr/local/axiom/mnt//bin/axiom: No such file or directory
make: *** [install] Error 1

This is easy to work around, though:

znmeb@DreamScape /home/axiom/silver $ sudo mkdir -p
/usr/local/axiom/mnt//bin
znmeb@DreamScape /home/axiom/silver $ sudo make install
78 installing Axiom in /usr/local/axiom
79 Axiom installation finished.

Please add /usr/local/axiom/mnt//bin to your PATH variable
Start Axiom with the command axiom

znmeb@DreamScape /home/axiom/silver $

\start
Date: 15 Sep 2007 19:57:54 -0500
From: Gabriel Dos Reis
To: Ed Borasky
Subject: re: GCL on an AMD64 Linux system?

Ed Borasky writes:

| root wrote:
| 
| > 
| > Axiom cannot use the installed lisp as it is currently configured.
| > If you wish you could copy the obj/linux/bin/lisp to your system
| > location and use it as your GCL image. The only change is that it
| > links some routines used for communications to sman, which should
| > be transparent for all other uses.
| 
| Ah -- I'll try that.

Personally, I would not overwrite a system installed Lisp image (or
any other system installed piece of software) with something built
from elsewhere -- but that is just me.

\start
Date: Sun, 16 Sep 2007 00:56:12 -0000
From: Tim Daly
To: Ed Borasky
Subject: re: GCL on an AMD64 Linux system?
Cc: Camm Maguire

>Ah -- I'll try that. Meanwhile, the Axiom build with gcl-2.6.7 completed
>fine on the AMD64, so I guess 2.6.8pre2 is broken. One minor hitch:
>apparently when you do a "make install", it's not doing a "mkdir -p":
>
>znmeb@DreamScape /home/axiom/silver $ sudo make install
>78 installing Axiom in /usr/local/axiom
>/bin/sh: /usr/local/axiom/mnt//bin/axiom: No such file or directory
>make: *** [install] Error 1
>
>This is easy to work around, though:
>
>znmeb@DreamScape /home/axiom/silver $ sudo mkdir -p
>/usr/local/axiom/mnt//bin
>znmeb@DreamScape /home/axiom/silver $ sudo make install
>78 installing Axiom in /usr/local/axiom
>79 Axiom installation finished.

The first line of the install stanza reads:
  @mkdir -p ${DESTDIR}
so I'm not sure what might have failed.

Note that your DESTDIR appears to have two // 
although my test here shows that this works and does the right thing.

Can you post your command line?

\start
Date: Sun, 16 Sep 2007 10:07:25 +0700 (NOVST)
From: Andrey G. Grozin
To: Ed Borasky
Subject: re: GCL on an AMD64 Linux system?

On Sat, 15 Sep 2007, Ed Borasky wrote:
> It turns out the gcl-2.6.7 tarball is there in "zips", so I just edited
> the Makefile for 2.6.7 and it's now building. Meanwhile, I would
> actually like to use one of the installed Lisps on my systems to build
> Axiom -- I have a choice of SBCL, Clisp, GCL (and CMUCL but only on the
> 32-bit systems). Normally I just install SBCL because it works with
> Maxima and the Lisp music codes I run.
I'll say a thing which is taboo in this mailing list :-(
Some other free CASs (not to be named here) which are descendants of the 
same codebase freed by NAG can be built with sbcl. Axiom at the moment can 
only be built with the non-ansi (old-fashioned) variant of gcl (note that 
maxima requires an ansi gcl). So, if you emerge gcl with USU=+ansi, you 
can build maxima; if you emerge it with -ansi, you can (maybe) build 
axiom; but never both.

\start
Date: Sat, 15 Sep 2007 22:18:03 -0500
From: Tim Daly
To: list
Subject: 20070915.02.tpd.patch (bug 100)

This code used to cause an infinite loop that eventually killed Axiom.
The bug exists in the intef.spad, in ElementaryIntegration (INTEF),
in the routines lfextendedint and lflimitedint.

The input

  integrate((z^a+1)^b,z)

triggers the bug because of line 2 of each function.
Line 2 of these functions used to read:

      symbolIfCan(k := kmax(l := union(l, varselect(kernels g, x))))


The loop occurs when the call to union causes 

                     a log(z)
                   %e        

to get added to the list every time. This gives the argument to kmax 

                 a log(z)
      arg1= [z,%e        ]

and the result being

        a log(z)
      %e

We keep coming back to process this term, which ends up 
putting the same term back on the list and we loop.
Waldek's solution is to remove the union call. 

If we look at the original problem we see:
integrate((z^a+1)^b,z)

           z
         ++     a     b
   (1)   |   (%I  + 1) d%I
        ++
                                          Type: Union(Expression Integer,...)

and if we replace %I by z we get the original expression

           z
         ++    a     b
         |   (z  + 1) dz
        ++


=========================================================================
diff --git a/changelog b/changelog
index d6c0bdd..9baab4b 100644
--- a/changelog
+++ b/changelog
@@ -1,3 +1,7 @@
+20070915 tpd merge bug100 branch
+20070915 tpd src/input/Makefile add bug100.input regression test
+20070915 tpd src/input/bug100.input test integrate((z^a+1)^b,z) infinite loop
+20070915 wxh src/algebra/intef.spad fix integrate((z^a+1)^b,z) infinite loop
 20070915 tpd src/algebra/carten minor edit for regression cleanup
 20070914 wxh src/hyper/hyper fix bad bracing of )hd change
 20070914 tpd src/algebra/fraction.spad remove double )spool command
diff --git a/src/algebra/intef.spad.pamphlet b/src/algebra/intef.spad.pamphlet
index 4dbbc26..955d284 100644
--- a/src/algebra/intef.spad.pamphlet
+++ b/src/algebra/intef.spad.pamphlet
@@ -227,9 +227,41 @@ ElementaryIntegration(R, F): Exports == Implementation where
         algint(f, t, y, differentiate(#1, differentiate(#1, x),
                                             differentiate(t::F, x)::UP))
 
+@
+Bug \#100 is an infinite loop that eventually kills Axiom 
+from the input
+\begin{verbatim}
+  integrate((z^a+1)^b,z)
+\end{verbatim}
+
+Line 2 of this function used to read:
+\begin{verbatim}
+      symbolIfCan(k := kmax(l := union(l, varselect(kernels g, x))))
+\end{verbatim}
+
+The loop occurs when the call to union causes 
+\begin{verbatim}
+                     a log(z)
+                   %e        
+\end{verbatim}
+to get added to the list every time. This gives the argument to kmax 
+\begin{verbatim}
+                 a log(z)
+      arg1= [z,%e        ]
+\end{verbatim}
+and the result being
+\begin{verbatim}
+        a log(z)
+      %e
+\end{verbatim}
+We keep coming back to process this term, which ends up 
+putting the same term back on the list and we loop.
+Waldek's solution is to remove the union call. 
+
+<<package INTEF ElementaryIntegration>>=
     lfextendedint(f, x, g) ==
       empty?(l := varselect(kernels f, x)) => [x::F * f, 0]
-      symbolIfCan(k := kmax(l := union(l, varselect(kernels g, x))))
+      symbolIfCan(k := kmax(l))
         case SE =>
           map(multivariate(#1, k), extendedint(univariate(f, k),
                                                univariate(g, k)))
@@ -238,9 +270,16 @@ ElementaryIntegration(R, F): Exports == Implementation where
       has?(operator k, ALGOP) => alglfextint(f, k, l, x, g)
       unkextint(f, x, g)
 
+@
+This is part of the fix for bug 100. Line 2 of this function used to read:
+\begin{verbatim}
+      symbolIfCan(k := kmax(l := union(l, vark(lu, x)))) case SE =>
+\end{verbatim}
+See the above discussion for why this causes an infinite loop.
+<<package INTEF ElementaryIntegration>>=
     lflimitedint(f, x, lu) ==
       empty?(l := varselect(kernels f, x)) => [x::F * f, empty()]
-      symbolIfCan(k := kmax(l := union(l, vark(lu, x)))) case SE =>
+      symbolIfCan(k := kmax(l)) case SE =>
        map(multivariate(#1, k), limitedint(univariate(f, k),
                                         [univariate(u, k) for u in lu]))
       is?(k, "exp"::SE) => explimint(f, x, k, lu)
diff --git a/src/input/Makefile.pamphlet b/src/input/Makefile.pamphlet
index 16a3b98..92c1dc5 100644
--- a/src/input/Makefile.pamphlet
+++ b/src/input/Makefile.pamphlet
@@ -287,7 +287,7 @@ REGRES= algaggr.regress algbrbf.regress  algfacob.regress alist.regress  \
     arrows.regress    assign.regress   atansqrt.regress \
     asec.regress      bags.regress      bbtree.regress \
     binary.regress    bop.regress      bstree.regress   bouquet.regress \
-    bug10069.regress \
+    bug100.regress    bug10069.regress \
     bugs.regress      bug10312.regress bug6357.regress  bug9057.regress \
     calcprob.regress  \
     calculus2.regress calculus.regress cardinal.regress card.regress \
@@ -502,7 +502,8 @@ FILES= ${OUT}/algaggr.input  ${OUT}/algbrbf.input    ${OUT}/algfacob.input \
        ${OUT}/bags.input     ${OUT}/bbtree.input     ${OUT}/bern.input \
        ${OUT}/bernpoly.input ${OUT}/binary.input     ${OUT}/bop.input \
        ${OUT}/bouquet.input  ${OUT}/bstree.input     ${OUT}/bug6357.input \
-       ${OUT}/bug9057.input  ${OUT}/bug10069.input   ${OUT}/bug10312.input \
+       ${OUT}/bug9057.input  ${OUT}/bug100.input \
+       ${OUT}/bug10069.input ${OUT}/bug10312.input \
        ${OUT}/calcprob.input ${OUT}/calculus.input \
        ${OUT}/cardinal.input ${OUT}/card.input       ${OUT}/carten.input \
        ${OUT}/cclass.input   ${OUT}/cdraw.input      ${OUT}/char.input \
@@ -677,6 +678,7 @@ DOCFILES= \
   ${DOC}/bernpoly.input.dvi    ${DOC}/binary.input.dvi     \
   ${DOC}/bop.input.dvi         ${DOC}/bouquet.input.dvi    \
   ${DOC}/bstree.input.dvi      ${DOC}/bug10069.input.dvi   \
+  ${DOC}/bug100.input.dvi \
   ${DOC}/bug10312.input.dvi    ${DOC}/bug6357.input.dvi    \
   ${DOC}/bug9057.input.dvi     ${DOC}/bugs.input.dvi       \
   ${DOC}/c02aff.input.dvi      ${DOC}/c02agf.input.dvi     \
diff --git a/src/input/bug100.input.pamphlet b/src/input/bug100.input.pamphlet
new file mode 100644
index 0000000..799d339
--- /dev/null
+++ b/src/input/bug100.input.pamphlet
@@ -0,0 +1,80 @@
+\documentclass{article}
+\usepackage{axiom}
+\begin{document}
+\title{\$SPAD/src/input bug100.input}
+\author{Timothy Daly}
+\maketitle
+\begin{abstract}
+\end{abstract}
+\eject
+\tableofcontents
+\eject
+@
+This code used to cause an infinite loop that eventually killed Axiom.
+The bug exists in the {\tt intef.spad}, in ElementaryIntegration (INTEF),
+in the routines {\tt lfextendedint} and {\tt lflimitedint}.
+
+The input
+\begin{verbatim}
+  integrate((z^a+1)^b,z)
+\end{verbatim}
+triggers the bug because of line 2 of each function.
+Line 2 of these functions used to read:
+\begin{verbatim}
+      symbolIfCan(k := kmax(l := union(l, varselect(kernels g, x))))
+\end{verbatim}
+
+The loop occurs when the call to union causes 
+\begin{verbatim}
+                     a log(z)
+                   %e        
+\end{verbatim}
+to get added to the list every time. This gives the argument to kmax 
+\begin{verbatim}
+                 a log(z)
+      arg1= [z,%e        ]
+\end{verbatim}
+and the result being
+\begin{verbatim}
+        a log(z)
+      %e
+\end{verbatim}
+We keep coming back to process this term, which ends up 
+putting the same term back on the list and we loop.
+Waldek's solution is to remove the union call. 
+
+<<*>>=
+)spool bug100.output
+)set message test on
+)set message auto off
+)clear all
+ 
+--S 1 of 1
+integrate((z^a+1)^b,z)
+--R
+--R           z
+--R         ++     a     b
+--R   (1)   |   (%I  + 1) d%I
+--R        ++
+--R                                          Type: Union(Expression Integer,...)
+--E 1
+@
+If we substitute z for %I we get:
+\begin{verbatim}
+           z
+         ++    a     b
+         |   (z  + 1) dz
+        ++
+
+\end{verbatim}
+which is the original input integral.
+<<*>>=
+)spool 
+)lisp (bye)
+ 
+@
+\eject
+\begin{thebibliography}{99}
+\bibitem{1} nothing
+\end{thebibliography}
+\end{document}

\start
Date: Sat, 15 Sep 2007 21:56:20 -0700
From: Ed Borasky
To: Tim Daly
Subject: re: GCL on an AMD64 Linux system?
Cc: Camm Maguire

root wrote:
>> Ah -- I'll try that. Meanwhile, the Axiom build with gcl-2.6.7 completed
>> fine on the AMD64, so I guess 2.6.8pre2 is broken. One minor hitch:
>> apparently when you do a "make install", it's not doing a "mkdir -p":
>>
>> znmeb@DreamScape /home/axiom/silver $ sudo make install
>> 78 installing Axiom in /usr/local/axiom
>> /bin/sh: /usr/local/axiom/mnt//bin/axiom: No such file or directory
>> make: *** [install] Error 1
>>
>> This is easy to work around, though:
>>
>> znmeb@DreamScape /home/axiom/silver $ sudo mkdir -p
>> /usr/local/axiom/mnt//bin
>> znmeb@DreamScape /home/axiom/silver $ sudo make install
>> 78 installing Axiom in /usr/local/axiom
>> 79 Axiom installation finished.
> 
> The first line of the install stanza reads:
>   @mkdir -p ${DESTDIR}
> so I'm not sure what might have failed.
> 
> Note that your DESTDIR appears to have two // 
> although my test here shows that this works and does the right thing.
> 
> Can you post your command line?
> 
> Tim
> 

Let me do some digging ... but ...

1. The // was copied and pasted. The "sudo make install" (first time)
responded with

/bin/sh: /usr/local/axiom/mnt//bin/axiom: No such file or directory

Note the double slashes.

2. Yes, in most cases a double slash "does the right thing", meaning it
behaves like a single slash. I don't even know if it's deprecated. I
don't do it deliberately, and when I spot one accidental, I fix it.

3. In the top level Makefile:

DESTDIR=/usr/local/axiom


So ... mkdir -p /usr/local/axiom

Here's the "install" code:

install:
  @echo 78 installing Axiom in ${DESTDIR}
  @mkdir -p ${DESTDIR}
  @cp -pr ${MNT} ${DESTDIR}
  @echo '#!/bin/sh -' >${COMMAND}
  @echo AXIOM=${DESTDIR}/mnt/${SYS} >>${COMMAND}
  @echo export AXIOM >>${COMMAND}
  @echo PATH='$${AXIOM}/bin':'$${PATH}' >>${COMMAND}
  @echo export PATH >>${COMMAND}
  @cat ${INT}/sman/axiom >>${COMMAND}
  @chmod +x ${COMMAND}
  @echo 79 Axiom installation finished.
  @echo
  @echo Please add $(shell dirname ${COMMAND}) to your PATH variable
  @echo Start Axiom with the command $(shell basename ${COMMAND})
  @echo

So ... it did the "mkdir -p". It must have crashed somewhere below that.

So ... I removed the installed Axiom and did the "sudo make install"
over. It did the "mkdir -p" and the "cp -pr" -- I can see the outputs in
/usr/local/axiom. The next line starts building the file COMMAND.

So what's COMMAND?

COMMAND=${DESTDIR}/mnt/${SYS}/bin/axiom

Somehow ${SYS}, which should be "linux", got erased? That's where the
double slashes came from.

Edit the Makefile:
#SYS=$(notdir $(AXIOM))
SYS=linux

Success!!
znmeb@DreamScape /home/axiom/silver $ sudo make install
78 installing Axiom in /usr/local/axiom
79 Axiom installation finished.

Please add /usr/local/axiom/mnt/linux/bin to your PATH variable
Start Axiom with the command axiom

So ... what does all that say?

\start
Date: Sun, 16 Sep 2007 05:16:10 -0000
From: Tim Daly
To: Ed Borasky
Subject: re: GCL on an AMD64 Linux system?
Cc: Camm Maguire

root wrote:
>>> Ah -- I'll try that. Meanwhile, the Axiom build with gcl-2.6.7 completed
>>> fine on the AMD64, so I guess 2.6.8pre2 is broken. One minor hitch:
>>> apparently when you do a "make install", it's not doing a "mkdir -p":
>>>
>>> znmeb@DreamScape /home/axiom/silver $ sudo make install
>>> 78 installing Axiom in /usr/local/axiom
>>> /bin/sh: /usr/local/axiom/mnt//bin/axiom: No such file or directory
>>> make: *** [install] Error 1
>>>
>>> This is easy to work around, though:
>>>
>>> znmeb@DreamScape /home/axiom/silver $ sudo mkdir -p
>>> /usr/local/axiom/mnt//bin
>>> znmeb@DreamScape /home/axiom/silver $ sudo make install
>>> 78 installing Axiom in /usr/local/axiom
>>> 79 Axiom installation finished.
>> 
>> The first line of the install stanza reads:
>>   @mkdir -p ${DESTDIR}
>> so I'm not sure what might have failed.
>> 
>> Note that your DESTDIR appears to have two // 
>> although my test here shows that this works and does the right thing.
>> 
>> Can you post your command line?
>> 
>> Tim
>> 
>
>Let me do some digging ... but ...
>
>1. The // was copied and pasted. The "sudo make install" (first time)
>responded with
>
>/bin/sh: /usr/local/axiom/mnt//bin/axiom: No such file or directory
>
>Note the double slashes.
>
>2. Yes, in most cases a double slash "does the right thing", meaning it
>behaves like a single slash. I don't even know if it's deprecated. I
>don't do it deliberately, and when I spot one accidental, I fix it.
>
>3. In the top level Makefile:
>
>DESTDIR=/usr/local/axiom
>
>
>So ... mkdir -p /usr/local/axiom
>
>Here's the "install" code:
>
>install:
>  @echo 78 installing Axiom in ${DESTDIR}
>  @mkdir -p ${DESTDIR}
>  @cp -pr ${MNT} ${DESTDIR}
>  @echo '#!/bin/sh -' >${COMMAND}
>  @echo AXIOM=${DESTDIR}/mnt/${SYS} >>${COMMAND}
>  @echo export AXIOM >>${COMMAND}
>  @echo PATH='$${AXIOM}/bin':'$${PATH}' >>${COMMAND}
>  @echo export PATH >>${COMMAND}
>  @cat ${INT}/sman/axiom >>${COMMAND}
>  @chmod +x ${COMMAND}
>  @echo 79 Axiom installation finished.
>  @echo
>  @echo Please add $(shell dirname ${COMMAND}) to your PATH variable
>  @echo Start Axiom with the command $(shell basename ${COMMAND})
>  @echo
>
>So ... it did the "mkdir -p". It must have crashed somewhere below that.
>
>So ... I removed the installed Axiom and did the "sudo make install"
>over. It did the "mkdir -p" and the "cp -pr" -- I can see the outputs in
>/usr/local/axiom. The next line starts building the file COMMAND.
>
>So what's COMMAND?
>
>COMMAND=${DESTDIR}/mnt/${SYS}/bin/axiom
>
>Somehow ${SYS}, which should be "linux", got erased? That's where the
>double slashes came from.
>
>Edit the Makefile:
>#SYS=$(notdir $(AXIOM))
>SYS=linux
>
>Success!!
>znmeb@DreamScape /home/axiom/silver $ sudo make install
>78 installing Axiom in /usr/local/axiom
>79 Axiom installation finished.
>
>Please add /usr/local/axiom/mnt/linux/bin to your PATH variable
>Start Axiom with the command axiom
>
>So ... what does all that say?
>
The build echos all of the known variables that get passed in the
ENV environment. One of those variables should be SYS.

The SYS variable is the last symbol of the AXIOM shell variable as in:

  export AXIOM=`pwd`/mnt/linux

   ==>

  SYS=linux

so potentially you did a 'make' in a shell that had the AXIOM variable set
and then did 'make install' in a new shell without the AXIOM variable set.

The sudo almost certainly did not copy your AXIOM shell variable.

I'll have to give this some thought.

\start
Date: Sat, 15 Sep 2007 22:27:51 -0700
From: Ed Borasky
To: Tim Daly
Subject: re: GCL on an AMD64 Linux system?
Cc: Camm Maguire

root wrote:
> root wrote:
>>>> Ah -- I'll try that. Meanwhile, the Axiom build with gcl-2.6.7 completed
>>>> fine on the AMD64, so I guess 2.6.8pre2 is broken. One minor hitch:
>>>> apparently when you do a "make install", it's not doing a "mkdir -p":
>>>>
>>>> znmeb@DreamScape /home/axiom/silver $ sudo make install
>>>> 78 installing Axiom in /usr/local/axiom
>>>> /bin/sh: /usr/local/axiom/mnt//bin/axiom: No such file or directory
>>>> make: *** [install] Error 1
>>>>
>>>> This is easy to work around, though:
>>>>
>>>> znmeb@DreamScape /home/axiom/silver $ sudo mkdir -p
>>>> /usr/local/axiom/mnt//bin
>>>> znmeb@DreamScape /home/axiom/silver $ sudo make install
>>>> 78 installing Axiom in /usr/local/axiom
>>>> 79 Axiom installation finished.
>>> The first line of the install stanza reads:
>>>   @mkdir -p ${DESTDIR}
>>> so I'm not sure what might have failed.
>>>
>>> Note that your DESTDIR appears to have two // 
>>> although my test here shows that this works and does the right thing.
>>>
>>> Can you post your command line?
>>>
>>> Tim
>>>
>> Let me do some digging ... but ...
>>
>> 1. The // was copied and pasted. The "sudo make install" (first time)
>> responded with
>>
>> /bin/sh: /usr/local/axiom/mnt//bin/axiom: No such file or directory
>>
>> Note the double slashes.
>>
>> 2. Yes, in most cases a double slash "does the right thing", meaning it
>> behaves like a single slash. I don't even know if it's deprecated. I
>> don't do it deliberately, and when I spot one accidental, I fix it.
>>
>> 3. In the top level Makefile:
>>
>> DESTDIR=/usr/local/axiom
>>
>>
>> So ... mkdir -p /usr/local/axiom
>>
>> Here's the "install" code:
>>
>> install:
>>  @echo 78 installing Axiom in ${DESTDIR}
>>  @mkdir -p ${DESTDIR}
>>  @cp -pr ${MNT} ${DESTDIR}
>>  @echo '#!/bin/sh -' >${COMMAND}
>>  @echo AXIOM=${DESTDIR}/mnt/${SYS} >>${COMMAND}
>>  @echo export AXIOM >>${COMMAND}
>>  @echo PATH='$${AXIOM}/bin':'$${PATH}' >>${COMMAND}
>>  @echo export PATH >>${COMMAND}
>>  @cat ${INT}/sman/axiom >>${COMMAND}
>>  @chmod +x ${COMMAND}
>>  @echo 79 Axiom installation finished.
>>  @echo
>>  @echo Please add $(shell dirname ${COMMAND}) to your PATH variable
>>  @echo Start Axiom with the command $(shell basename ${COMMAND})
>>  @echo
>>
>> So ... it did the "mkdir -p". It must have crashed somewhere below that.
>>
>> So ... I removed the installed Axiom and did the "sudo make install"
>> over. It did the "mkdir -p" and the "cp -pr" -- I can see the outputs in
>> /usr/local/axiom. The next line starts building the file COMMAND.
>>
>> So what's COMMAND?
>>
>> COMMAND=${DESTDIR}/mnt/${SYS}/bin/axiom
>>
>> Somehow ${SYS}, which should be "linux", got erased? That's where the
>> double slashes came from.
>>
>> Edit the Makefile:
>> #SYS=$(notdir $(AXIOM))
>> SYS=linux
>>
>> Success!!
>> znmeb@DreamScape /home/axiom/silver $ sudo make install
>> 78 installing Axiom in /usr/local/axiom
>> 79 Axiom installation finished.
>>
>> Please add /usr/local/axiom/mnt/linux/bin to your PATH variable
>> Start Axiom with the command axiom
>>
>> So ... what does all that say?
>>
> The build echos all of the known variables that get passed in the
> ENV environment. One of those variables should be SYS.
> 
> The SYS variable is the last symbol of the AXIOM shell variable as in:
> 
>   export AXIOM=`pwd`/mnt/linux
> 
>    ==>
> 
>   SYS=linux
> 
> so potentially you did a 'make' in a shell that had the AXIOM variable set
> and then did 'make install' in a new shell without the AXIOM variable set.
> 
> The sudo almost certainly did not copy your AXIOM shell variable.
> 
> I'll have to give this some thought.
> 
> Tim
> 
That should be easy to test, though -- do the whole build as root and
all the environment variables will be set all the way through. It won't
take me long to check it -- it's less than an hour on an Athlon64 X2
5200+ :).

\start
Date: Sat, 15 Sep 2007 22:40:10 -0700
From: Ed Borasky
To: Tim Daly
Subject: re: GCL on an AMD64 Linux system?
Cc: Camm Maguire

Ed Borasky wrote:
> root wrote:
>> root wrote:
>>>>> Ah -- I'll try that. Meanwhile, the Axiom build with gcl-2.6.7 completed
>>>>> fine on the AMD64, so I guess 2.6.8pre2 is broken. One minor hitch:
>>>>> apparently when you do a "make install", it's not doing a "mkdir -p":
>>>>>
>>>>> znmeb@DreamScape /home/axiom/silver $ sudo make install
>>>>> 78 installing Axiom in /usr/local/axiom
>>>>> /bin/sh: /usr/local/axiom/mnt//bin/axiom: No such file or directory
>>>>> make: *** [install] Error 1
>>>>>
>>>>> This is easy to work around, though:
>>>>>
>>>>> znmeb@DreamScape /home/axiom/silver $ sudo mkdir -p
>>>>> /usr/local/axiom/mnt//bin
>>>>> znmeb@DreamScape /home/axiom/silver $ sudo make install
>>>>> 78 installing Axiom in /usr/local/axiom
>>>>> 79 Axiom installation finished.
>>>> The first line of the install stanza reads:
>>>>   @mkdir -p ${DESTDIR}
>>>> so I'm not sure what might have failed.
>>>>
>>>> Note that your DESTDIR appears to have two // 
>>>> although my test here shows that this works and does the right thing.
>>>>
>>>> Can you post your command line?
>>>>
>>>> Tim
>>>>
>>> Let me do some digging ... but ...
>>>
>>> 1. The // was copied and pasted. The "sudo make install" (first time)
>>> responded with
>>>
>>> /bin/sh: /usr/local/axiom/mnt//bin/axiom: No such file or directory
>>>
>>> Note the double slashes.
>>>
>>> 2. Yes, in most cases a double slash "does the right thing", meaning it
>>> behaves like a single slash. I don't even know if it's deprecated. I
>>> don't do it deliberately, and when I spot one accidental, I fix it.
>>>
>>> 3. In the top level Makefile:
>>>
>>> DESTDIR=/usr/local/axiom
>>>
>>>
>>> So ... mkdir -p /usr/local/axiom
>>>
>>> Here's the "install" code:
>>>
>>> install:
>>>  @echo 78 installing Axiom in ${DESTDIR}
>>>  @mkdir -p ${DESTDIR}
>>>  @cp -pr ${MNT} ${DESTDIR}
>>>  @echo '#!/bin/sh -' >${COMMAND}
>>>  @echo AXIOM=${DESTDIR}/mnt/${SYS} >>${COMMAND}
>>>  @echo export AXIOM >>${COMMAND}
>>>  @echo PATH='$${AXIOM}/bin':'$${PATH}' >>${COMMAND}
>>>  @echo export PATH >>${COMMAND}
>>>  @cat ${INT}/sman/axiom >>${COMMAND}
>>>  @chmod +x ${COMMAND}
>>>  @echo 79 Axiom installation finished.
>>>  @echo
>>>  @echo Please add $(shell dirname ${COMMAND}) to your PATH variable
>>>  @echo Start Axiom with the command $(shell basename ${COMMAND})
>>>  @echo
>>>
>>> So ... it did the "mkdir -p". It must have crashed somewhere below that.
>>>
>>> So ... I removed the installed Axiom and did the "sudo make install"
>>> over. It did the "mkdir -p" and the "cp -pr" -- I can see the outputs in
>>> /usr/local/axiom. The next line starts building the file COMMAND.
>>>
>>> So what's COMMAND?
>>>
>>> COMMAND=${DESTDIR}/mnt/${SYS}/bin/axiom
>>>
>>> Somehow ${SYS}, which should be "linux", got erased? That's where the
>>> double slashes came from.
>>>
>>> Edit the Makefile:
>>> #SYS=$(notdir $(AXIOM))
>>> SYS=linux
>>>
>>> Success!!
>>> znmeb@DreamScape /home/axiom/silver $ sudo make install
>>> 78 installing Axiom in /usr/local/axiom
>>> 79 Axiom installation finished.
>>>
>>> Please add /usr/local/axiom/mnt/linux/bin to your PATH variable
>>> Start Axiom with the command axiom
>>>
>>> So ... what does all that say?
>>>
>> The build echos all of the known variables that get passed in the
>> ENV environment. One of those variables should be SYS.
>>
>> The SYS variable is the last symbol of the AXIOM shell variable as in:
>>
>>   export AXIOM=`pwd`/mnt/linux
>>
>>    ==>
>>
>>   SYS=linux
>>
>> so potentially you did a 'make' in a shell that had the AXIOM variable set
>> and then did 'make install' in a new shell without the AXIOM variable set.
>>
>> The sudo almost certainly did not copy your AXIOM shell variable.
>>
>> I'll have to give this some thought.
>>
>> Tim
>>
> That should be easy to test, though -- do the whole build as root and
> all the environment variables will be set all the way through. It won't
> take me long to check it -- it's less than an hour on an Athlon64 X2
> 5200+ :).
> 
> 
> _______________________________________________
> Axiom-developer mailing list
> list
> http://lists.nongnu.org/mailman/listinfo/axiom-developer
> 

So ... log in as "root", set the environment variables, remove the
install, do another "make install":
DreamScape ~ # cd /home/axiom/silver/
DreamScape silver # rm -fr /usr/local/axiom/
DreamScape silver # export AXIOM=/home/axiom/silver/mnt/linux
DreamScape silver # export PATH=$AXIOM/bin:$PATH
DreamScape silver # make install
78 installing Axiom in /usr/local/axiom
79 Axiom installation finished.

Please add /usr/local/axiom/mnt/linux/bin to your PATH variable
Start Axiom with the command axiom

So that works ... worst case is you have to do the whole build as "root"
or reset the environment variables between a non-root make and a root
make install.

But sudo needs another excuse for not knowing ${SYS} = linux:

znmeb@DreamScape /home/axiom/silver $ sudo rm -fr /usr/local/axiom/
znmeb@DreamScape /home/axiom/silver $ export
AXIOM=/home/axiom/silver/mnt/linux
znmeb@DreamScape /home/axiom/silver $ export PATH=$AXIOM/bin:$PATH
znmeb@DreamScape /home/axiom/silver $ sudo echo $AXIOM
/home/axiom/silver/mnt/linux
znmeb@DreamScape /home/axiom/silver $ sudo echo $PATH
/home/axiom/silver/mnt/linux/bin:/home/axiom/silver/mnt/linux/bin:/usr/local/bin:/usr/bin:/bin:/usr/local/axiom/mnt/linux/bin:/opt/bin:/usr/x86_64-pc-linux-gnu/gcc-bin/4.2.0:/opt/blackdown-jdk-1.4.2.03/bin:/opt/blackdown-jdk-1.4.2.03/jre/bin:/usr/kde/3.5/bin:/usr/qt/3/bin
znmeb@DreamScape /home/axiom/silver $ sudo make install
78 installing Axiom in /usr/local/axiom
/bin/sh: /usr/local/axiom/mnt//bin/axiom: No such file or directory
make: *** [install] Error 1

It's seeing AXIOM and PATH as exported, which is the way I believe it's
supposed to behave.

\start
Date: Sun, 16 Sep 2007 05:47:18 -0000
From: Tim Daly
To: Ed Borasky
Subject: re: GCL on an AMD64 Linux system?
Cc: Camm Maguire

>That should be easy to test, though -- do the whole build as root and
>all the environment variables will be set all the way through. It won't
>take me long to check it -- it's less than an hour on an Athlon64 X2
>5200+ :).

envy :-) send the system to me and i'll test it here :-)
who makes the box?

\start
Date: Sat, 15 Sep 2007 22:51:54 -0700
From: Ed Borasky
To: Tim Daly
Subject: re: GCL on an AMD64 Linux system?
Cc: Camm Maguire

root wrote:
>> That should be easy to test, though -- do the whole build as root and
>> all the environment variables will be set all the way through. It won't
>> take me long to check it -- it's less than an hour on an Athlon64 X2
>> 5200+ :).
> 
> envy :-) send the system to me and i'll test it here :-)
> who makes the box?
> 
CompUSA, actually. You go buy a chassis, a motherboard, a processor, a
power supply, a hard drive, a DVD drive and some RAM and put it all
together. Or for a ridiculously low price, they'll do all that. It's
faster than Dell and cheaper. Actually I put in my own RAM ... that's easy.

I was going to get one of the tiny desktop ones from HP, but they only
went up to 2 GB and came with Windows Vista installed. I don't need that. :)

\start
Date: Sun, 16 Sep 2007 06:01:22 -0000
From: Tim Daly
To: Ed Borasky
Subject: re: GCL on an AMD64 Linux system?
Cc: Camm Maguire

try 
  user> export SHVAR=i/am/set
  user> echo $SHVAR
  user> sudo echo $SHVAR

\start
Date: Sun, 16 Sep 2007 08:12:07 -0700
From: Arthur Ralfs
To: list
Subject: Axiom server

This is just the previous example I posted with everything
in one pamphlet file and with the right license.  The documentation
is minimal at this point.

Arthur Ralfs

--------------040504080200010205090103
 name="axserver.pamphlet"
 filename="axserver.pamphlet"

\documentclass{article}
\usepackage{axiom}
\begin{document}
\title{\$SPAD/src/algebra axserver.spad}
\author{Arthur C. Ralfs}
\maketitle
\begin{abstract}
The AxiomServer package is designed to provide a web interface
to axiom.
\end{abstract}
\eject
\tableofcontents
\eject
\section{Preface}

\section{Lisp preliminaries}

Extract the lisp to a file named, say, http.lisp with the
command

notangle -RServer\ Lisp axserver.pamphlet > http.lisp

<<Server Lisp>>=
;; file: http.lisp

(defvar |StandardOutput| *standard-output*)

(defvar  |NewLine| '#\NewLine)

;; some regexp stuff

(defun |StringMatch| (s1 s2)
  (si::string-match s1 s2)
  )



(defun |ListMatches| (&rest args)
  (si::list-matches args)
  )

(defun |MatchBeginning| (i)
  (si::match-beginning i)
  )

(defun |MatchEnd| (i)
  (si::match-end i)
  )

;; the socket stuff


(defun |SiSock| (p spadfn)
;;  (format t "SiSocket-1")
  (si::socket p :server
	      (function
	       (lambda (w) (SPADCALL w spadfn) )
	       )
	      :daemon nil)
  )

(defun |SiListen| (s) 
;;  (format t "SiListen-1")
  (si::listen s)
  )
(defun |SiAccept| (s) (si::accept s))
(defun |SiCopyStream| (q s) (si::copy-stream q s))

;; Camm Maguire's modified demo server

(defun foo (s)
  (setq get "" pathvar "")
  (do ((c (read-char s) (read-char s)))
      ((eq c '#\Space))
      (setq get (concat get (string c)))
      )
  (write-line "get: ")
  (write-line get)
  (do ((c (read-char s) (read-char s nil 'the-end)))
      ((eq c '#\Space))
      (setq pathvar (concat pathvar (string c)))
      )
  (write-line "pathvar: ")
  (write-line pathvar)
  (when pathvar
    (if (pathname-name (pathname pathvar))
	(with-open-file (q pathvar) (si::copy-stream q s))
      (dolist (l (directory pathvar)) (format s "~a~%" (namestring l)))
      )
    )
  (close s)
  )
 

(defun bar (p fn) 
  (let ((s (si::socket p :server fn))) 
        (tagbody l 
                (when (si::listen s) 
                        (let ((w (si::accept s))) 
                                (foo w))) 
                (sleep 3) 
                (go l))))

;;(bar 8080 #'foo)

@

\section{Axiom Server}

Extract the AxiomServer package with the command

notangle axserver.pamphlet > axserver.spad

<<package AXSERV AxiomServer>>=

)abbrev package AXSERV AxiomServer
AxiomServer: public == private where

  public == with

    axServer: (Integer, SExpression->Void) -> Void
    multiServ: SExpression -> Void
    fileserver: SExpression -> Void
    axget: SExpression -> Void
    axpost: SExpression -> Void


  private == add

    getFile: (SExpression,String) -> Void
    getCommand: (SExpression,String) -> Void
    lastStep: () -> String
    lastType: () -> String
    formatMessages: String -> String
    formatMessages1: String -> String


    axServer(port:Integer,serverfunc:SExpression->Void):Void ==
      WriteLine("socketServer")$Lisp
      s := SiSock(port,serverfunc)$Lisp
      -- To listen for just one connection and then close the socket
      -- uncomment i := 0.
      i:Integer := 1
      while (i > 0) repeat
        if not null?(SiListen(s)$Lisp)$SExpression then
          w := SiAccept(s)$Lisp
          serverfunc(w)
--	  i := 0

    multiServ(s:SExpression):Void ==
          WriteLine("multiServ")$Lisp
	  headers:String := ""
	  char:String
	  -- read in the http headers
          while (char := STRING(READ_-CHAR_-NO_-HANG(s,NIL$Lisp,'EOF)$Lisp)$Lisp) ^= "EOF" repeat
              headers := concat [headers,char]
	  sayTeX$Lisp headers
          StringMatch("([^ ]*)", headers)$Lisp
          u:UniversalSegment(Integer)
          u := segment(MatchBeginning(1)$Lisp+1,MatchEnd(1)$Lisp)$UniversalSegment(Integer)
          reqtype:String := headers.u
          sayTeX$Lisp  concat ["request type: ",reqtype]
          if  reqtype = "GET" then
              StringMatch("GET ([^ ]*)",headers)$Lisp
              u:UniversalSegment(Integer)
              u := segment(MatchBeginning(1)$Lisp+1,MatchEnd(1)$Lisp)$UniversalSegment(Integer)
              getFile(s,headers.u)
          if reqtype = "POST" then
              StringMatch("command=(.*)$",headers)$Lisp
              u:UniversalSegment(Integer)
              u := segment(MatchBeginning(1)$Lisp+1,MatchEnd(1)$Lisp)$UniversalSegment(Integer)
              getCommand(s,headers.u)

    getFile(s:SExpression,pathvar:String):Void ==
        WriteLine("getFile")$Lisp
        if not null? PATHNAME_-NAME(PATHNAME(pathvar)$Lisp)$Lisp then
        -- display contents of file
            q:=OPEN(pathvar)$Lisp
        else
            q:=MAKE_-STRING_-INPUT_-STREAM("Problem with file path")$Lisp
        file:String := ""
        while (char := STRING(READ_-CHAR_-NO_-HANG(q,NIL$Lisp,'EOF)$Lisp)$Lisp) ^= "EOF" repeat
            file := concat [file,char]
        CLOSE(q)$Lisp
        file := concat ["Content-Length: ",string(#file),STRING(NewLine$Lisp)$Lisp,STRING(NewLine$Lisp)$Lisp,file]
	file := concat ["Connection: close",STRING(NewLine$Lisp)$Lisp,file]
	file := concat ["Content-Type: application/xhtml+xml",STRING(NewLine$Lisp)$Lisp,file]
	file := concat ["HTTP/1.1 200 OK",STRING(NewLine$Lisp)$Lisp,file]
        f:=MAKE_-STRING_-INPUT_-STREAM(file)$Lisp
        SiCopyStream(f,s)$Lisp
        CLOSE(f)$Lisp
	CLOSE(s)$Lisp

    getCommand(s:SExpression,command:String):Void ==
        WriteLine$Lisp concat ["getCommand: ",command]
	SETQ(tmpmathml$Lisp, MAKE_-STRING_-OUTPUT_-STREAM()$Lisp)$Lisp
	SETQ(tmpalgebra$Lisp, MAKE_-STRING_-OUTPUT_-STREAM()$Lisp)$Lisp
	SETQ(savemathml$Lisp, _$texOutputStream$Lisp)$Lisp
	SETQ(savealgebra$Lisp, _$algebraOutputStream$Lisp)$Lisp
	SETQ(_$texOutputStream$Lisp,tmpmathml$Lisp)$Lisp
	SETQ(_$algebraOutputStream$Lisp,tmpalgebra$Lisp)$Lisp
--	parseAndInterpret$Lisp command
--	parseAndEvalStr$Lisp command
-- The previous two commands don't exit nicely when a syntactically incorrect command is
-- given to them.  They somehow need to be wrapped in CATCH statements but I haven't 
-- figured out how to do this.  parseAndEvalToStringEqNum  uses the following CATCH
-- statements to call parseAndEvalStr but when I try these they don't work.  I get a
-- "NIL is not a valid identifier to use in AXIOM" message. Using parseAndEvalToStringEqNum
-- works and doesn't crash on a syntax error.
--        v := CATCH('SPAD__READER, CATCH('top__level, parseAndEvalStr$Lisp command)$Lisp)$Lisp
--        v = 'restart => ['"error"]
        ans := string parseAndEvalToStringEqNum$Lisp command
	SETQ(resultmathml$Lisp,GET_-OUTPUT_-STREAM_-STRING(_$texOutputStream$Lisp)$Lisp)$Lisp
	SETQ(resultalgebra$Lisp,GET_-OUTPUT_-STREAM_-STRING(_$algebraOutputStream$Lisp)$Lisp)$Lisp
	SETQ(_$texOutputStream$Lisp,savemathml$Lisp)$Lisp
	SETQ(_$algebraOutputStream$Lisp,savealgebra$Lisp)$Lisp
	CLOSE(tmpmathml$Lisp)$Lisp
	CLOSE(tmpalgebra$Lisp)$Lisp
	-- Since strings returned from axiom are going to be displayed in html I
	-- should really check for the characters &,<,> and replace them with
	-- &amp;,&lt;,&gt;.  At present I only check for ampersands in formatMessages.
	mathml:String := string(resultmathml$Lisp)
	algebra:String := string(resultalgebra$Lisp)
	algebra := formatMessages(algebra)
	-- At this point mathml contains the mathml for the output but does not
	-- include step number or type information.  We should also save the command.
        -- I get the type and step number from the $internalHistoryTable
	axans:String := concat ["<div><div class=_"command_">Input: ",command,"</div><div class=_"stepnum_">Step number: ",lastStep(),"</div><div class=_"algebra_">",algebra,"</div><div class=_"mathml_">",mathml,"</div><div class=_"type_">Type: ",lastType(),"</div></div>"]
	WriteLine$Lisp concat ["mathml answer: ",mathml]
        WriteLine$Lisp concat ["algebra answer: ",algebra]
        q:=MAKE_-STRING_-INPUT_-STREAM(axans)$Lisp
        SiCopyStream(q,s)$Lisp
        CLOSE(q)$Lisp
	CLOSE(s)$Lisp


    lastType():String ==
--  The last history entry is the first item in the $internalHistoryTable list so 
--  car(_$internalHistoryTable$Lisp) selects it.  Here's an example:
--  (3 (x+y)**3 (% (value (Polynomial (Integer)) WRAPPED 1 y (3 0 . 1) (2 1 x (1 0 . 3)) (1 1 x (2 0 . 3)) (0 1 x (3 0 . 1)))))
--  This corresponds to the input "(x+y)**3" being issued as the third command after
--  starting axiom.  The following line selects the type information.
        string car(cdr(car(cdr(car(cdr(cdr(car(_$internalHistoryTable$Lisp)$Lisp)$Lisp)$Lisp)$Lisp)$Lisp)$Lisp)$Lisp)$Lisp


    lastStep():String ==
        string car(car(_$internalHistoryTable$Lisp)$Lisp)$Lisp
	

    formatMessages(str:String):String ==
        WriteLine("formatMessages")$Lisp
	-- I need to replace any ampersands with &amp; and may also need to
	-- replace < and > with &lt; and &gt;
	strlist:List String
	WriteLine(str)$Lisp
	strlist := split(str,char "&")
	str := ""
	for s in strlist repeat
	    str := concat [str,s,"&amp;"]
	strlen:Integer := #str
	str := str.(1..(#str - 5))
	WriteLine(str)$Lisp
	-- Here I split the string into lines and put each line in a "div".
	strlist := split(str, char string NewlineChar$Lisp)
	str := ""
	WriteLine("formatMessages1")$Lisp
	WriteLine(concat strlist)$Lisp
	for s in strlist repeat
	    WriteLine(s)$Lisp
	    str := concat [str,"<div>",s,"</div>"]
        str
@
        
\section{Axiom javascript}

The javascript is currently included in a "script" element in the
Axiom xml page.

<<axiom javascript>>=

function init() {
}


function makeRequest() {
//    The following instantiation of the XMLHttpRequest object is for
//    browsers other than IE.  IE requires something different.
    http_request = new XMLHttpRequest();	 
    var command = document.getElementById('comm').value;
    http_request.open('POST', '127.0.0.1:8085', true);
    http_request.onreadystatechange = handleResponse;
//    http_request.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded');
//    http_request.send("command="+encodeURIComponent(command));
    http_request.setRequestHeader('Content-Type', 'text/plain');
    http_request.send("command="+command);
}

function handleResponse() {
    if (http_request.readyState == 4) {
	if (http_request.status == 200) {
// stick response in div=mathBox
	    var mathString = http_request.responseText;
            var mathRange = document.createRange();
	    var mathBox = document.createElementNS('http://www.w3.org/1999/xhtml','div');
            mathRange.selectNodeContents(mathBox);
            var mathFragment = mathRange.createContextualFragment(mathString);
            mathBox.appendChild(mathFragment);
// set id on mathBox
//	    var stepNum = mathBox.firstChild.firstChild.data;
//	    mathBox.setAttribute('id', 'step'+stepNum);
//	    mathBox.setAttribute('class', 'mathbox');
// remove old mathbox
            document.getElementById('mathAns').removeChild(document.getElementById('mathAns').firstChild)

// insert everything into the document

	    document.getElementById('mathAns').appendChild(mathBox);

// delete linenum box
//            mathBox.removeChild(mathBox.firstChild);

	} else
	{
	    alert('There was a problem with the request.'+ http_request.statusText);
	}
    }
}

@

\section{Axiom xml}

Extract the Axiom xml interface page with the commmand

notangle -RAxiom\ xml axserver.pamphlet > axiom.xml

or in fact make the file name whatever you like instead of
"axiom.xml".

<<Axiom xml>>=
<?xml version="1.0" encoding="UTF-8"?>
<!--
<<license-xml>>
-->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1 plus MathML 2.0//EN" "http://www.w3.org/Math/DTD/mathml2/xhtml-math11-f.dtd" [
<!ENTITY mathml "http://www.w3.org/1998/Math/MathML">
<!ENTITY InvisibleTimes " ">
]>

<html xmlns="http://www.w3.org/1999/xhtml" xmlns:xlink="http://www.w3.org/1999/xlink">

<head>
<title>Axiom Interface</title>
<script type="text/javascript">
<<axiom javascript>>
</script>

</head>

<body id="body">

  <form id="commreq" action="javascript:makeRequest();">
    <p>
      Enter command: <input type="text" id="comm" name="command" size="80"/>
      <input type="submit" value="submit command"/>
    </p>
  </form>

<div id="mathAns"><div></div></div>



</body>

</html>

@

\section{Running Axiom Server}

Put the extracted files in a suitable directory, like the one you
started Axiom from, and issue the commands:

)set output mathml on

)lisp (load "http.lisp")

)compile axserver

axServer(8085,mutliServ$AXSERV)


Of course you need a mathml enabled build of axiom to do this.
You may also want to issue the command

)set messages autoload off

before starting the Axiom server.


\section{License}
<<license>>=
--Copyright (c) 2007 Arthur C. Ralfs
--All rights reserved.
--
--Redistribution and use in source and binary forms, with or without
--modification, are permitted provided that the following conditions are
--met:
--
--    - Redistributions of source code must retain the above copyright
--      notice, this list of conditions and the following disclaimer.
--
--    - Redistributions in binary form must reproduce the above copyright
--      notice, this list of conditions and the following disclaimer in
--      the documentation and/or other materials provided with the
--      distribution.
--
--    - Neither the name of Arthur C. Ralfs nor the
--      names of its contributors may be used to endorse or promote products
--      derived from this software without specific prior written permission.
--
--THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
--IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
--TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
--PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER
--OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
--EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
--PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
--PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
--LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
--NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
--SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.


@

<<license-xml>>=
  Copyright (c) 2007 Arthur C. Ralfs
  All rights reserved.
  
  Redistribution and use in source and binary forms, with or without
  modification, are permitted provided that the following conditions are
  met:
  
      - Redistributions of source code must retain the above copyright
        notice, this list of conditions and the following disclaimer.
  
      - Redistributions in binary form must reproduce the above copyright
        notice, this list of conditions and the following disclaimer in
        the documentation and/or other materials provided with the
        distribution.
  
      - Neither the name of Arthur C. Ralfs nor the
        names of its contributors may be used to endorse or promote products
        derived from this software without specific prior written permission.
  
  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
  IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
  TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
  PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER
  OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
  EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
  PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
  LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
  SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.


@

<<*>>=
<<license>>
<<package AXSERV AxiomServer>>

@

\eject
\begin{thebibliography}{99}
\bibitem{1} nothing
\end{thebibliography}
\end{document}

\start
Date: Sun, 16 Sep 2007 08:18:39 -0700
From: Ed Borasky
To: Tim Daly
Subject: re: GCL on an AMD64 Linux system?
Cc: Camm Maguire

root wrote:
> try 
>   user> export SHVAR=i/am/set
>   user> echo $SHVAR
>   user> sudo echo $SHVAR
> 
> 

znmeb@DreamScape ~ $ export SHVAR=i/am/set
znmeb@DreamScape ~ $ echo $SHVAR
i/am/set
znmeb@DreamScape ~ $ sudo echo $SHVAR
i/am/set
znmeb@DreamScape ~ $

\start
Date: Sun, 16 Sep 2007 11:40:27 -0400
From: Tim Daly
To: Ed Borasky
Subject: re: GCL on an AMD64 Linux system?
Cc: Camm Maguire

>> try 
>>   user> export SHVAR=i/am/set
>>   user> echo $SHVAR
>>   user> sudo echo $SHVAR
>> 
>> 
>
>znmeb@DreamScape ~ $ export SHVAR=i/am/set
>znmeb@DreamScape ~ $ echo $SHVAR
>i/am/set
>znmeb@DreamScape ~ $ sudo echo $SHVAR
>i/am/set
>znmeb@DreamScape ~ $

Odd. that's what I get too.

I'm at a loss to understand why the make install failed.
But it is clearly related to the missing AXIOM variable.

\start
Date: Sun, 16 Sep 2007 11:40:58 -0400
From: Tim Daly
To: Arthur Ralfs
Subject: Re: Axiom server

Excellent. I'll put it into the update queue. Thanks. --Tim

\start
Date: Mon, 17 Sep 2007 00:35:32 -0400
From: Alfredo Portes
To: list
Subject: Re: Axiom server

On 9/16/07, Arthur Ralfs wrote:

> Then if I start axiom from that same directory and enter the commands
>
> )set output mathml on
> (also maybe )set messages autoload off)
> )lisp (load "http.lisp")
> )compile axserver
> axServer(8085,multiServ$AXSERV)

Maybe somebody can help me with this. When I try to run the commands
above in Axiom in windows (wh-sandbox based), I get:

>>System error:
The function |WriteLine| is undefined.

WriteLine, if I am not wrong, is defined in the http.lisp file.

It works fine on Linux.

\start
Date: Mon, 17 Sep 2007 06:51:22 +0200 (CEST)
From: Waldek Hebisch
To: Alfredo Portes
Subject: Re: Axiom server

Alfredo Portes wrote:
> On 9/16/07, Arthur Ralfs wrote:
> 
> > Then if I start axiom from that same directory and enter the commands
> >
> > )set output mathml on
> > (also maybe )set messages autoload off)
> > )lisp (load "http.lisp")
> > )compile axserver
> > axServer(8085,multiServ$AXSERV)
> 
> Maybe somebody can help me with this. When I try to run the commands
> above in Axiom in windows (wh-sandbox based), I get:
> 
> >>System error:
> The function |WriteLine| is undefined.
> 
> WriteLine, if I am not wrong, is defined in the http.lisp file.
> 
> It works fine on Linux.
> 

WriteLine was defined in unlisp.lisp.pamhlet, but is removed in
newer version (was unused).  

You can add:

(defun |WriteLine| (string &optional (outstream *standard-output*))
  (write-line string outstream)
  (finish-output outstream) )

to http.lisp to define it (or better just call WRITE_-LINE from
spad).

\start
Date: Mon, 17 Sep 2007 01:31:32 -0400
From: Alfredo Portes
To: Waldek Hebisch
Subject: Re: Axiom server

> You can add:
>
> (defun |WriteLine| (string &optional (outstream *standard-output*))
>   (write-line string outstream)
>   (finish-output outstream) )

Thank you very much Waldek. This solved the problem.
Arthur's code seems to run fine on Windows also.

However, I do not know how should I call it in the
browser. The axiom.xml file is in c:\axserver ... so I
tried to give this as the address:

http://127.0.0.1:8085/axserver/axiom.xml

but I get:

>>System error:
Error "No such file or directory" on accepting connection
to #<two-way stream 10e8033c>

I have tried other locations, but cant think of the proper
way to access it.

\start
Date: Mon, 17 Sep 2007 13:38:46 +0200
From: Ralf Hemmecke
To: Tim Daly
Subject: Re: Mailing List Etiquette

On 09/07/2007 01:16 AM, Tim Daly wrote:
> Bill,
> 
>> For building Axiom on less common architectures I strongly recommend
>> the FriCAS or OpenAxiom forks of the Axiom project.
> 
> I strongly object to your suggestion that someone who has requested
> information, help, or porting assistance on this mailing list should
> go to another project.

Why? Isn't it "help" if someone points you to some piece of software 
that solves the problem?

> Please do not do that again on this list.

> Tim

Tim, you should consider to moderate the axiom-developer list. It seems 
too open for your taste.

\start
Date: Mon, 17 Sep 2007 04:49:49 -0700 (PDT)
From: Cliff Yapp
To: Ralf Hemmecke, Tim Daly
Subject: Re: Mailing List Etiquette

--- Ralf Hemmecke wrote:

> On 09/07/2007 01:16 AM, Tim Daly wrote:
> > Bill,
> > 
> >> For building Axiom on less common architectures I strongly
> >> recommend the FriCAS or OpenAxiom forks of the Axiom project.
> > 
> > I strongly object to your suggestion that someone who has requested
> > information, help, or porting assistance on this mailing list
> > should go to another project.
> 
> Why? Isn't it "help" if someone points you to some piece of software 
> that solves the problem?

I think the point is that Axiom is a different project from
FriCAS/OpenAxiom, so having FriCAS/OpenAxiom working on a platform !=
Axiom working on that platform.

I.e., if Maple didn't happen to work on a platform of interest
suggesting Mathematica doesn't help to get Maple on that platform.

Obviously the userland environments are still very similar at the
moment, but whether this will be true indefinitely remains to be seen. 
I'd say as the various projects take SPAD/Aldor and the interpreter
different directions this will get less true, so it avoids confusion to
keep the identities of the various projects distinct.  (Note that this
does not imply hostility toward those projects, just making sure the
distinction is clear to avoid confusion.)

\start
Date: Mon, 17 Sep 2007 06:38:10 -0700
From: Ed Borasky
To: list
Subject: Re: Mailing List Etiquette

C Y wrote:
> --- Ralf Hemmecke wrote:
> 
>> On 09/07/2007 01:16 AM, Tim Daly wrote:
>>> Bill,
>>>
>>>> For building Axiom on less common architectures I strongly
>>>> recommend the FriCAS or OpenAxiom forks of the Axiom project.
>>> I strongly object to your suggestion that someone who has requested
>>> information, help, or porting assistance on this mailing list
>>> should go to another project.
>> Why? Isn't it "help" if someone points you to some piece of software 
>> that solves the problem?
> 
> I think the point is that Axiom is a different project from
> FriCAS/OpenAxiom, so having FriCAS/OpenAxiom working on a platform !=
> Axiom working on that platform.
> 
> I.e., if Maple didn't happen to work on a platform of interest
> suggesting Mathematica doesn't help to get Maple on that platform.
> 
> Obviously the userland environments are still very similar at the
> moment, but whether this will be true indefinitely remains to be seen. 
> I'd say as the various projects take SPAD/Aldor and the interpreter
> different directions this will get less true, so it avoids confusion to
> keep the identities of the various projects distinct.  (Note that this
> does not imply hostility toward those projects, just making sure the
> distinction is clear to avoid confusion.)
>

I'm with Tim on this one -- if I have a FriCAS question I'll post it on
the FriCAS list. If I have an OpenAxiom question I'll post it on the
OpenAxiom list. But I have Axiom questions, and I post them here.

And I hardly think that Gentoo Linux on an Athlon64 X2 is a "less common
architecture". Now that I think of it, I'm on the FriCAS and OpenAxiom
lists and I haven't seen much activity. Maybe that's because the
*interesting* part of the three of them is the *math*, not the mechanics
of getting them up and running, and, ... well ... the math pretty much
has to be the same on all of them, doesn't it? :)

\start
Date: 17 Sep 2007 09:43:43 -0500
From: Gabriel Dos Reis
To: Ed Borasky
Subject: Re: Mailing List Etiquette

Ed Borasky writes:

[...]

| And I hardly think that Gentoo Linux on an Athlon64 X2 is a "less common
| architecture". Now that I think of it, I'm on the FriCAS and OpenAxiom
| lists and I haven't seen much activity.

There is quite na bit of activity on open-axiom-patches@lists.sf.net,
I would say :-)

\start
Date: Mon, 17 Sep 2007 10:49:16 -0400
From: Alfredo Portes
To: Ed Borasky
Subject: Re: Mailing List Etiquette

> Now that I think of it, I'm on the FriCAS and OpenAxiom
> lists and I haven't seen much activity.

Are you looking at the commits in both projects?

\start
Date: 17 Sep 2007 11:32:16 -0400
From: Camm Maguire
To: Ed Borasky
Subject: re: GCL on an AMD64 Linux system?

Greetings!  Just double checking -- is there a persistent GCL build
failure here?  If so, can you please post the full log?

Take care,

Ed Borasky writes:

> root wrote:
> >> That should be easy to test, though -- do the whole build as root and
> >> all the environment variables will be set all the way through. It won't
> >> take me long to check it -- it's less than an hour on an Athlon64 X2
> >> 5200+ :).
> > 
> > envy :-) send the system to me and i'll test it here :-)
> > who makes the box?
> > 
> CompUSA, actually. You go buy a chassis, a motherboard, a processor, a
> power supply, a hard drive, a DVD drive and some RAM and put it all
> together. Or for a ridiculously low price, they'll do all that. It's
> faster than Dell and cheaper. Actually I put in my own RAM ... that's easy.
> 
> I was going to get one of the tiny desktop ones from HP, but they only
> went up to 2 GB and came with Windows Vista installed. I don't need that. :)

\start
Date: 17 Sep 2007 11:39:46 -0400
From: Camm Maguire
To: Ed Borasky
Subject: Re: GCL on an AMD64 Linux system?

Greetings!  Please ignore my last post asking for your log -- thanks!

Here is your failure:

GCL (GNU Common Lisp)  April 1994  262144 pages
Building symbol table for /home/axiom/silver/lsp/gcl-2.6.8pre/unixport/raw_pre_gcl ..
I'm not an object
Lisp initialization failed.

This has been fixed in the 2.6.8 branch, but apparently not in your
snapshot supplied with axiom.  You need the following in your
debian/changelog:


  * support GNU_HASH sections, Closes: #426135

I'd suggest an update of the 2.6.8 tarball shipped with axiom (thought
this was already done?)  Please let me know if problems persist.  The
issue is not so much with GCL, but rather that newer ld shipped with
gcc is writing new section types into the object file, which GCL did
not know about, but does now.

\start
Date: Mon, 17 Sep 2007 10:45:43 -0500 (CDT)
From: Gabriel Dos Reis
To: Camm Maguire
Subject: Re: [Gcl-devel] Re: GCL on an AMD64 Linux system?

On Mon, 17 Sep 2007, Camm Maguire wrote:

| Greetings!  Please ignore my last post asking for your log -- thanks!
| 
| Here is your failure:
| 
| GCL (GNU Common Lisp)  April 1994  262144 pages
| Building symbol table for /home/axiom/silver/lsp/gcl-2.6.8pre/unixport/raw_pre_gcl ..
| I'm not an object
| Lisp initialization failed.
| 
| This has been fixed in the 2.6.8 branch, but apparently not in your
| snapshot supplied with axiom.  You need the following in your
| debian/changelog:
| 
| 
|   * support GNU_HASH sections, Closes: #426135
| 
| I'd suggest an update of the 2.6.8 tarball shipped with axiom (thought
| this was already done?)

Yes, it was done, but with multiple versions of GCL-2.6.8pre.

Axiom.build-improvements has only one copy -- the latest.

\start
Date: 17 Sep 2007 15:30:29 -0400
From: Camm Maguire
To: Andrey G. Grozin
Subject: re: GCL on an AMD64 Linux system?

Greetings!  Last I heard, a build was basically at hand with gclcvs
ANSI.

Take care,

Andrey G. Grozin writes:

> On Sat, 15 Sep 2007, Ed Borasky wrote:
> > It turns out the gcl-2.6.7 tarball is there in "zips", so I just edited
> > the Makefile for 2.6.7 and it's now building. Meanwhile, I would
> > actually like to use one of the installed Lisps on my systems to build
> > Axiom -- I have a choice of SBCL, Clisp, GCL (and CMUCL but only on the
> > 32-bit systems). Normally I just install SBCL because it works with
> > Maxima and the Lisp music codes I run.
> I'll say a thing which is taboo in this mailing list :-(
> Some other free CASs (not to be named here) which are descendants of
> the same codebase freed by NAG can be built with sbcl. Axiom at the
> moment can only be built with the non-ansi (old-fashioned) variant of
> gcl (note that maxima requires an ansi gcl). So, if you emerge gcl
> with USU=+ansi, you can build maxima; if you emerge it with -ansi, you
> can (maybe) build axiom; but never both.

\start
Date: Mon, 17 Sep 2007 20:10:42 -0400
From: Tim Daly
To: Camm Maguire
Subject: Re: GCL on an AMD64 Linux system?

There is a latest version of GCL also in the zips directory called
gcl-2.6.8pre2 which you can try to build. GCL stayed at the 2.6.8pre
level for a year or more with various fixes so there are two 2.6.8
"snapshots" (gcl-2.6.8pre and gcl-2.6.8pre2)

I suggested 2.6.7 because you said that you had an already working
version of 2.6.7 so it was a good bet that Axiom would build.

Since Axiom works on your system it hardly matters which version of
lisp you're using.

\start
Date: Mon, 17 Sep 2007 18:42:13 -0700
From: Ed Borasky
To: Alfredo Portes
Subject: Re: Mailing List Etiquette

Alfredo Portes wrote:
>> Now that I think of it, I'm on the FriCAS and OpenAxiom
>> lists and I haven't seen much activity.
> 
> Are you looking at the commits in both projects?
> 
No ... I'm looking at human-readable e-mail. Why would I track commits?
I'm not a developer, just a user/tester.

\start
Date: 17 Sep 2007 21:14:57 -0500
From: Gabriel Dos Reis
To: Ed Borasky
Subject: Re: Mailing List Etiquette

Ed Borasky writes:

| No ... I'm looking at human-readable e-mail.

Then open-axiom-patches@lists.sf.net is the answer :-)

\start
Date: Mon, 17 Sep 2007 22:15:48 -0400
From: Alfredo Portes
To: Ed Borasky
Subject: Re: Mailing List Etiquette

On 9/17/07, Ed Borasky Ed Borasky wrote:

> No ... I'm looking at human-readable e-mail. Why would I track commits?
> I'm not a developer, just a user/tester.

Point taken, sorry about that :-(. I just wanted to point out that the work
is in the commits, even when u don't see noise in the list. Gaby's work
with the internals/interpreter and build mechanism. Waldek bug squashing,
Hyperdoc fixes and faster way of building Axiom.

The only thing is that I do not see any point on not talking about
"the other projects".
If I can bring some of the fixes from OpenAxiom and Fricas to Axiom, in my
limited knowledge I will try to, and if I had the knowledge to provide patches
to +1 year of work done by Gaby and Waldek from the branches I would to.

See my point, this "don't talk about the other projects" seems like non-sense to
me, and it only affects the Axiom users, which I am not. But that is
just my very
humble opinion.

\start
Date: Tue, 18 Sep 2007 04:05:42 -0400
From: Tim Daly
To: Gabriel Dos Reis
Subject: Re: Mailing List Etiquette

Gaby,

I have no objection to your participation in this mailing list but...

> Then open-axiom-patches@lists.sf.net is the answer :-)

It is inappropriate behavior to advertise or advocate your project
on this mailing list. You have private email as well as your own
project mailing list. Please do not do this again.

\start
Date: Tue, 18 Sep 2007 10:27:17 +0200
From: Ralf Hemmecke
To: Tim Daly
Subject: Re: Mailing List Etiquette
Cc: Gabriel Dos Reis

Tim,

I would have liked that all work on Axiom happens under one roof no 
matter whether there are now (unfortunately) 3 different projects or 
just one. We all want a better CAS.

I must say that I come to the conclusion that you rather like 3 separate 
projects that do not communicate and learn from each other than having a 
cooperation as close as possible with all the differences between 
developers.

Your attitude tells me that my wish "cooperation not separation" is not 
welcome on the axiom-developer list.

Ralf

On 09/18/2007 10:05 AM, root wrote:
> Gaby,
> 
> I have no objection to your participation in this mailing list but...
> 
>> Then open-axiom-patches@lists.sf.net is the answer :-)
> 
> It is inappropriate behavior to advertise or advocate your project
> on this mailing list. You have private email as well as your own
> project mailing list. Please do not do this again.

\start
Date: Tue, 18 Sep 2007 07:44:12 -0500 (CDT)
From: Gabriel Dos Reis
To: Ralf Hemmecke
Subject: Re: Mailing List Etiquette

On Tue, 18 Sep 2007, Ralf Hemmecke wrote:

| Tim,
| 
| I would have liked that all work on Axiom happens under one roof no matter
| whether there are now (unfortunately) 3 different projects or just one.

Ralf --

  Tim has absolutely the right to run his project as he wants -- just
like any one of us does. If you don't like it, create your own.  It
would be hard to come to agreement on `taste and colours'.

\start
Date: 18 Sep 2007 08:06:45 -0500
From: Gabriel Dos Reis
To: Tim Daly
Subject: Re: Mailing List Etiquette

Tim Daly writes:

| Gaby,
| 
| I have no objection to your participation in this mailing list but...
| 
| > Then open-axiom-patches@lists.sf.net is the answer :-)
| 
| It is inappropriate behavior to advertise or advocate your project
| on this mailing list.

I was answering a specific question asked on the list.  That is not
advertisement, and the answer was appropriate.  You may not like the
answer, but it was appropriate.

\start
Date: Tue, 18 Sep 2007 17:18:57 +0200
From: Ondrej Certik
To: Tim Daly
Subject: Re: Mailing List Etiquette
Cc: Gabriel Dos Reis

> I have no objection to your participation in this mailing list but...
>
> > Then open-axiom-patches@lists.sf.net is the answer :-)
>
> It is inappropriate behavior to advertise or advocate your project
> on this mailing list. You have private email as well as your own
> project mailing list. Please do not do this again.

I think you are just discouraging people with this behavior.

My own attitude, which I am not saying is the only one right, is that
I want my users to know about all the alternatives to my project and I
want them to discuss it and try it. So that when they are using my
project, it's because it's the best solution for them and not because
they don't know about the alternatives. First. And second, if some
other project is better than ours, of course I want to discuss it on
our mailinglist, so that we can either improve our own, or just stop
working on it and joing the other one, which is better. That said, of
course I wouldn't like it, when someone forks a project that I started
and worked for a long time. But that's life.

\start
Date: Tue, 18 Sep 2007 10:36:47 -0500 (CDT)
From: Gabriel Dos Reis
To: Ondrej Certik
Subject: Re: Mailing List Etiquette

On Tue, 18 Sep 2007, Ondrej Certik wrote:

|                                                         That said, of
| course I wouldn't like it, when someone forks a project that I started
| and worked for a long time.

Even if you gave incentive to create the fork?

\start
Date: Tue, 18 Sep 2007 18:26:38 +0200
From: Ondrej Certik
To: Gabriel Dos Reis
Subject: Re: Mailing List Etiquette

On 9/18/07, Gabriel Dos Reis wrote:
> On Tue, 18 Sep 2007, Ondrej Certik wrote:
>
> |                                                         That said, of
> | course I wouldn't like it, when someone forks a project that I started
> | and worked for a long time.
>
> Even if you gave incentive to create the fork?

I don't know, never happened to me yet. But one thing is what I like
or don't like and another thing is how to spend my time effectively
(i.e. not working on a project, if there is a better alternative).

\start
Date: Tue, 18 Sep 2007 10:35:34 -0700 (PDT)
From: Cliff Yapp
To: Ondrej Certik
Subject: Re: Mailing List Etiquette

--- Ondrej Certik wrote:

> I don't know, never happened to me yet. But one thing is what I like
> or don't like and another thing is how to spend my time effectively
> (i.e. not working on a project, if there is a better alternative).

In the case of Axiom (the original project) there is still no project I
am aware of that offers an alternative (long term goals, rigorous
adherence to and development of literate programming, heavy use of
Lisp, etc.)  My understanding is the definition of Axiom as a project
is strongly tied to the GOALS, not so much the current state of the
code base at any one time.

The forks of Axiom share a lot of similar code at present, but I expect
them to diverge more and more as the years pass - their goals are
different.  And that's OK, but I can understand Tim's wanting to keep
the Axiom project's eye on the ball, so to speak.

\start
Date: 18 Sep 2007 14:31:08 -0500
From: Gabriel Dos Reis
To: Ondrej Certik
Subject: Re: Mailing List Etiquette

Cliff Yapp writes:

| --- Ondrej Certik wrote:
| 
| > I don't know, never happened to me yet. But one thing is what I like
| > or don't like and another thing is how to spend my time effectively
| > (i.e. not working on a project, if there is a better alternative).
| 
| In the case of Axiom (the original project) there is still no project I
| am aware of that offers an alternative (long term goals, rigorous
| adherence to and development of literate programming, heavy use of
| Lisp, etc.) 

I believe "heavy use of Lisp" is a recent addition/invention to the
so-called 'GOALS of the original Axiom system' -- one that is NOT
mentioned in the readme, but that is easily forgotten or pulled out of
tin air.

>From my perspective the original Axiom system is that of Dick Jenks.

\start
Date: Tue, 18 Sep 2007 14:09:39 -0700 (PDT)
From: Cliff Yapp
To: Gabriel Dos Reis, Ondrej Certik
Subject: Re: Mailing List Etiquette

--- Gabriel Dos Reis wrote:

> I believe "heavy use of Lisp" is a recent addition/invention to the
> so-called 'GOALS of the original Axiom system' -- one that is NOT
> mentioned in the readme, but that is easily forgotten or pulled out
> of tin air.

Correction then - the original open source Axiom project founded by Tim
Daly.  I was under the impression from various email exchanges over the
years that Tim had intended to increase the use of straight Lisp from
the get-go, but perhaps that is not accurate.  At any rate, it seems to
be a CURRENT goal of the project and one I personally like.

> From my perspective the original Axiom system is that of Dick Jenks.

Well, the new projects and forks each have their own names now - can we
agree to proceed on that basis going forward?

\start
Date: Tue, 18 Sep 2007 16:54:46 -0500 (CDT)
From: Gabriel Dos Reis
To: Cliff Yapp
Subject: Re: Mailing List Etiquette

On Tue, 18 Sep 2007, C Y wrote:

| --- Gabriel Dos Reis wrote:
| 
| > I believe "heavy use of Lisp" is a recent addition/invention to the
| > so-called 'GOALS of the original Axiom system' -- one that is NOT
| > mentioned in the readme, but that is easily forgotten or pulled out
| > of tin air.
| 
| Correction then - the original open source Axiom project founded by Tim
| Daly.  I was under the impression from various email exchanges over the
| years that Tim had intended to increase the use of straight Lisp from
| the get-go, but perhaps that is not accurate.

The point is that it has been claimed many times (not by Tim himself,
though) that the goals (aka the readme manifesto) of the original
project included converting everything to Lisp and nobody should be
surprised these days. We should get the record straight.   

| At any rate, it seems to be a CURRENT goal of the project and one I
| personally like. 

I have no argument there. However, in a scientific environment it
appears to me that we should be careful distinguishing goals
of the original project -- which someone has quoted on this list
as defined by the readme file (soemthing it is hard to disagree with) --
from what on the way has popped up as new goals without being properly
marked so. 

\start
Date: Tue, 18 Sep 2007 19:02:14 -0700 (PDT)
From: Cliff Yapp
To: Gabriel Dos Reis
Subject: Re: Mailing List Etiquette

OK, I see the confusion.  By "original project" I was referring to the
first open source Axiom project, not the original IBM effort.

Given Tim's original open source project still retains the name Axiom,
by default when I refer to Axiom I mean the Axiom open source project. 
The naming of "Open Axiom" allows (IMHO) for enough confusion that I
tried to refer to Tim's Axiom as the "original" Axiom in the sense of
being the original open source project.  From this point on I will just
refer to "Axiom" with the understanding that it will not be confused
with anything other than the project Tim leads.

\start
Date: Tue, 18 Sep 2007 21:13:49 -0500 (CDT)
From: Gabriel Dos Reis
To: Cliff Yapp
Subject: Re: Mailing List Etiquette

On Tue, 18 Sep 2007, C Y wrote:

| Given Tim's original open source project still retains the name Axiom,
| by default when I refer to Axiom I mean the Axiom open source project. 

I have no problem with that.  However, it is also important to recognize
that the notion of `original Axiom project' is not unambiguous.  For
many (most?) Axiom is what Dick Jenks conceived.  At least, that is
what I sense when I happen to talk with former Axiom developers or users.

\start
Date: Wed, 19 Sep 2007 14:13:26 -0400
From: Tim Daly
To: Gabriel Dos Reis
Subject: Re: Mailing List Etiquette

>| Given Tim's original open source project still retains the name Axiom,
>| by default when I refer to Axiom I mean the Axiom open source project. 
>
>I have no problem with that.  However, it is also important to recognize
>that the notion of `original Axiom project' is not unambiguous.  For
>many (most?) Axiom is what Dick Jenks conceived.  At least, that is
>what I sense when I happen to talk with former Axiom developers or users.

You are referring to the "Scratchpad" project at IBM Research which is 
the project headed by Dick Jenks. I worked on that project.

The "Axiom" project is on sourceforge.net/projects/axiom and
savannah.nongnu.org/projects/axiom.

\start
Date: Wed, 19 Sep 2007 14:31:44 -0500 (CDT)
From: Gabriel Dos Reis
To: Tim Daly
Subject: Re: Mailing List Etiquette

On Wed, 19 Sep 2007, root wrote:

| The "Axiom" project is on sourceforge.net/projects/axiom and
| savannah.nongnu.org/projects/axiom.

I know what is in those directories and waht isn't.  For example,
there is nothing in the readme from (quoted here many times)
as defining `heavy of Lisp' as one the GOALS of the `original Axiom'
project.

BTW, is the system described by Jenks&Sutor's book the one in the
directory you are pointing at in the above directories?  That system
is what most Axiom users (and an IBM Research rep. I talked to
yesterday) call Axiom.

\start
Date: Wed, 19 Sep 2007 16:41:28 -0400
From: Tim Daly
To: Gabriel Dos Reis
Subject: Re: Mailing List Etiquette

Gaby,

>I know what is in those directories and waht isn't.  For example,
>there is nothing in the readme from (quoted here many times)
>as defining `heavy of Lisp' as one the GOALS of the `original Axiom'
>project.

This project started with a phone call on August 20th, 2000. That's 7
years ago. I have written code nearly every day of those years.  You
joined the Axiom project approximately 20 months ago.  You were not
privy to years of discussion, several years of which are in non-public
mailing archives.

I DO know for a fact that I had a lisp-only version of scratchpad at
IBM Research, done by me. It ran on AKCL/DJGPP/DOS on a Toshiba
laptop.  I DO know for a fact (since *I* was the author of the goal)
that removing boot and converting the internal code to pure lisp was a
goal much discussed. I DO know for a fact that boot code was being
converted to lisp before you joined.

It is amazing to me that you seem to know so much about "what
this project's goals are" and "what this project really is". You 
simply don't know what you are talking about yet you continue to
state your opinions as "facts". 

You forked this project which allows you to set your own goals.  I
don't argue about OpenAxiom's goals. Please go define your own goals
and stop stirring up useless debate on this mailing list.

>BTW, is the system described by Jenks&Sutor's book the one in the
>directory you are pointing at in the above directories?  That system
>is what most Axiom users (and an IBM Research rep. I talked to
>yesterday) call Axiom.

We've had this discussion. It's over. There is no more to discuss.
Unless you plan to try to hijack the name Axiom there is no point
in further discussion.

As a matter of common professional courtesy I expect you to change
the term "Axiom" to "OpenAxiom" everywhere in your project. That is
"standard behavior" for a fork and you do love standard behavior.

Both of these are dead topics.

You insist on trying to create confusion where there is none.  I
insist on trying to minimize the confusion. Thus, I insist on
maintaining the separation of your project from this project.  It's
legal to share the code but very bad etiquette to come here to
advertise your project, stir up false controversy or create confusion.

Suppose you worked at a University and had the "Meadow" project.
Suppose I joined the University. Suppose after 20 months I decided
to present "Meadow" at a conference, decided to publish your source
code at the conference, called my project "OpenMeadow", and sent
your colleagues emails claiming "OpenMeadow" is the new "Meadow",
use "OpenMeadow", etc. How should any reasonable person off the
street view such behavior? How should my colleagues at the University
view my behavior?

Even though you have left the project to start your own project you
continue to stir up false controvery here.  I no longer view your
behavior as having the long term interest of the success of the axiom
project as a goal.

Please stop.

\start
Date: Wed, 19 Sep 2007 15:53:52 -0500 (CDT)
From: Gabriel Dos Reis
To: Tim Daly
Subject: Re: Mailing List Etiquette

On Wed, 19 Sep 2007, root wrote:

| It is amazing to me that you seem to know so much about "what
| this project's goals are" and "what this project really is". 

What really is amazing is that people have repeatedly asserted on this
list that 'heavy use of Lisp' was part of the `GOALs of the original
Axiom project', and people have been referred to the famous readme.

When I decided to join this project, it was based primarily on the 
Lyon 2002 meeting AND reading the famous readme.  Nothing there 
indicated that moving to `heavy use of Lisp' was part of the GOALs.
On the way, goals have popped up, yet claimed to be part of the
original goals.  I feel that is close to `tricking people'.

[...]

| Suppose you worked at a University and had the "Meadow" project.
| Suppose I joined the University. Suppose after 20 months I decided
| to present "Meadow" at a conference, decided to publish your source
| code at the conference, called my project "OpenMeadow", and sent
| your colleagues emails claiming "OpenMeadow" is the new "Meadow",
| use "OpenMeadow", etc. How should any reasonable person off the
| street view such behavior? How should my colleagues at the University
| view my behavior?

Ask them.  But, it would be highly interesting for you to clarify how
that relates to Axiom and OpenAxiom and anything I would have done at
any conference.  

\start
Date: Wed, 19 Sep 2007 22:38:31 -0500
From: Tim Daly
To: Arthur Ralfs
Subject: axserver.pamphlet

I just got a chance to test your axserver.pamphlet.  It worked like a
charm. Nice job.  The only missing thing was a failing request for
/favicon.ico which I'll fix.  It needs a bit of work to make it more
robust in the face of failures but the basic functionality works and
the mathml display from axiom is pretty.

I'll look at what it takes to add it to the system.  I'm also going to
construct a series of test cases for it so they can be added to the
test suite.


\start
Date: Thu, 20 Sep 2007 21:52:27 -0700
From: Richard Harke
To: Camm Maguire, list,
Subject: Re: Axiom ia64

I have been spending some time on this and finally feel like
I understand what needs to be done. The first part is in the
"SPECIAL_BFD". As I now understand it, no relocation occurs
here but some additional reloc types (and their sections) need
to be created to complete the object file. In particular, ia64
will require at least three new sections, .got, .plt and .opd.
But there is a problem a little later. The ia664 backend to
bfd does not seem to support the routine bfd_get_relocated_section_contents
at least for this usage. All the low level routines appear to be present
but it is not clear what front end routine(s) to call to take advantage
of them. Can you make any suggestions?

On Fri July 6 2007 10:19, you wrote:
> Greetings!
>
> Richard Harke writes:
> > On Tue July 3 2007 12:51, you wrote:
> > > Greetings!  Just wondering if you've made any headway on native object
> > > relocation for axiom on this platform.
> > >
> > > Take care,
> >
> > Sorry. No progress. I'll try to take another look at this in the near
> > future. Richard
>
> Thanks!  Do you have any refs to concise documentation for the
> gcc-emitted reloc types?

\start
Date: Fri, 21 Sep 2007 11:00:27 -0500
From: Tim Daly
To: list
Subject: 20070921.01.tpd.patch

The call 

 laplace(log(z),z,w)

causes an infinite loop between lfintegrate and monomialIntegrate.

Waldek modified the code to fail and return unevaluated.

A more reasonable return value, not supported by Axiom, would be:

  -log(w)-gamma
  -------------
       w


======================================================================
diff --git a/changelog b/changelog
index 48493c1..d085c48 100644
--- a/changelog
+++ b/changelog
@@ -1,3 +1,6 @@
+20070920 tpd src/input/Makefile add bug101.input regression test
+20070920 tpd src/input/bug101.input test laplace(log(z),z,w) bug 101
+20070920 wxh src/algebra/laplace.spad fix laplace(log(z),z,w) bug 101
 20070916 tpd src/input/Makefile add bug103.input regression test
 20070916 tpd src/input/bug103.input test solve(z=z,z) bug fix
 20070916 tpd src/algebra/polycat.spad solve(z=z,z) bug fix
diff --git a/src/algebra/laplace.spad.pamphlet b/src/algebra/laplace.spad.pamphlet
index 6f81b2e..76cc837 100644
--- a/src/algebra/laplace.spad.pamphlet
+++ b/src/algebra/laplace.spad.pamphlet
@@ -161,41 +161,68 @@ LaplaceTransform(R, F): Exports == Implementation where
 
     lapkernel(f, t, tt, ss) ==
       (k := retractIfCan(f)@Union(K, "failed")) case "failed" => "failed"
-      empty?(arg := argument(k::K)) or not empty? rest arg => "failed"
+      empty?(arg := argument(k::K)) => "failed"
+      is?(op := operator k, "%diff"::SE) =>
+        not( #arg = 3) => "failed"
+        not(is?(arg.3, t)) => "failed"
+        fint := eval(arg.1, arg.2, tt)
+        s := name operator (kernels(ss).1)
+        ss * locallaplace(fint, t, tt, s, ss) - eval(fint, tt = 0)
+      not (empty?(rest arg)) => "failed"
       member?(t, variables(a := first(arg) / tt)) => "failed"
       is?(op := operator k, "Si"::SE) => atan(a / ss) / ss
       is?(op, "Ci"::SE) => log((ss**2 + a**2) / a**2) / (2 * ss)
       is?(op, "Ei"::SE) => log((ss + a) / a) / ss
+      -- digamma (or Gamma) needs SpecialFunctionCategory
+      -- which we do not have here
+      -- is?(op, "log"::SE) => (digamma(1) - log(a) - log(ss)) / ss
       "failed"
 
+    -- Below we try to apply one of the texbook rules for computing
+    -- Laplace transforms, either reducing problem to simpler cases
+    -- or using one of known base cases
     locallaplace(f, t, tt, s, ss) ==
       zero? f => 0
 --      one? f  => inv ss
       (f = 1)  => inv ss
+
+      -- laplace(f(t)/t,t,s) 
+      --              = integrate(laplace(f(t),t,v), v = s..%plusInfinity)
       (x := tdenom(f, tt)) case F =>
         g := locallaplace(x::F, t, tt, vv := new()$SE, vvv := vv::F)
         (x := intlaplace(f, ss, g, vv, vvv)) case F => x::F
         oplap(f, tt, ss)
+
+      -- Use linearity
       (u := mkPlus f) case List(F) =>
         +/[locallaplace(g, t, tt, s, ss) for g in u::List(F)]
       (rec := splitConstant(f, t)).const ^= 1 =>
         rec.const * locallaplace(rec.nconst, t, tt, s, ss)
+
+      -- laplace(t^n*f(t),t,s) = (-1)^n*D(laplace(f(t),t,s), s, n))
       (v := atn(f, t)) case Record(coef:F, deg:PI) =>
         vv := v::Record(coef:F, deg:PI)
         is?(la := locallaplace(vv.coef, t, tt, s, ss), oplap) => oplap(f,tt,ss)
         (-1$Integer)**(vv.deg) * differentiate(la, s, vv.deg)
+
+      -- Complex shift rule
       (w := aexp(f, t)) case Record(coef:F, coef1:F, coef0:F) =>
         ww := w::Record(coef:F, coef1:F, coef0:F)
         exp(ww.coef0) * locallaplace(ww.coef,t,tt,s,ss - ww.coef1)
+
+      -- Try base cases
       (x := lapkernel(f, t, tt, ss)) case F => x::F
-      -- last chance option: try to use the fact that
-      --    laplace(f(t),t,s) = s laplace(g(t),t,s) - g(0)  where dg/dt = f(t)
-      elem?(int := lfintegrate(f, t)) and (rint := retractIfCan int) case F =>
-           fint := rint :: F
-           -- to avoid infinite loops, we don't call laplace recursively
-           -- if the integral has no new logs and f is an algebraic function
-           empty?(logpart int) and algebraic?(f, t) => oplap(fint, tt, ss)
-           ss * locallaplace(fint, t, tt, s, ss) - eval(fint, tt = 0)
+
+--    -- The following does not seem to help computing transforms, but
+--    -- quite frequently leads to loops, so I (wh) disabled it for now
+--    -- last chance option: try to use the fact that
+--    --    laplace(f(t),t,s) = s laplace(g(t),t,s) - g(0)  where dg/dt = f(t)
+--    elem?(int := lfintegrate(f, t)) and (rint := retractIfCan int) case F =>
+--        fint := rint :: F
+--        -- to avoid infinite loops, we don't call laplace recursively
+--        -- if the integral has no new logs and f is an algebraic function
+--        empty?(logpart int) and algebraic?(f, t) => oplap(fint, tt, ss)
+--        ss * locallaplace(fint, t, tt, s, ss) - eval(fint, tt = 0)
       oplap(f, tt, ss)
 
     setProperty(oplap,SPECIALDIFF,dvlap@((List F,SE)->F) pretend None)
@@ -228,6 +255,7 @@ InverseLaplaceTransform(R, F): Exports == Implementation where
       ++ Laplace transform of \spad{f(s)}
       ++ using t as the new variable or "failed" if unable to find
       ++ a closed form.
+      ++ Handles only rational \spad{f(s)}.
 
   Implementation ==> add
 
@@ -246,8 +274,12 @@ InverseLaplaceTransform(R, F): Exports == Implementation where
     ilt(expr,var,t) ==
       expr = 0 => 0
       r := univariate(expr,kernel(var))
+
+      -- Check that r is a rational function such that degree of
+      -- the numarator is lower that degree of denominator
       not(numer(r) quo denom(r) = 0) => "failed"
       not( freeOf?(numer r,var) and freeOf?(denom r,var)) => "failed"
+
       ilt1(r,t::F)
 
     hintpac := TranscendentalHermiteIntegration(F, UP)
diff --git a/src/input/Makefile.pamphlet b/src/input/Makefile.pamphlet
index b286aa6..b2d5fe9 100644
--- a/src/input/Makefile.pamphlet
+++ b/src/input/Makefile.pamphlet
@@ -287,7 +287,8 @@ REGRES= algaggr.regress algbrbf.regress  algfacob.regress alist.regress  \
     arrows.regress    assign.regress   atansqrt.regress \
     asec.regress      bags.regress      bbtree.regress \
     binary.regress    bop.regress      bstree.regress   bouquet.regress \
-    bug100.regress    bug103.regress   bug10069.regress \
+    bug100.regress    bug101.regress \
+    bug103.regress    bug10069.regress \
     bugs.regress      bug10312.regress bug6357.regress  bug9057.regress \
     calcprob.regress  \
     calculus2.regress calculus.regress cardinal.regress card.regress \
@@ -502,7 +503,8 @@ FILES= ${OUT}/algaggr.input  ${OUT}/algbrbf.input    ${OUT}/algfacob.input \
        ${OUT}/bags.input     ${OUT}/bbtree.input     ${OUT}/bern.input \
        ${OUT}/bernpoly.input ${OUT}/binary.input     ${OUT}/bop.input \
        ${OUT}/bouquet.input  ${OUT}/bstree.input     ${OUT}/bug6357.input \
-       ${OUT}/bug9057.input  ${OUT}/bug100.input     ${OUT}/bug103.input \
+       ${OUT}/bug9057.input  ${OUT}/bug100.input     ${OUT}/bug101.input \
+       ${OUT}/bug103.input \
        ${OUT}/bug10069.input ${OUT}/bug10312.input \
        ${OUT}/calcprob.input ${OUT}/calculus.input \
        ${OUT}/cardinal.input ${OUT}/card.input       ${OUT}/carten.input \
@@ -678,7 +680,8 @@ DOCFILES= \
   ${DOC}/bernpoly.input.dvi    ${DOC}/binary.input.dvi     \
   ${DOC}/bop.input.dvi         ${DOC}/bouquet.input.dvi    \
   ${DOC}/bstree.input.dvi      ${DOC}/bug10069.input.dvi   \
-  ${DOC}/bug100.input.dvi      ${DOC}/bug103.input.dvi \
+  ${DOC}/bug100.input.dvi      ${DOC}/bug101.input.dvi     \
+  ${DOC}/bug103.input.dvi \
   ${DOC}/bug10312.input.dvi    ${DOC}/bug6357.input.dvi    \
   ${DOC}/bug9057.input.dvi     ${DOC}/bugs.input.dvi       \
   ${DOC}/c02aff.input.dvi      ${DOC}/c02agf.input.dvi     \
diff --git a/src/input/bug101.input.pamphlet b/src/input/bug101.input.pamphlet
new file mode 100644
index 0000000..b82caf0
--- /dev/null
+++ b/src/input/bug101.input.pamphlet
@@ -0,0 +1,59 @@
+\documentclass{article}
+\usepackage{axiom}
+\begin{document}
+\title{\$SPAD/src/input bug101.input}
+\author{Timothy Daly}
+\maketitle
+\begin{abstract}
+\end{abstract}
+\eject
+\tableofcontents
+\eject
+@
+The call 
+\begin{verbatim}
+laplace(log(z),z,w)
+\end{verbatim}
+causes an infinite loop between lfintegrate and monomialIntegrate.
+
+Waldek modified the code to fail and return unevaluated.
+
+A more reasonable return value, not supported by Axiom, would be:
+\begin{verbatim}
+  -log(w)-gamma
+  -------------
+       w
+\end{verbatim}
+
+<<*>>=
+)spool bug101.output
+)set message test on
+)set message auto off
+)clear all
+ 
+--S 1 of 2
+laplace(log(z),z,w)
+--R
+--R   (1)  laplace(log(z),z,w)
+--R                                                     Type: Expression Integer
+--E 1
+
+--S 2 of 2
+laplace(log(z),w,z)
+--R
+--R        log(z)
+--R   (2)  ------
+--R           z
+--R                                                     Type: Expression Integer
+--E 2
+@
+<<*>>=
+)spool 
+)lisp (bye)
+ 
+@
+\eject
+\begin{thebibliography}{99}
+\bibitem{1} nothing
+\end{thebibliography}
+\end{document}

\start
Date: Fri, 21 Sep 2007 21:46:34 -0400
From: Tim Daly
To: Alasdair McAndrew, Arthur Ralfs
Subject: Re: hyperdoc on windows

(copied to list)

Actually beyond porting hyperdoc to windows I've been looking at
wxAxiom (based on wxMaxima) and a browser-based Hyperdoc. 

At the moment, due to the great work by Arthur Ralfs, I'm making
progress on the browser-based version. I now have some of the
hyperdoc pages converted and am working on using Arthur's code
to evaluate and return math output directly to the browser.
Axiom's output in mathML in firefox is very pretty.

Once I get this to work, firefox can be a standard replacement for
hyperdoc, the pages will be in html, and you can change colors
to whatever you'd like. In addition, you'll be able to write your
own pages for class.

It would go a lot faster if I knew javascript. 
I'm a complete novice at coding web pages.
They aren't pretty but they work.

>Thank you so much - I'll look into it as soon as I can.  Do you know if
>anybody is working on a simple shell for Axiom in windows, with colours
>etc?  Or even something better, such as wxMaxima is for Maxima?
>
>cheers,
>Alasdair
>
>On 9/22/07, Tim Daly < Tim Daly> wrote:
>>
>> Alasdair,
>>
>> http://daly.axiom-developer.org/hyperwin.tgz
>>
>> contains a hyperdoc that runs standalone on windows.
>> It requires Xming. It will not send commands to Axiom
>> but most of the documentation works standalone anyway.

\start
Date: Fri, 21 Sep 2007 22:17:04 -0400
From: Alfredo Portes
To: Tim Daly
Subject: re: hyperdoc on windows


> At the moment, due to the great work by Arthur Ralfs, I'm making
> progress on the browser-based version. I now have some of the
> hyperdoc pages converted and am working on using Arthur's code
> to evaluate and return math output directly to the browser.
> Axiom's output in mathML in firefox is very pretty.

I haven't been able to run Arthur's code in Windows :-(. It will be good
if you can put your modifications to the interface in a repository (git or svn),
so others (maybe me :-) can work on top of Arthur's work.

> Once I get this to work, firefox can be a standard replacement for
> hyperdoc, the pages will be in html, and you can change colors
> to whatever you'd like. In addition, you'll be able to write your
> own pages for class.

I think it will be good to add Martin's code to Arthur's work to browse
the databases:

http://wiki.axiom-developer.org/SandBoxHyperDocReplacement

\start
Date: Fri, 21 Sep 2007 20:46:03 -0700
From: Ed Borasky
To: Tim Daly
Subject: re: hyperdoc on windows

root wrote:
> (copied to list)
> 
> Actually beyond porting hyperdoc to windows I've been looking at
> wxAxiom (based on wxMaxima) and a browser-based Hyperdoc. 
> 
> At the moment, due to the great work by Arthur Ralfs, I'm making
> progress on the browser-based version. I now have some of the
> hyperdoc pages converted and am working on using Arthur's code
> to evaluate and return math output directly to the browser.
> Axiom's output in mathML in firefox is very pretty.
> 
> Once I get this to work, firefox can be a standard replacement for
> hyperdoc, the pages will be in html, and you can change colors
> to whatever you'd like. In addition, you'll be able to write your
> own pages for class.
> 
> It would go a lot faster if I knew javascript. 
> I'm a complete novice at coding web pages.
> They aren't pretty but they work.
> 
> 
>> Thank you so much - I'll look into it as soon as I can.  Do you know if
>> anybody is working on a simple shell for Axiom in windows, with colours
>> etc?  Or even something better, such as wxMaxima is for Maxima?
>>
>> cheers,
>> Alasdair
>>
>> On 9/22/07, Tim Daly < Tim Daly> wrote:
>>> Alasdair,
>>>
>>> http://daly.axiom-developer.org/hyperwin.tgz
>>>
>>> contains a hyperdoc that runs standalone on windows.
>>> It requires Xming. It will not send commands to Axiom
>>> but most of the documentation works standalone anyway.

There are some tools you can get to make the browser-side stuff easier.
In the open source realm, there are Quanta+, Bluefish, NVu and Screem. I
think Bluefish is the most popular and NVu is the most WYSIWIG.

There is, if you're willing to pay for it, the Komodo IDE for dynamic
languages. There is a new project starting up called OpenKomodo which is
releasing most of the browser-side technology into the open source
mainstream. In any event, they've heavily exploited Mozilla technology,
and this might be a good thing to hook into. The URL is

http://www.activestate.com/openkomodo/

I have the regular paid Komodo IDE and I love it.

\start
Date: Fri, 21 Sep 2007 23:52:38 -0400
From: Tim Daly
To: Alfredo Portes
Subject: re: hyperdoc on windows

If you'll capture the configure options for GCL on windows I can
almost certainly get axiom trunk running there. 

\start
Date: Fri, 21 Sep 2007 23:54:05 -0400
From: Alfredo Portes
To: Tim Daly
Subject: re: hyperdoc on windows

> It would go a lot faster if I knew javascript.
> I'm a complete novice at coding web pages.
> They aren't pretty but they work.

Two good libraries when working with javascript to make your life easier:

http://jquery.com/
http://mochikit.com/

\start
Date: Sat, 22 Sep 2007 00:16:23 -0400
From: Alfredo Portes
To: Tim Daly
Subject: re: hyperdoc on windows

> axiom silver version (git or svn) has most of Arthur's code for
> mathML output already. I've attached his pamphlet file so you can try it.

[...]

Sorry I forgot to say that I tested it, and it works fine (thanks Arthur!!!).

> Once I have a demonstration page (I'm working on the path
> Basic Commands -> Calculus -> Differentiate -> (axiom response)
> I'll be able to convert the whole of hyperdoc to firefox and we
> should have a portable front end.

This is why I was trying to test it in Windows...but doing:

> go to URL http://127.0.0.1:8085/home/silver/axiom/axiom.xml

doesn't work, like is not the correct path. I still don't know the reason.
Still looking into it.

> Since you've gotten GCL to run on windows you might consider what it
> would take to get Arthur's mathML code into the wh-sandbox build.  (I
> believe you used wh-sandbox).

Well, actually Gaby figured it out. wh-sandbox inherited that from
build-improvements.

> Once that code is incorporated you can
> follow the same path to get Arthur's example to work. The key steps
> would be:

> incorporate Arthur's mathML extension into the algebra build
  (see attached patch 20070811.01.tpd.patch which won't apply
   directly to wh-sandbox but contains all the important changes)
> get http.lisp from axserver.pamphlet working on GCL/windows
> get the above example to work

Well, I know that Arthur's code is already works on Windows (well
missing the mathML stuff that is not in wh-sanbox) and the error
I described above.

> I'm not sure how to port the http.lisp file to windows but Camm might
> be able to help and Waldek has been doing a lot of work in that
> direction.

You need to use the version of GCL that build-improvements and wh-sanbox
are using if I am not mistaken. Waldek can probably say if this is correct.

> I already demonstrated getting database accesses working here:

> http://daly.axiom-developer.org/asq.php

> so it will be pretty trivial to do database lookups as part of
> the Firefox version of hyperdoc. Was there other functionality
> that I missed?

I am not sure, I never got Martin's code to run :-(. But he can say if
his code provides the same or more functionality.

\start
Date: 22 Sep 2007 08:20:04 +0200
From: Martin Rubey
To: Alfredo Portes
Subject: re: hyperdoc on windows

Alfredo Portes writes:

> I am not sure, I never got Martin's code to run :-(.

Could you please be more specific!  Which operating system, which axiom?

> But he can say if his code provides the same or more functionality.

My code does dynamic database lookup like HyperDoc, converts the documentation
into html (or, if you prefer, mathml or dvi or pdf or whatever) and displays
that in the browser.

It does not provide the buttons

  depends, dependents, uses, users

yet.

\start
Date: Sat, 22 Sep 2007 02:28:40 -0400
From: Alfredo Portes
To: Martin Rubey
Subject: re: hyperdoc on windows

On 22 Sep 2007 08:20:04 +0200, Martin Rubey wrote:
> Alfredo Portes writes:
>
> > I am not sure, I never got Martin's code to run :-(.
> Could you please be more specific!  Which operating system, which axiom?

Sorry Martin, I meant on Windows, because I was using the old Windows version
of Axiom. I haven't had a chance to try it using wh-sandbox yet.

> > But he can say if his code provides the same or more functionality.
>
> My code does dynamic database lookup like HyperDoc, converts the documentation
> into html (or, if you prefer, mathml or dvi or pdf or whatever) and displays
> that in the browser.

Tim, does your example do this? I think Martin's code complements the work
done by Arthur (without the file processing it is doing currently).

> It does not provide the buttons
>
>   depends, dependents, uses, users
>
> yet.

\start
Date: Fri, 14 Sep 2007 21:14:19 -0700
From: Ed Borasky
To: Camm Maguire
Subject: Re: GCL on an AMD64 Linux system?

Camm Maguire wrote:
> Greetings!  Your build failure originated much earlier in the log --
> could you please forward the entire thing?
> 
> Take care,
> 
> Tim Daly writes:
> 
>> Ed,
>>
>> I've forwarded your email to Camm Maguire, the GCL maintainer.
>>
>> It appears to be failing during GCL build. If you are using the
>> Axiom distribution there is a variable in the top level 
>> Makefile that can be set to different distributions of GCL
>> (the old distros are available in the CVS archives in the zips 
>> directory, I probably have a copy if you can't find it). 
>> If you have the appropriate GCL tar file, for example
>>   gcl-2.6.7.tgz
>> and you set the 
>>   GCLVERSION=gcl-2.6.7
>> then Axiom will build on that version of GCL from the zips archive.
>>
>> Tim
>>
>> From: Ed Borasky
>> Subject: GCL on an AMD64 Linux system?
>> To: list
>> Date: Thu, 13 Sep 2007 22:30:24 -0700
>>
>> Is there some reason the GCL in Axiom shouldn't build on a 64-bit Linux
>> system (gcc 4.2.0)? I've got three systems. Two are 32-bit and one is
>> 64-bit. Both gold and silver build fine on the 32-bit ones, but both
>> crash building GCL on the 64-bit system. Here's a trace ("silver", if it
>> matters):
>>
>> ar: creating libgcl.a
>> touch raw_gcl_map
>> gcc -o raw_gcl /home/axiom/silver/obj/linux/lib/cfuns-c.o
>> /home/axiom/silver/obj/linux/lib/sockio-c.o \
>>                 -L.  -Wl,-Map raw_gcl_map   -lgcl -lm  -lgmp -lreadline
>> - -lncurses -lc -lgclp /home/axiom/silver/obj/linux/lib/libspad.a
>> ./libgcl.a(sys_gcl.o): In function `gcl_init_system':
>> sys_gcl.c:(.text+0x35bd): undefined reference to `init_gcl_cmpwt'
>> sys_gcl.c:(.text+0x363a): undefined reference to `init_gcl_predlib'
>> sys_gcl.c:(.text+0x36b7): undefined reference to `init_gcl_setf'
>> sys_gcl.c:(.text+0x3734): undefined reference to `init_gcl_assert'
>> sys_gcl.c:(.text+0x37b1): undefined reference to `init_gcl_arraylib'
>> sys_gcl.c:(.text+0x382e): undefined reference to `init_gcl_defstruct'
>> sys_gcl.c:(.text+0x38ab): undefined reference to `init_gcl_describe'
>> sys_gcl.c:(.text+0x3928): undefined reference to `init_gcl_numlib'
>> sys_gcl.c:(.text+0x39a5): undefined reference to `init_gcl_listlib'
>> sys_gcl.c:(.text+0x3a22): undefined reference to `init_gcl_seq'
>> sys_gcl.c:(.text+0x3a9f): undefined reference to `init_gcl_iolib'
>> sys_gcl.c:(.text+0x3b1c): undefined reference to `init_gcl_packlib'
>> sys_gcl.c:(.text+0x3b99): undefined reference to `init_gcl_mislib'
>> sys_gcl.c:(.text+0x3c16): undefined reference to `init_gcl_seqlib'
>> sys_gcl.c:(.text+0x3c93): undefined reference to `init_gcl_trace'
>> sys_gcl.c:(.text+0x3d10): undefined reference to `init_gcl_cmpenv'
>> sys_gcl.c:(.text+0x3d8d): undefined reference to `init_gcl_cmputil'
>> sys_gcl.c:(.text+0x3e0a): undefined reference to `init_gcl_cmploc'
>> sys_gcl.c:(.text+0x3e87): undefined reference to `init_gcl_loop'
>> sys_gcl.c:(.text+0x3f04): undefined reference to `init_gcl_cmpif'
>> sys_gcl.c:(.text+0x3f81): undefined reference to `init_gcl_cmpbind'
>> sys_gcl.c:(.text+0x3ffe): undefined reference to `init_gcl_cmptag'
>> sys_gcl.c:(.text+0x407b): undefined reference to `init_gcl_serror'
>> sys_gcl.c:(.text+0x40f8): undefined reference to `init_gcl_cmpflet'
>> sys_gcl.c:(.text+0x4175): undefined reference to `init_gcl_info'
>> sys_gcl.c:(.text+0x41f2): undefined reference to `init_gcl_cmpmulti'
>> sys_gcl.c:(.text+0x426f): undefined reference to `init_gcl_make_defpackage'
>> sys_gcl.c:(.text+0x42ec): undefined reference to `init_gcl_cmplam'
>> sys_gcl.c:(.text+0x4369): undefined reference to `init_gcl_cmpcall'
>> sys_gcl.c:(.text+0x43e6): undefined reference to `init_gcl_cmpvar'
>> sys_gcl.c:(.text+0x4463): undefined reference to `init_gcl_sloop'
>> sys_gcl.c:(.text+0x44e0): undefined reference to `init_gcl_cmpeval'
>> sys_gcl.c:(.text+0x455d): undefined reference to `init_gcl_debug'
>> sys_gcl.c:(.text+0x45da): undefined reference to `init_gcl_cmpmap'
>> sys_gcl.c:(.text+0x4657): undefined reference to `init_gcl_defpackage'
>> sys_gcl.c:(.text+0x46d4): undefined reference to `init_gcl_cmplabel'
>> sys_gcl.c:(.text+0x4751): undefined reference to `init_gcl_cmpblock'
>> sys_gcl.c:(.text+0x47ce): undefined reference to `init_gcl_cmptop'
>> sys_gcl.c:(.text+0x484b): undefined reference to
>> `init_gcl_destructuring_bind'
>> sys_gcl.c:(.text+0x48c8): undefined reference to `init_gcl_cmpfun'
>> sys_gcl.c:(.text+0x4945): undefined reference to `init_gcl_cmptype'
>> sys_gcl.c:(.text+0x49c2): undefined reference to `init_gcl_cmpspecial'
>> sys_gcl.c:(.text+0x4a3f): undefined reference to `init_gcl_cmpinline'
>> sys_gcl.c:(.text+0x4abc): undefined reference to `init_gcl_cmplet'
>> sys_gcl.c:(.text+0x4b39): undefined reference to `init_gcl_cmpcatch'
>> sys_gcl.c:(.text+0x4bb2): undefined reference to `init_gcl_cmpvs'
>> ./libgcl.a(sys_gcl.o): In function `gcl_init_init':
>> sys_gcl.c:(.text+0x525d): undefined reference to `init_gcl_defmacro'
>> sys_gcl.c:(.text+0x52c7): undefined reference to `init_gcl_evalmacros'
>> sys_gcl.c:(.text+0x5331): undefined reference to `init_gcl_top'
>> sys_gcl.c:(.text+0x539c): undefined reference to `init_gcl_module'
>> collect2: ld returned 1 exit status
>> make[4]: *** [raw_gcl_map] Error 1
>> make[4]: Leaving directory `/home/axiom/silver/lsp/gcl-2.6.8pre/unixport'
>> make[3]: *** [unixport/saved_gcl] Error 2
>> make[3]: Leaving directory `/home/axiom/silver/lsp/gcl-2.6.8pre'
>> /bin/sh: line 5: unixport/saved_gcl: No such file or directory
>> make[2]: *** [gcldir] Error 127
>> make[2]: Leaving directory `/home/axiom/silver/lsp'
>> make[1]: *** [lspdir] Error 2
>> make[1]: Leaving directory `/home/axiom/silver'
>> make: *** [all] Error 2
>>
>>
>> P.S.: The native GCL that comes with the system (Gentoo Linux) is 2.6.7
>> and installs fine.


--------------070201030909010107080208
 name="make.log"
 filename="make.log"

13 making noweb
patching file modules.c
patching file Makefile
mnt.o: In function `emitfile':
mnt.c:(.text+0x3a9): warning: the use of `tmpnam' is dangerous, better us=
e `mkstemp'
make[1]: [install-shell] Error 1 (ignored)
make[1]: [install-code] Error 1 (ignored)
texhash: Updating /home/znmeb/.texmf-config/ls-R...
texhash: Updating /home/znmeb/.texmf-var/ls-R...
texhash: /usr/share/texmf: directory not writable. Skipping...
texhash: /usr/share/texmf-site: directory not writable. Skipping...
texhash: /var/cache/fonts/ls-R: no write permission. Skipping...
texhash: /var/lib/texmf: directory not writable. Skipping...
texhash: Done.
make[1]: [install-elisp] Error 1 (ignored)
0 SPAD=/home/axiom/silver/mnt/linux SYS=linux SPD=/home/axiom/silve=
r LSP=/home/axiom/silver/lsp GCLDIR=/home/axiom/silver/lsp/gcl-2.6.8p=
re SRC=/home/axiom/silver/src INT=/home/axiom/silver/int OBJ=/home/=
axiom/silver/obj MNT=/home/axiom/silver/mnt ZIPS=/home/axiom/silver/z=
ips TMP=/home/axiom/silver/obj/tmp SPADBIN=/home/axiom/silver/mnt/lin=
ux/bin INC=/home/axiom/silver/src/include CCLBASE=/home/axiom/silver/=
obj/linux/ccl/ccllisp PART=cprogs SUBPART=everything NOISE=-o /home=
/axiom/silver/obj/tmp/trace GCLVERSION=gcl-2.6.8pre TANGLE=/home/axio=
m/silver/mnt/linux/bin/lib/notangle VERSION=Axiom (Sept 2007) PATCH=p=
atch DOCUMENT=/home/axiom/silver/mnt/linux/bin/document WEAVE=/home/a=
xiom/silver/mnt/linux/bin/lib/noweave
10 copying /home/axiom/silver/src/scripts to /home/axiom/silver/mnt/linux=
/bin
1 making a linux system, PART=cprogs SUBPART=everything
2 Environment SPAD=/home/axiom/silver/mnt/linux SYS=linux SPD=/home=
/axiom/silver LSP=/home/axiom/silver/lsp GCLDIR=/home/axiom/silver/ls=
p/gcl-2.6.8pre SRC=/home/axiom/silver/src INT=/home/axiom/silver/int =
OBJ=/home/axiom/silver/obj MNT=/home/axiom/silver/mnt ZIPS=/home/ax=
iom/silver/zips TMP=/home/axiom/silver/obj/tmp SPADBIN=/home/axiom/si=
lver/mnt/linux/bin INC=/home/axiom/silver/src/include CCLBASE=/home/a=
xiom/silver/obj/linux/ccl/ccllisp PART=cprogs SUBPART=everything NOIS=
E=-o /home/axiom/silver/obj/tmp/trace GCLVERSION=gcl-2.6.8pre TANGLE==
/home/axiom/silver/mnt/linux/bin/lib/notangle VERSION=Axiom (Sept 2007)=
 PATCH=patch DOCUMENT=/home/axiom/silver/mnt/linux/bin/document WEAVE=
=/home/axiom/silver/mnt/linux/bin/lib/noweave
This is pdfeTeX, Version 3.141592-1.30.5-2.2 (Web2C 7.5.5)
entering extended mode
(./Makefile.tex
LaTeX2e <2003/12/01>
Babel <v3.8d> and hyphenation patterns for american, french, german, nger=
man, b
ahasa, basque, bulgarian, catalan, croatian, czech, danish, dutch, espera=
nto, e
stonian, finnish, greek, icelandic, irish, italian, latin, magyar, norsk,=
 polis
h, portuges, romanian, russian, serbian, slovak, slovene, spanish, swedis=
h, tur
kish, ukrainian, nohyphenation, loaded.
(/usr/share/texmf/tex/latex/base/article.cls
Document Class: article 2004/02/16 v1.4f Standard LaTeX document class
(/usr/share/texmf/tex/latex/base/size10.clo)) (./axiom.sty
(/usr/share/texmf/tex/latex/base/alltt.sty))
No file Makefile.aux.
[1]
No file Makefile.toc.
[2] [3] [4] [5] [6] [7] [8] [9] [10] [11] [12] [13] [14] [15] [16] [17]
[18] [19] [20] [21] [22] [23] [24] [25] [26] [27] [28] [29] [30] [31] [32=
]
[33] [34] [35] [36] [37] [38] [39] [40] [41] [42] [43] [44] [45] [46] [47=
]
[48] [49] [50] [51] [52] [53] [54] [55] [56] [57] [58] [59] [60]
(./Makefile.aux)

LaTeX Warning: Label(s) may have changed. Rerun to get cross-references r=
ight.

 )
Output written on Makefile.dvi (60 pages, 85256 bytes).
Transcript written on Makefile.log.
This is pdfeTeX, Version 3.141592-1.30.5-2.2 (Web2C 7.5.5)
entering extended mode
(./Makefile.tex
LaTeX2e <2003/12/01>
Babel <v3.8d> and hyphenation patterns for american, french, german, nger=
man, b
ahasa, basque, bulgarian, catalan, croatian, czech, danish, dutch, espera=
nto, e
stonian, finnish, greek, icelandic, irish, italian, latin, magyar, norsk,=
 polis
h, portuges, romanian, russian, serbian, slovak, slovene, spanish, swedis=
h, tur
kish, ukrainian, nohyphenation, loaded.
(/usr/share/texmf/tex/latex/base/article.cls
Document Class: article 2004/02/16 v1.4f Standard LaTeX document class
(/usr/share/texmf/tex/latex/base/size10.clo)) (./axiom.sty
(/usr/share/texmf/tex/latex/base/alltt.sty)) (./Makefile.aux) [1]
(./Makefile.toc [2]) [3] [4] [5] [6] [7] [8] [9] [10] [11] [12] [13] [14]=

[15] [16] [17] [18] [19] [20] [21] [22] [23] [24] [25] [26] [27] [28] [29=
]
[30] [31] [32] [33] [34] [35] [36] [37] [38] [39] [40] [41] [42] [43] [44=
]
[45] [46] [47] [48] [49] [50] [51] [52] [53] [54] [55] [56] [57] [58] [59=
]
[60] [61] (./Makefile.aux) )
Output written on Makefile.dvi (61 pages, 109184 bytes).
Transcript written on Makefile.log.
make[1]: Entering directory `/home/axiom/silver'
11 checking directory structure
12 Environment: PLF=LINUXplatform CCF=-O2 -fno-strength-reduce -Wall =
-D_GNU_SOURCE -DLINUXplatform -I/usr/X11/include LDF= -L/usr/X11R6/lib =
/usr/X11R6/lib/libXpm.a  CC=gcc AWK=gawk RANLIB=ranlib TOUCH=touc=
h TAR=tar AXIOMXLROOT=/home/axiom/silver/mnt/linux/compiler O=o BYE=
=bye LISP=lsp DAASE=/home/axiom/silver/src/share XLIB=/usr/X11R6/=
lib GCLOPTS=--enable-vssize=65536*2 --enable-locbfd --disable-dynsysb=
fd --disable-statsysbfd --enable-maxpage=256*1024 --disable-xgcl --disa=
ble-tkconfig SRCDIRS=bootdir interpdir sharedir algebradir etcdir clefd=
ir docdir graphdir smandir hyperdir inputdir  PATCH=patch
16 making /home/axiom/silver/src/Makefile from /home/axiom/silver/src/Mak=
efile.pamphlet
18 making /home/axiom/silver/src
make[2]: Entering directory `/home/axiom/silver/src'
2 making /home/axiom/silver/src/scripts/Makefile from /home/axiom/silver/=
src/scripts/Makefile.pamphlet
1 making /home/axiom/silver/src/scripts
make[3]: Entering directory `/home/axiom/silver/src/scripts'
make[3]: Nothing to be done for `all'.
make[3]: Leaving directory `/home/axiom/silver/src/scripts'
18 making /home/axiom/silver/src/lib/Makefile from /home/axiom/silver/src=
/lib/Makefile.pamphlet
17 making /home/axiom/silver/src/lib
make[3]: Entering directory `/home/axiom/silver/src/lib'
1 making /home/axiom/silver/int/lib/bsdsignal.c from /home/axiom/silver/s=
rc/lib/bsdsignal.c.pamphlet
2 making /home/axiom/silver/obj/linux/lib/bsdsignal.o from /home/axiom/si=
lver/int/lib/bsdsignal.c
9 making /home/axiom/silver/int/lib/cursor.c from /home/axiom/silver/src/=
lib/cursor.c.pamphlet
10 making /home/axiom/silver/obj/linux/lib/cursor.o from /home/axiom/silv=
er/int/lib/cursor.c
13 making /home/axiom/silver/int/lib/edin.c from /home/axiom/silver/src/l=
ib/edin.c.pamphlet
14 making /home/axiom/silver/obj/linux/lib/edin.o from /home/axiom/silver=
/int/lib/edin.c
17 making /home/axiom/silver/int/lib/fnct-key.c from /home/axiom/silver/s=
rc/lib/fnct-key.c.pamphlet
18 making /home/axiom/silver/obj/linux/lib/fnct-key.o from /home/axiom/si=
lver/int/lib/fnct-key.c
21 making /home/axiom/silver/int/lib/halloc.c from /home/axiom/silver/src=
/lib/halloc.c.pamphlet
22 making /home/axiom/silver/obj/linux/lib/halloc.o from /home/axiom/silv=
er/int/lib/halloc.c
29 making /home/axiom/silver/int/lib/openpty.c from /home/axiom/silver/sr=
c/lib/openpty.c.pamphlet
30 making /home/axiom/silver/obj/linux/lib/openpty.o from /home/axiom/sil=
ver/int/lib/openpty.c
33 making /home/axiom/silver/int/lib/pixmap.c from /home/axiom/silver/src=
/lib/pixmap.c.pamphlet
34 making /home/axiom/silver/obj/linux/lib/pixmap.o from /home/axiom/silv=
er/int/lib/pixmap.c
37 making /home/axiom/silver/int/lib/prt.c from /home/axiom/silver/src/li=
b/prt.c.pamphlet
38 making /home/axiom/silver/obj/linux/lib/prt.o from /home/axiom/silver/=
int/lib/prt.c
41 making /home/axiom/silver/int/lib/sockio-c.c from /home/axiom/silver/s=
rc/lib/sockio-c.c.pamphlet
42 making /home/axiom/silver/obj/linux/lib/sockio-c.o from /home/axiom/si=
lver/int/lib/sockio-c.c
45 making /home/axiom/silver/int/lib/spadcolors.c from /home/axiom/silver=
/src/lib/spadcolors.c.pamphlet
46 making /home/axiom/silver/obj/linux/lib/spadcolors.o from /home/axiom/=
silver/int/lib/spadcolors.c
49 making /home/axiom/silver/int/lib/util.c from /home/axiom/silver/src/l=
ib/util.c.pamphlet
50 making /home/axiom/silver/obj/linux/lib/util.o from /home/axiom/silver=
/int/lib/util.c
53 making /home/axiom/silver/int/lib/wct.c from /home/axiom/silver/src/li=
b/wct.c.pamphlet
54 making /home/axiom/silver/obj/linux/lib/wct.o from /home/axiom/silver/=
int/lib/wct.c
57 making /home/axiom/silver/int/lib/xdither.c from /home/axiom/silver/sr=
c/lib/xdither.c.pamphlet
58 making /home/axiom/silver/obj/linux/lib/xdither.o from /home/axiom/sil=
ver/int/lib/xdither.c
61 making /home/axiom/silver/int/lib/xshade.c from /home/axiom/silver/src=
/lib/xshade.c.pamphlet
62 making /home/axiom/silver/obj/linux/lib/xshade.o from /home/axiom/silv=
er/int/lib/xshade.c
65 making /home/axiom/silver/int/lib/xspadfill.c from /home/axiom/silver/=
src/lib/xspadfill.c.pamphlet
66 making /home/axiom/silver/obj/linux/lib/xspadfill.o from /home/axiom/s=
ilver/int/lib/xspadfill.c
73 making /home/axiom/silver/obj/linux/lib/libspad.a
ar: creating /home/axiom/silver/obj/linux/lib/libspad.a
5 making /home/axiom/silver/int/lib/cfuns-c.c from /home/axiom/silver/src=
/lib/cfuns-c.c.pamphlet
6 making /home/axiom/silver/obj/linux/lib/cfuns-c.o from /home/axiom/silv=
er/int/lib/cfuns-c.c
25 making /home/axiom/silver/int/lib/hash.c from /home/axiom/silver/src/l=
ib/hash.c.pamphlet
26 making /home/axiom/silver/obj/linux/lib/hash.o from /home/axiom/silver=
/int/lib/hash.c
3 making /home/axiom/silver/int/doc/src/lib/bsdsignal.c.dvi from /home/ax=
iom/silver/src/lib/bsdsignal.c.pamphlet
4 making /home/axiom/silver/mnt/linux/doc/src/lib/bsdsignal.c.dvi from /h=
ome/axiom/silver/int/doc/src/lib/bsdsignal.c.dvi
7 making /home/axiom/silver/int/doc/src/lib/cfuns-c.c.dvi from /home/axio=
m/silver/src/lib/cfuns-c.c.pamphlet
8 making /home/axiom/silver/mnt/linux/doc/src/lib/cfuns-c.c.dvi from /hom=
e/axiom/silver/int/doc/src/lib/cfuns-c.c.dvi
11 making /home/axiom/silver/int/doc/src/lib/cursor.c.dvi from /home/axio=
m/silver/src/lib/cursor.c.pamphlet
12 making /home/axiom/silver/mnt/linux/doc/src/lib/cursor.c.dvi from /hom=
e/axiom/silver/int/doc/src/lib/cursor.c.dvi
15 making /home/axiom/silver/int/doc/src/lib/edin.c.dvi from /home/axiom/=
silver/src/lib/edin.c.pamphlet
16 making /home/axiom/silver/mnt/linux/doc/src/lib/edin.c.dvi from /home/=
axiom/silver/int/doc/src/lib/edin.c.dvi
19 making /home/axiom/silver/int/doc/src/lib/fnct-key.c.dvi from /home/ax=
iom/silver/src/lib/fnct-key.c.pamphlet
20 making /home/axiom/silver/mnt/linux/doc/src/lib/fnct-key.c.dvi from /h=
ome/axiom/silver/int/doc/src/lib/fnct-key.c.dvi
23 making /home/axiom/silver/int/doc/src/lib/halloc.c.dvi from /home/axio=
m/silver/src/lib/halloc.c.pamphlet
24 making /home/axiom/silver/mnt/linux/doc/src/lib/halloc.c.dvi from /hom=
e/axiom/silver/int/doc/src/lib/halloc.c.dvi
27 making /home/axiom/silver/int/doc/src/lib/hash.c.dvi from /home/axiom/=
silver/src/lib/hash.c.pamphlet
28 making /home/axiom/silver/mnt/linux/doc/src/lib/hash.c.dvi from /home/=
axiom/silver/int/doc/src/lib/hash.c.dvi
31 making /home/axiom/silver/int/doc/src/lib/openpty.c.dvi from /home/axi=
om/silver/src/lib/openpty.c.pamphlet
32 making /home/axiom/silver/mnt/linux/doc/src/lib/openpty.c.dvi from /ho=
me/axiom/silver/int/doc/src/lib/openpty.c.dvi
35 making /home/axiom/silver/int/doc/src/lib/pixmap.c.dvi from /home/axio=
m/silver/src/lib/pixmap.c.pamphlet
36 making /home/axiom/silver/mnt/linux/doc/src/lib/pixmap.c.dvi from /hom=
e/axiom/silver/int/doc/src/lib/pixmap.c.dvi
39 making /home/axiom/silver/int/doc/src/lib/prt.c.dvi from /home/axiom/s=
ilver/src/lib/prt.c.pamphlet
40 making /home/axiom/silver/mnt/linux/doc/src/lib/prt.c.dvi from /home/a=
xiom/silver/int/doc/src/lib/prt.c.dvi
43 making /home/axiom/silver/int/doc/src/lib/sockio-c.c.dvi from /home/ax=
iom/silver/src/lib/sockio-c.c.pamphlet
44 making /home/axiom/silver/mnt/linux/doc/src/lib/sockio-c.c.dvi from /h=
ome/axiom/silver/int/doc/src/lib/sockio-c.c.dvi
71 making /home/axiom/silver/mnt/linux/doc/src/lib/Makefile.dvi from /hom=
e/axiom/silver/src/lib/Makefile.dvi
47 making /home/axiom/silver/int/doc/src/lib/spadcolors.c.dvi from /home/=
axiom/silver/src/lib/spadcolors.c.pamphlet
48 making /home/axiom/silver/mnt/linux/doc/src/lib/spadcolors.c.dvi from =
/home/axiom/silver/int/doc/src/lib/spadcolors.c.dvi
51 making /home/axiom/silver/int/doc/src/lib/util.c.dvi from /home/axiom/=
silver/src/lib/util.c.pamphlet
52 making /home/axiom/silver/mnt/linux/doc/src/lib/util.c.dvi from /home/=
axiom/silver/int/doc/src/lib/util.c.dvi
55 making /home/axiom/silver/int/doc/src/lib/wct.c.dvi from /home/axiom/s=
ilver/src/lib/wct.c.pamphlet
56 making /home/axiom/silver/mnt/linux/doc/src/lib/wct.c.dvi from /home/a=
xiom/silver/int/doc/src/lib/wct.c.dvi
59 making /home/axiom/silver/int/doc/src/lib/xdither.c.dvi from /home/axi=
om/silver/src/lib/xdither.c.pamphlet
60 making /home/axiom/silver/mnt/linux/doc/src/lib/xdither.c.dvi from /ho=
me/axiom/silver/int/doc/src/lib/xdither.c.dvi
63 making /home/axiom/silver/int/doc/src/lib/xshade.c.dvi from /home/axio=
m/silver/src/lib/xshade.c.pamphlet
64 making /home/axiom/silver/mnt/linux/doc/src/lib/xshade.c.dvi from /hom=
e/axiom/silver/int/doc/src/lib/xshade.c.dvi
67 making /home/axiom/silver/int/doc/src/lib/xspadfill.c.dvi from /home/a=
xiom/silver/src/lib/xspadfill.c.pamphlet
68 making /home/axiom/silver/mnt/linux/doc/src/lib/xspadfill.c.dvi from /=
home/axiom/silver/int/doc/src/lib/xspadfill.c.dvi
72 finished making /home/axiom/silver/src/lib
make[3]: Leaving directory `/home/axiom/silver/src/lib'
make[2]: Leaving directory `/home/axiom/silver/src'
20 making /home/axiom/silver/lsp/Makefile from /home/axiom/silver/lsp/Mak=
efile.pamphlet
19 making /home/axiom/silver/lsp
make[2]: Entering directory `/home/axiom/silver/lsp'
2 building gcl-2.6.8pre
3 applying EXTRAS patch to h/linux.defs
patching file linux.defs
4 setup ini files for EXTRAS patch
6 applying libspad.a patch to unixport/makefile
patching file makefile
7 applying toploop patch to unixport/init_gcl.lsp
patching file init_gcl.lsp.in
26 copy gcl_collectfn.lsp to /home/axiom/silver/obj/linux/lsp/collectfn.l=
sp
27 copy sys-proclaim.lisp to /home/axiom/silver/obj/linux/lsp/sys-proclai=
m.lisp
creating cache ./config.cache
checking host system type... x86_64-unknown-linux-gnu
host=x86_64-unknown-linux-gnu
enable_machine=
use=amd64-linux
checking for gcc... gcc
checking whether the C compiler (gcc -march=athlon64 -O2  ) works... ye=
s
checking whether the C compiler (gcc -march=athlon64 -O2  ) is a cross-=
compiler... no
checking whether we are using GNU C... yes
checking whether gcc accepts -g... yes
checking how to run the C preprocessor... gcc -E
checking for gawk... gawk
checking system version (for dynamic loading)... checking for makeinfo...=
 makeinfo
Linux-2.6.22-gentoo-r4
checking for unistd.h... yes
checking for sysconf in -lc... yes
checking for _SC_CLK_TCK... 100
checking for gmp.h... yes
checking for __gmpz_init in -lgmp... yes
checking for external gmp version... checking for leading underscore in o=
bject symbols... no
checking for GNU ld option -Map... yes
checking for size of gmp limbs... 8
checking _SHORT_LIMB... no
checking _LONG_LONG_LIMB... no
checking for X... libraries /usr/lib64, headers
checking for dnet_ntoa in -ldnet... no
checking for dnet_ntoa in -ldnet_stub... no
checking for gethostbyname... yes
checking for connect... yes
checking for remove... yes
checking for shmat... yes
checking for IceConnectionNumber in -lICE... yes

-L/usr/lib64

-lSM -lICE
checking for main in -lXmu... yes
checking for main in -lXt... yes
checking for main in -lXext... yes
checking for main in -lXaw... yes
checking for main in -lX11... yes
#
#
# -------------------------
# Subconfigure of LIBINTL
#
#
creating cache ./config.cache
checking for a BSD compatible install... /usr/bin/install -c
checking how to run the C preprocessor... gcc -E
checking whether make sets ${MAKE}... yes
checking for gcc... gcc
checking whether the C compiler (gcc -march=athlon64 -O2 ) works... yes=

checking whether the C compiler (gcc -march=athlon64 -O2 ) is a cross-c=
ompiler... no
checking whether we are using GNU C... yes
checking whether gcc accepts -g... yes
checking for ranlib... ranlib
checking for POSIXized ISC... no
checking for ANSI C header files... yes
checking for working const... yes
checking for inline... inline
checking for off_t... yes
checking for size_t... yes
checking for working alloca.h... yes
checking for alloca... yes
checking for unistd.h... yes
checking for getpagesize... yes
checking for working mmap... yes
checking for argz.h... yes
checking for limits.h... yes
checking for locale.h... yes
checking for nl_types.h... yes
checking for malloc.h... yes
checking for string.h... yes
checking for unistd.h... (cached) yes
checking for values.h... yes
checking for sys/param.h... yes
checking for getcwd... yes
checking for munmap... yes
checking for putenv... yes
checking for setenv... yes
checking for setlocale... yes
checking for strchr... yes
checking for strcasecmp... yes
checking for __argz_count... yes
checking for __argz_stringify... yes
checking for __argz_next... yes
checking for stpcpy... yes
checking for LC_MESSAGES... yes
checking whether NLS is requested... yes
checking whether included gettext is requested... no
checking for libintl.h... yes
checking for gettext in libc... yes
checking for msgfmt... /usr/bin/msgfmt
checking for dcgettext... yes
checking for gmsgfmt... /usr/bin/gmsgfmt
checking for xgettext... /usr/bin/xgettext
updating cache ./config.cache
creating ./config.status
creating Makefile
creating config.h
#
#
#
# Subconfigure of LIBINTL done
# ------------------------------
#
#
#
# -------------------------
# Subconfigure of LIBIBERTY
#
#
checking whether to enable maintainer-specific portions of Makefiles... n=
o
checking for makeinfo... makeinfo
checking for perl... perl
checking build system type... x86_64-unknown-linux-gnu
checking host system type... x86_64-unknown-linux-gnu
checking for ar... ar
checking for ranlib... ranlib
checking for gcc... gcc
checking for C compiler default output file name... a.out
checking whether the C compiler works... yes
checking whether we are cross compiling... no
checking for suffix of executables...
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ANSI C... none needed
checking how to run the C preprocessor... gcc -E
checking whether gcc and cc understand -c and -o together... yes
checking for an ANSI C-conforming const... yes
checking for inline... inline
checking whether byte ordering is bigendian... no
checking for a BSD-compatible install... /usr/bin/install -c
checking for sys/file.h... yes
checking for sys/param.h... yes
checking for limits.h... yes
checking for stdlib.h... yes
checking for malloc.h... yes
checking for string.h... yes
checking for unistd.h... yes
checking for strings.h... yes
checking for sys/time.h... yes
checking for time.h... yes
checking for sys/resource.h... yes
checking for sys/stat.h... yes
checking for sys/mman.h... yes
checking for fcntl.h... yes
checking for alloca.h... yes
checking for sys/pstat.h... no
checking for sys/sysmp.h... no
checking for sys/sysinfo.h... yes
checking for machine/hal_sysinfo.h... no
checking for sys/table.h... no
checking for sys/sysctl.h... yes
checking for sys/systemcfg.h... no
checking for stdint.h... yes
checking for sys/wait.h that is POSIX.1 compatible... yes
checking whether time.h and sys/time.h may both be included... yes
checking whether errno must be declared... no
checking for egrep... grep -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... (cached) yes
checking for stdlib.h... (cached) yes
checking for string.h... (cached) yes
checking for memory.h... yes
checking for strings.h... (cached) yes
checking for inttypes.h... yes
checking for stdint.h... (cached) yes
checking for unistd.h... (cached) yes
checking for int... yes
checking size of int... 4
checking for uintptr_t... yes
checking for a 64-bit type... uint64_t
checking for pid_t... yes
checking for library containing strerror... none required
checking for asprintf... yes
checking for atexit... yes
checking for basename... yes
checking for bcmp... yes
checking for bcopy... yes
checking for bsearch... yes
checking for bzero... yes
checking for calloc... yes
checking for clock... yes
checking for ffs... yes
checking for getcwd... yes
checking for getpagesize... yes
checking for index... yes
checking for insque... yes
checking for memchr... yes
checking for memcmp... yes
checking for memcpy... yes
checking for memmove... yes
checking for mempcpy... yes
checking for memset... yes
checking for mkstemps... no
checking for putenv... yes
checking for random... yes
checking for rename... yes
checking for rindex... yes
checking for setenv... yes
checking for snprintf... yes
checking for sigsetmask... yes
checking for stpcpy... yes
checking for stpncpy... yes
checking for strcasecmp... yes
checking for strchr... yes
checking for strdup... yes
checking for strncasecmp... yes
checking for strrchr... yes
checking for strstr... yes
checking for strtod... yes
checking for strtol... yes
checking for strtoul... yes
checking for tmpnam... yes
checking for vasprintf... yes
checking for vfprintf... yes
checking for vprintf... yes
checking for vsnprintf... yes
checking for vsprintf... yes
checking for waitpid... yes
checking whether alloca needs Cray hooks... no
checking stack direction for C alloca... -1
checking for unistd.h... (cached) yes
checking for vfork.h... no
checking for fork... yes
checking for vfork... yes
checking for working fork... yes
checking for working vfork... (cached) yes
checking for _doprnt... no
checking for sys_errlist... yes
checking for sys_nerr... yes
checking for sys_siglist... yes
checking for external symbol _system_configuration... no
checking for getrusage... yes
checking for on_exit... yes
checking for psignal... yes
checking for strerror... yes
checking for strsignal... yes
checking for sysconf... yes
checking for times... yes
checking for sbrk... yes
checking for gettimeofday... yes
checking for realpath... yes
checking for canonicalize_file_name... yes
checking for pstat_getstatic... no
checking for pstat_getdynamic... no
checking for sysmp... no
checking for getsysinfo... no
checking for table... no
checking for sysctl... yes
checking whether canonicalize_file_name must be declared... yes
checking for stdlib.h... (cached) yes
checking for unistd.h... (cached) yes
checking for getpagesize... (cached) yes
checking for working mmap... yes
checking for working strncmp... yes
configure: creating ./config.status
config.status: creating Makefile
config.status: creating testsuite/Makefile
config.status: creating config.h
config.status: executing default commands
#
#
#
# Subconfigure of LIBIBERTY done
# ------------------------------
#
#
#
# -------------------
# Subconfigure of BFD
#
#
checking build system type... x86_64-unknown-linux-gnu
checking host system type... x86_64-unknown-linux-gnu
checking target system type... x86_64-unknown-linux-gnu
checking for gcc... gcc
checking for C compiler default output file name... a.out
checking whether the C compiler works... yes
checking whether we are cross compiling... no
checking for suffix of executables...
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ANSI C... none needed
checking for library containing strerror... none required
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking for style of include used by make... GNU
checking dependency style of gcc... none
checking for ar... ar
checking for ranlib... ranlib
checking for ld used by GCC... /usr/x86_64-pc-linux-gnu/bin/ld
checking if the linker (/usr/x86_64-pc-linux-gnu/bin/ld) is GNU ld... yes=

checking for /usr/x86_64-pc-linux-gnu/bin/ld option to reload object file=
s... -r
checking for BSD-compatible nm... /usr/bin/nm -B
checking whether ln -s works... yes
checking how to recognise dependant libraries... file_magic ELF [0-9][0-9=
]*-bit [LM]SB (shared object|dynamic lib )
checking for file... /usr/bin/file
checking for ranlib... (cached) ranlib
checking for strip... strip
checking for objdir... .libs
checking for gcc option to produce PIC... -fPIC -DPIC
checking if gcc PIC flag -fPIC -DPIC works... yes
checking if gcc static flag -static works... yes
finding the maximum length of command line arguments... 49153
checking if gcc supports -c -o file.o... yes
checking if gcc supports -fno-rtti -fno-exceptions ... no
checking whether the linker (/usr/x86_64-pc-linux-gnu/bin/ld) supports sh=
ared libraries... yes
checking how to hardcode library paths into programs... immediate
checking whether stripping libraries is possible... yes
checking dynamic linker characteristics... GNU/Linux ld.so
checking command to parse /usr/bin/nm -B output... ok
checking if libtool supports shared libraries... yes
checking whether to build shared libraries... no
checking whether to build static libraries... yes
creating libtool
updating cache /dev/null
checking whether to enable maintainer-specific portions of Makefiles... n=
o
checking whether to install libbfd... yes
checking for gcc... (cached) gcc
checking whether we are using the GNU C compiler... (cached) yes
checking whether gcc accepts -g... (cached) yes
checking for gcc option to accept ANSI C... (cached) none needed
checking for ranlib... (cached) ranlib
checking how to run the C preprocessor... gcc -E
checking for egrep... grep -E
checking for ANSI C header files... yes
checking for an ANSI C-conforming const... yes
checking for inline... inline
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking for off_t... yes
checking for size_t... yes
checking for working alloca.h... yes
checking for alloca... yes
checking for stdlib.h... (cached) yes
checking for unistd.h... (cached) yes
checking for getpagesize... yes
checking for working mmap... yes
checking argz.h usability... yes
checking argz.h presence... yes
checking for argz.h... yes
checking limits.h usability... yes
checking limits.h presence... yes
checking for limits.h... yes
checking locale.h usability... yes
checking locale.h presence... yes
checking for locale.h... yes
checking nl_types.h usability... yes
checking nl_types.h presence... yes
checking for nl_types.h... yes
checking malloc.h usability... yes
checking malloc.h presence... yes
checking for malloc.h... yes
checking for string.h... (cached) yes
checking for unistd.h... (cached) yes
checking values.h usability... yes
checking values.h presence... yes
checking for values.h... yes
checking sys/param.h usability... yes
checking sys/param.h presence... yes
checking for sys/param.h... yes
checking for getcwd... yes
checking for munmap... yes
checking for putenv... yes
checking for setenv... yes
checking for setlocale... yes
checking for strchr... yes
checking for strcasecmp... yes
checking for __argz_count... yes
checking for __argz_stringify... yes
checking for __argz_next... yes
checking for stpcpy... yes
checking for LC_MESSAGES... yes
checking whether NLS is requested... yes
checking whether included gettext is requested... yes
checking for msgfmt... /usr/bin/msgfmt
checking for gmsgfmt... /usr/bin/gmsgfmt
checking for xgettext... /usr/bin/xgettext
checking for catalogs to be installed...  fr tr ja es sv da zh_CN ro
checking for a BSD-compatible install... /usr/bin/install -c
checking for long long... yes
checking size of long long... 8
checking size of long... 8
checking stddef.h usability... yes
checking stddef.h presence... yes
checking for stddef.h... yes
checking for string.h... (cached) yes
checking for strings.h... (cached) yes
checking for stdlib.h... (cached) yes
checking time.h usability... yes
checking time.h presence... yes
checking for time.h... yes
checking for unistd.h... (cached) yes
checking fcntl.h usability... yes
checking fcntl.h presence... yes
checking for fcntl.h... yes
checking sys/file.h usability... yes
checking sys/file.h presence... yes
checking for sys/file.h... yes
checking sys/time.h usability... yes
checking sys/time.h presence... yes
checking for sys/time.h... yes
checking whether time.h and sys/time.h may both be included... yes
checking for dirent.h that defines DIR... yes
checking for library containing opendir... none required
checking for fcntl... yes
checking for getpagesize... (cached) yes
checking for setitimer... yes
checking for sysconf... yes
checking for fdopen... yes
checking for getuid... yes
checking for getgid... yes
checking for strtoull... yes
checking whether strstr must be declared... no
checking whether malloc must be declared... no
checking whether realloc must be declared... no
checking whether free must be declared... no
checking whether getenv must be declared... no
checking sys/procfs.h usability... yes
checking sys/procfs.h presence... yes
checking for sys/procfs.h... yes
checking for prstatus_t in sys/procfs.h... yes
checking for prstatus32_t in sys/procfs.h... no
checking for prstatus_t.pr_who in sys/procfs.h... no
checking for prstatus32_t.pr_who in sys/procfs.h... no
checking for pstatus_t in sys/procfs.h... no
checking for pxstatus_t in sys/procfs.h... no
checking for pstatus32_t in sys/procfs.h... no
checking for prpsinfo_t in sys/procfs.h... yes
checking for prpsinfo32_t in sys/procfs.h... no
checking for psinfo_t in sys/procfs.h... no
checking for psinfo32_t in sys/procfs.h... no
checking for lwpstatus_t in sys/procfs.h... no
checking for lwpxstatus_t in sys/procfs.h... no
checking for lwpstatus_t.pr_context in sys/procfs.h... no
checking for lwpstatus_t.pr_reg in sys/procfs.h... no
checking for win32_pstatus_t in sys/procfs.h... no
checking for gcc version with buggy 64-bit support... no
checking for ftello... yes
checking for ftello64... yes
checking for fseeko... yes
checking for fseeko64... yes
checking size of off_t... 8
checking file_ptr type... BFD_HOST_64_BIT
checking for stdlib.h... (cached) yes
checking for unistd.h... (cached) yes
checking for getpagesize... (cached) yes
checking for working mmap... (cached) yes
checking for madvise... yes
checking for mprotect... yes
configure: creating ./config.status
config.status: creating Makefile
config.status: creating doc/Makefile
config.status: creating bfd-in3.h
config.status: creating po/Makefile.in
config.status: creating config.h
config.status: executing depfiles commands
config.status: executing default commands
#
#
#
# Subconfigure of BFD done
# ------------------------
#
checking size of long... 8
checking sizeof struct contblock... 16
checking for endian.h... yes
checking endianness... little
checking for sbrk... yes
checking for randomized sbrk... no
checking finding DBEGIN... got 0x0
checking finding CSTACK_ADDRESS... got 140735328467256
checking sizeof long long int... no
checking for pagewidth... 12
checking for getcwd... yes
checking for getwd... yes
checking for uname... yes
checking for gettimeofday... yes
checking for sys/ioctl.h... yes
checking for elf.h... yes
checking for elf_abi.h... no
checking for BSDgettimeofday... no
checking for gettimeofday... (cached) yes
checking for gettimeofday declaration... present
checking for sin in -lm... yes
checking for main in -lmingwex... no
checking for math.h... yes
checking for values.h... yes
checking for float.h... yes
checking for isnormal... yes
checking for isfinite... yes
checking for sockets... checking for connect... (cached) yes
checking for gethostbyname... (cached) yes
checking for readline/readline.h... yes
checking for main in -lreadline... yes
checking for rl_completion_matches in -lreadline... yes
checking For network code for nsocket.c... yes
checking check for listen using fcntl... yes
checking for profil... yes
checking for setenv... yes
checking for _cleanup... no
checking FIONBIO vs. O_NONBLOCK for nonblocking I/O... O_NONBLOCK
checking check for SV_ONSTACK... yes
checking check for SIGSYS... yes
checking check for SIGEMT... no
checking for asm/sigcontext.h... yes
checking for asm/signal.h... yes
checking for sigcontext...... sigcontext in signal.h
checking for emacs... /usr/bin/emacs
checking emacs site lisp directory... /usr/share/emacs/22.1/site-lisp
checking emacs default.el... /usr/share/emacs/22.1/site-lisp/default.el
checking emacs info/dir... /usr/share/info/
checking for tcl/tk... checking for tclsh... tclsh
checking for main in -llieee... no
using TK_VERSION=8.4 in /usr/lib64
checking alloca... yes
checking Checking for buggy gcc version from redhat... no
updating cache ./config.cache
creating ./config.status
creating makedefc
creating windows/gcl.iss
creating windows/sysdir.bat
creating windows/install.lsp
creating h/gclincl.h
makedefc

# begin makedefs

# use=amd64-linux

# for main link of raw_gcl
LIBS=    -lm  -lgmp -lreadline -lncurses

#The multi precision library stuff
MPFILES=$(MPDIR)/@MPI_FILE@ $(MPDIR)/libmport.a


# root for the installation, eg /usr/local
# This would cause make install to create /usr/local/bin/gcl and
# /usr/local/lib/gcl-2-??/* with some basic files.
prefix=/usr/local

# where to place the info files
INFO_DIR=/usr/share/info/

# where to put emacs lisp files.
EMACS_SITE_LISP=/usr/share/emacs/22.1/site-lisp

# the default.el file
EMACS_DEFAULT_EL=/usr/share/emacs/22.1/site-lisp/default.el

# numerous TCL/TK variables culled from the tkConfig.sh and tclConfig.sh
# if these are found.
TK_CONFIG_PREFIX=/usr/lib64
TK_LIBRARY=/usr/lib64/tk8.4
TCL_LIBRARY=/usr/lib64/tcl8.4
TK_XINCLUDES=
TK_INCLUDE=-I/usr/lib64/../include
TCL_INCLUDE=-I/usr/lib64/../include
TK_LIB_SPEC=-L/usr/lib64 -ltk8.4
TK_BUILD_LIB_SPEC=-L/usr/lib64 -ltk8.4
TK_XLIBSW=-L/usr/lib64 -lX11
TK_XINCLUDES=
TCL_LIB_SPEC=-L/usr/lib64 -ltcl8.4${TCL_DBGX}
TCL_DL_LIBS=-ldl
TCL_LIBS=-ldl -lpthread  -lm

NOTIFY=yes
CC=gcc
CFLAGS=-march=athlon64 -O2 -Wall -DVOL=volatile -fsigned-char -pipe=
 -O3 -fomit-frame-pointer  -I$(GCLDIR)/o
FINAL_CFLAGS=-march=athlon64 -O2 -Wall -DVOL=volatile -fsigned-char=
 -pipe
NIFLAGS=-march=athlon64 -O2 -Wall -DVOL=volatile -fsigned-char -pip=
e   -I$(GCLDIR)/o
O3FLAGS=-O3 -fomit-frame-pointer
O2FLAGS=-O

RL_OBJS=gcl_readline.o

RL_LIB=

MAKEINFO=makeinfo

FLISP=saved_gcl
SYSTEM=gcl
BUILD_BFD=h/bfd.h h/bfdlink.h h/ansidecl.h h/symcat.h
GMPDIR=gmp3
X_LIBS= -L/usr/lib64 -lXmu -lXt -lXext -lXaw -lX11
X_CFLAGS=

PROCESSOR_FLAGS=

EXTRA_LOBJS=
LEADING_UNDERSCORE=
GNU_LD=1
add-defs1 amd64-linux
using amd64-linux.defs
make[3]: Entering directory `/home/axiom/silver/lsp/gcl-2.6.8pre'
cd binutils/intl && make
make[4]: Entering directory `/home/axiom/silver/lsp/gcl-2.6.8pre/binutils=
/intl'
make[4]: Nothing to be done for `all'.
make[4]: Leaving directory `/home/axiom/silver/lsp/gcl-2.6.8pre/binutils/=
intl'
cd binutils/bfd && make
make[4]: Entering directory `/home/axiom/silver/lsp/gcl-2.6.8pre/binutils=
/bfd'
make  all-recursive
make[5]: Entering directory `/home/axiom/silver/lsp/gcl-2.6.8pre/binutils=
/bfd'
Making all in doc
make[6]: Entering directory `/home/axiom/silver/lsp/gcl-2.6.8pre/binutils=
/bfd/doc'
make[6]: Nothing to be done for `all'.
make[6]: Leaving directory `/home/axiom/silver/lsp/gcl-2.6.8pre/binutils/=
bfd/doc'
Making all in po
make[6]: Entering directory `/home/axiom/silver/lsp/gcl-2.6.8pre/binutils=
/bfd/po'
( if test 'x.' != 'x.'; then \
	    posrcprefix='../'; \
	  else \
	    posrcprefix="../"; \
	  fi; \
	  rm -f SRC-POTFILES-t SRC-POTFILES \
	    && (sed -e '/^#/d' \
	            -e '/^[ 	]*$/d' \
		    -e "s@.*@	$posrcprefix& \\\\@" < ./SRC-POTFILES.in \
		| sed -e '$s/\\$//') > SRC-POTFILES-t \
	    && chmod a-w SRC-POTFILES-t \
	    && mv SRC-POTFILES-t SRC-POTFILES )
( rm -f BLD-POTFILES-t BLD-POTFILES \
	    && (sed -e '/^#/d' \
	            -e '/^[ 	]*$/d' \
		    -e "s@.*@	../& \\\\@" < ./BLD-POTFILES.in \
		| sed -e '$s/\\$//') > BLD-POTFILES-t \
	    && chmod a-w BLD-POTFILES-t \
	    && mv BLD-POTFILES-t BLD-POTFILES )
cd .. \
	  && CONFIG_FILES=po/Makefile.in:po/Make-in \
	     CONFIG_HEADERS= /bin/sh ./config.status
config.status: creating po/Makefile.in
config.status: executing depfiles commands
config.status: executing default commands
make[6]: Leaving directory `/home/axiom/silver/lsp/gcl-2.6.8pre/binutils/=
bfd/po'
make[6]: Entering directory `/home/axiom/silver/lsp/gcl-2.6.8pre/binutils=
/bfd/po'
file=./`echo fr | sed 's,.*/,,'`.gmo \
	  && rm -f $file && PATH=../src:$PATH /usr/bin/gmsgfmt -o $file fr.po
file=./`echo tr | sed 's,.*/,,'`.gmo \
	  && rm -f $file && PATH=../src:$PATH /usr/bin/gmsgfmt -o $file tr.po
file=./`echo ja | sed 's,.*/,,'`.gmo \
	  && rm -f $file && PATH=../src:$PATH /usr/bin/gmsgfmt -o $file ja.po
file=./`echo es | sed 's,.*/,,'`.gmo \
	  && rm -f $file && PATH=../src:$PATH /usr/bin/gmsgfmt -o $file es.po
file=./`echo sv | sed 's,.*/,,'`.gmo \
	  && rm -f $file && PATH=../src:$PATH /usr/bin/gmsgfmt -o $file sv.po
file=./`echo da | sed 's,.*/,,'`.gmo \
	  && rm -f $file && PATH=../src:$PATH /usr/bin/gmsgfmt -o $file da.po
file=./`echo zh_CN | sed 's,.*/,,'`.gmo \
	  && rm -f $file && PATH=../src:$PATH /usr/bin/gmsgfmt -o $file zh_CN.=
po
file=./`echo ro | sed 's,.*/,,'`.gmo \
	  && rm -f $file && PATH=../src:$PATH /usr/bin/gmsgfmt -o $file ro.po
make[6]: Leaving directory `/home/axiom/silver/lsp/gcl-2.6.8pre/binutils/=
bfd/po'
make[6]: Entering directory `/home/axiom/silver/lsp/gcl-2.6.8pre/binutils=
/bfd'
rm -f bfd-tmp.h
cp bfd-in3.h bfd-tmp.h
/bin/sh ./../move-if-change bfd-tmp.h bfd.h
rm -f bfd-tmp.h
touch stmp-bfd-h
/bin/sh ./libtool --mode=compile gcc -DHAVE_CONFIG_H -I. -I. -I. -D_GNU=
_SOURCE     -I. -I. -I./../include  -I./../intl -I../intl   -W -Wall -Wst=
rict-prototypes -Wmissing-prototypes -march=athlon64 -O2 -c -o archive.=
lo archive.c
gcc -DHAVE_CONFIG_H -I. -I. -I. -D_GNU_SOURCE -I. -I. -I./../include -I./=
=2E./intl -I../intl -W -Wall -Wstrict-prototypes -Wmissing-prototypes -ma=
rch=athlon64 -O2 -c archive.c -o archive.o
/bin/sh ./libtool --mode=compile gcc -DHAVE_CONFIG_H -I. -I. -I. -D_GNU=
_SOURCE     -I. -I. -I./../include  -I./../intl -I../intl   -W -Wall -Wst=
rict-prototypes -Wmissing-prototypes -march=athlon64 -O2 -c -DDEFAULT_V=
ECTOR=bfd_elf64_x86_64_vec -DSELECT_VECS='&bfd_elf64_x86_64_vec,&bfd_=
elf32_i386_vec,&i386linux_vec,&bfd_efi_app_ia32_vec,&bfd_elf64_little_gen=
eric_vec,&bfd_elf64_big_generic_vec,&bfd_elf32_little_generic_vec,&bfd_el=
f32_big_generic_vec' -DSELECT_ARCHITECTURES='&bfd_i386_arch' -DHAVE_bfd=
_elf64_x86_64_vec -DHAVE_bfd_elf32_i386_vec -DHAVE_i386linux_vec -DHAVE_b=
fd_efi_app_ia32_vec -DHAVE_bfd_elf64_little_generic_vec -DHAVE_bfd_elf64_=
big_generic_vec -DHAVE_bfd_elf32_little_generic_vec -DHAVE_bfd_elf32_big_=
generic_vec ./archures.c
gcc -DHAVE_CONFIG_H -I. -I. -I. -D_GNU_SOURCE -I. -I. -I./../include -I./=
=2E./intl -I../intl -W -Wall -Wstrict-prototypes -Wmissing-prototypes -ma=
rch=athlon64 -O2 -c -DDEFAULT_VECTOR=bfd_elf64_x86_64_vec "-DSELECT_V=
ECS=&bfd_elf64_x86_64_vec,&bfd_elf32_i386_vec,&i386linux_vec,&bfd_efi_a=
pp_ia32_vec,&bfd_elf64_little_generic_vec,&bfd_elf64_big_generic_vec,&bfd=
_elf32_little_generic_vec,&bfd_elf32_big_generic_vec" "-DSELECT_ARCHITECT=
URES=&bfd_i386_arch" -DHAVE_bfd_elf64_x86_64_vec -DHAVE_bfd_elf32_i386_=
vec -DHAVE_i386linux_vec -DHAVE_bfd_efi_app_ia32_vec -DHAVE_bfd_elf64_lit=
tle_generic_vec -DHAVE_bfd_elf64_big_generic_vec -DHAVE_bfd_elf32_little_=
generic_vec -DHAVE_bfd_elf32_big_generic_vec ./archures.c -o archures.o
creating bfdver.h
/bin/sh ./libtool --mode=compile gcc -DHAVE_CONFIG_H -I. -I. -I. -D_GNU=
_SOURCE     -I. -I. -I./../include  -I./../intl -I../intl   -W -Wall -Wst=
rict-prototypes -Wmissing-prototypes -march=athlon64 -O2 -c -o bfd.lo b=
fd.c
gcc -DHAVE_CONFIG_H -I. -I. -I. -D_GNU_SOURCE -I. -I. -I./../include -I./=
=2E./intl -I../intl -W -Wall -Wstrict-prototypes -Wmissing-prototypes -ma=
rch=athlon64 -O2 -c bfd.c -o bfd.o
/bin/sh ./libtool --mode=compile gcc -DHAVE_CONFIG_H -I. -I. -I. -D_GNU=
_SOURCE     -I. -I. -I./../include  -I./../intl -I../intl   -W -Wall -Wst=
rict-prototypes -Wmissing-prototypes -march=athlon64 -O2 -c -o bfdio.lo=
 bfdio.c
gcc -DHAVE_CONFIG_H -I. -I. -I. -D_GNU_SOURCE -I. -I. -I./../include -I./=
=2E./intl -I../intl -W -Wall -Wstrict-prototypes -Wmissing-prototypes -ma=
rch=athlon64 -O2 -c bfdio.c -o bfdio.o
/bin/sh ./libtool --mode=compile gcc -DHAVE_CONFIG_H -I. -I. -I. -D_GNU=
_SOURCE     -I. -I. -I./../include  -I./../intl -I../intl   -W -Wall -Wst=
rict-prototypes -Wmissing-prototypes -march=athlon64 -O2 -c -o bfdwin.l=
o bfdwin.c
gcc -DHAVE_CONFIG_H -I. -I. -I. -D_GNU_SOURCE -I. -I. -I./../include -I./=
=2E./intl -I../intl -W -Wall -Wstrict-prototypes -Wmissing-prototypes -ma=
rch=athlon64 -O2 -c bfdwin.c -o bfdwin.o
/bin/sh ./libtool --mode=compile gcc -DHAVE_CONFIG_H -I. -I. -I. -D_GNU=
_SOURCE     -I. -I. -I./../include  -I./../intl -I../intl   -W -Wall -Wst=
rict-prototypes -Wmissing-prototypes -march=athlon64 -O2 -c -o cache.lo=
 cache.c
gcc -DHAVE_CONFIG_H -I. -I. -I. -D_GNU_SOURCE -I. -I. -I./../include -I./=
=2E./intl -I../intl -W -Wall -Wstrict-prototypes -Wmissing-prototypes -ma=
rch=athlon64 -O2 -c cache.c -o cache.o
/bin/sh ./libtool --mode=compile gcc -DHAVE_CONFIG_H -I. -I. -I. -D_GNU=
_SOURCE     -I. -I. -I./../include  -I./../intl -I../intl   -W -Wall -Wst=
rict-prototypes -Wmissing-prototypes -march=athlon64 -O2 -c -o coffgen.=
lo coffgen.c
gcc -DHAVE_CONFIG_H -I. -I. -I. -D_GNU_SOURCE -I. -I. -I./../include -I./=
=2E./intl -I../intl -W -Wall -Wstrict-prototypes -Wmissing-prototypes -ma=
rch=athlon64 -O2 -c coffgen.c -o coffgen.o
/bin/sh ./libtool --mode=compile gcc -DHAVE_CONFIG_H -I. -I. -I. -D_GNU=
_SOURCE     -I. -I. -I./../include  -I./../intl -I../intl   -W -Wall -Wst=
rict-prototypes -Wmissing-prototypes -march=athlon64 -O2 -c -o corefile=
=2Elo corefile.c
gcc -DHAVE_CONFIG_H -I. -I. -I. -D_GNU_SOURCE -I. -I. -I./../include -I./=
=2E./intl -I../intl -W -Wall -Wstrict-prototypes -Wmissing-prototypes -ma=
rch=athlon64 -O2 -c corefile.c -o corefile.o
/bin/sh ./libtool --mode=compile gcc -DHAVE_CONFIG_H -I. -I. -I. -D_GNU=
_SOURCE     -I. -I. -I./../include  -I./../intl -I../intl   -W -Wall -Wst=
rict-prototypes -Wmissing-prototypes -march=athlon64 -O2 -c -o format.l=
o format.c
gcc -DHAVE_CONFIG_H -I. -I. -I. -D_GNU_SOURCE -I. -I. -I./../include -I./=
=2E./intl -I../intl -W -Wall -Wstrict-prototypes -Wmissing-prototypes -ma=
rch=athlon64 -O2 -c format.c -o format.o
/bin/sh ./libtool --mode=compile gcc -DHAVE_CONFIG_H -I. -I. -I. -D_GNU=
_SOURCE     -I. -I. -I./../include  -I./../intl -I../intl   -W -Wall -Wst=
rict-prototypes -Wmissing-prototypes -march=athlon64 -O2 -c -o init.lo =
init.c
gcc -DHAVE_CONFIG_H -I. -I. -I. -D_GNU_SOURCE -I. -I. -I./../include -I./=
=2E./intl -I../intl -W -Wall -Wstrict-prototypes -Wmissing-prototypes -ma=
rch=athlon64 -O2 -c init.c -o init.o
/bin/sh ./libtool --mode=compile gcc -DHAVE_CONFIG_H -I. -I. -I. -D_GNU=
_SOURCE     -I. -I. -I./../include  -I./../intl -I../intl   -W -Wall -Wst=
rict-prototypes -Wmissing-prototypes -march=athlon64 -O2 -c -o libbfd.l=
o libbfd.c
gcc -DHAVE_CONFIG_H -I. -I. -I. -D_GNU_SOURCE -I. -I. -I./../include -I./=
=2E./intl -I../intl -W -Wall -Wstrict-prototypes -Wmissing-prototypes -ma=
rch=athlon64 -O2 -c libbfd.c -o libbfd.o
/bin/sh ./libtool --mode=compile gcc -DHAVE_CONFIG_H -I. -I. -I. -D_GNU=
_SOURCE     -I. -I. -I./../include  -I./../intl -I../intl   -W -Wall -Wst=
rict-prototypes -Wmissing-prototypes -march=athlon64 -O2 -c -o opncls.l=
o opncls.c
gcc -DHAVE_CONFIG_H -I. -I. -I. -D_GNU_SOURCE -I. -I. -I./../include -I./=
=2E./intl -I../intl -W -Wall -Wstrict-prototypes -Wmissing-prototypes -ma=
rch=athlon64 -O2 -c opncls.c -o opncls.o
/bin/sh ./libtool --mode=compile gcc -DHAVE_CONFIG_H -I. -I. -I. -D_GNU=
_SOURCE     -I. -I. -I./../include  -I./../intl -I../intl   -W -Wall -Wst=
rict-prototypes -Wmissing-prototypes -march=athlon64 -O2 -c -o reloc.lo=
 reloc.c
gcc -DHAVE_CONFIG_H -I. -I. -I. -D_GNU_SOURCE -I. -I. -I./../include -I./=
=2E./intl -I../intl -W -Wall -Wstrict-prototypes -Wmissing-prototypes -ma=
rch=athlon64 -O2 -c reloc.c -o reloc.o
/bin/sh ./libtool --mode=compile gcc -DHAVE_CONFIG_H -I. -I. -I. -D_GNU=
_SOURCE     -I. -I. -I./../include  -I./../intl -I../intl   -W -Wall -Wst=
rict-prototypes -Wmissing-prototypes -march=athlon64 -O2 -c -o section.=
lo section.c
gcc -DHAVE_CONFIG_H -I. -I. -I. -D_GNU_SOURCE -I. -I. -I./../include -I./=
=2E./intl -I../intl -W -Wall -Wstrict-prototypes -Wmissing-prototypes -ma=
rch=athlon64 -O2 -c section.c -o section.o
/bin/sh ./libtool --mode=compile gcc -DHAVE_CONFIG_H -I. -I. -I. -D_GNU=
_SOURCE     -I. -I. -I./../include  -I./../intl -I../intl   -W -Wall -Wst=
rict-prototypes -Wmissing-prototypes -march=athlon64 -O2 -c -o syms.lo =
syms.c
gcc -DHAVE_CONFIG_H -I. -I. -I. -D_GNU_SOURCE -I. -I. -I./../include -I./=
=2E./intl -I../intl -W -Wall -Wstrict-prototypes -Wmissing-prototypes -ma=
rch=athlon64 -O2 -c syms.c -o syms.o
rm -f targmatch.h
sed -f ./targmatch.sed < ./config.bfd > targmatch.new
mv -f targmatch.new targmatch.h
/bin/sh ./libtool --mode=compile gcc -DHAVE_CONFIG_H -I. -I. -I. -D_GNU=
_SOURCE     -I. -I. -I./../include  -I./../intl -I../intl   -W -Wall -Wst=
rict-prototypes -Wmissing-prototypes -march=athlon64 -O2 -c -DDEFAULT_V=
ECTOR=bfd_elf64_x86_64_vec -DSELECT_VECS='&bfd_elf64_x86_64_vec,&bfd_=
elf32_i386_vec,&i386linux_vec,&bfd_efi_app_ia32_vec,&bfd_elf64_little_gen=
eric_vec,&bfd_elf64_big_generic_vec,&bfd_elf32_little_generic_vec,&bfd_el=
f32_big_generic_vec' -DSELECT_ARCHITECTURES='&bfd_i386_arch' -DHAVE_bfd=
_elf64_x86_64_vec -DHAVE_bfd_elf32_i386_vec -DHAVE_i386linux_vec -DHAVE_b=
fd_efi_app_ia32_vec -DHAVE_bfd_elf64_little_generic_vec -DHAVE_bfd_elf64_=
big_generic_vec -DHAVE_bfd_elf32_little_generic_vec -DHAVE_bfd_elf32_big_=
generic_vec ./targets.c
gcc -DHAVE_CONFIG_H -I. -I. -I. -D_GNU_SOURCE -I. -I. -I./../include -I./=
=2E./intl -I../intl -W -Wall -Wstrict-prototypes -Wmissing-prototypes -ma=
rch=athlon64 -O2 -c -DDEFAULT_VECTOR=bfd_elf64_x86_64_vec "-DSELECT_V=
ECS=&bfd_elf64_x86_64_vec,&bfd_elf32_i386_vec,&i386linux_vec,&bfd_efi_a=
pp_ia32_vec,&bfd_elf64_little_generic_vec,&bfd_elf64_big_generic_vec,&bfd=
_elf32_little_generic_vec,&bfd_elf32_big_generic_vec" "-DSELECT_ARCHITECT=
URES=&bfd_i386_arch" -DHAVE_bfd_elf64_x86_64_vec -DHAVE_bfd_elf32_i386_=
vec -DHAVE_i386linux_vec -DHAVE_bfd_efi_app_ia32_vec -DHAVE_bfd_elf64_lit=
tle_generic_vec -DHAVE_bfd_elf64_big_generic_vec -DHAVE_bfd_elf32_little_=
generic_vec -DHAVE_bfd_elf32_big_generic_vec ./targets.c -o targets.o
/bin/sh ./libtool --mode=compile gcc -DHAVE_CONFIG_H -I. -I. -I. -D_GNU=
_SOURCE     -I. -I. -I./../include  -I./../intl -I../intl   -W -Wall -Wst=
rict-prototypes -Wmissing-prototypes -march=athlon64 -O2 -c -o hash.lo =
hash.c
gcc -DHAVE_CONFIG_H -I. -I. -I. -D_GNU_SOURCE -I. -I. -I./../include -I./=
=2E./intl -I../intl -W -Wall -Wstrict-prototypes -Wmissing-prototypes -ma=
rch=athlon64 -O2 -c hash.c -o hash.o
/bin/sh ./libtool --mode=compile gcc -DHAVE_CONFIG_H -I. -I. -I. -D_GNU=
_SOURCE     -I. -I. -I./../include  -I./../intl -I../intl   -W -Wall -Wst=
rict-prototypes -Wmissing-prototypes -march=athlon64 -O2 -c -o linker.l=
o linker.c
gcc -DHAVE_CONFIG_H -I. -I. -I. -D_GNU_SOURCE -I. -I. -I./../include -I./=
=2E./intl -I../intl -W -Wall -Wstrict-prototypes -Wmissing-prototypes -ma=
rch=athlon64 -O2 -c linker.c -o linker.o
/bin/sh ./libtool --mode=compile gcc -DHAVE_CONFIG_H -I. -I. -I. -D_GNU=
_SOURCE     -I. -I. -I./../include  -I./../intl -I../intl   -W -Wall -Wst=
rict-prototypes -Wmissing-prototypes -march=athlon64 -O2 -c -o srec.lo =
srec.c
gcc -DHAVE_CONFIG_H -I. -I. -I. -D_GNU_SOURCE -I. -I. -I./../include -I./=
=2E./intl -I../intl -W -Wall -Wstrict-prototypes -Wmissing-prototypes -ma=
rch=athlon64 -O2 -c srec.c -o srec.o
/bin/sh ./libtool --mode=compile gcc -DHAVE_CONFIG_H -I. -I. -I. -D_GNU=
_SOURCE     -I. -I. -I./../include  -I./../intl -I../intl   -W -Wall -Wst=
rict-prototypes -Wmissing-prototypes -march=athlon64 -O2 -c -o binary.l=
o binary.c
gcc -DHAVE_CONFIG_H -I. -I. -I. -D_GNU_SOURCE -I. -I. -I./../include -I./=
=2E./intl -I../intl -W -Wall -Wstrict-prototypes -Wmissing-prototypes -ma=
rch=athlon64 -O2 -c binary.c -o binary.o
/bin/sh ./libtool --mode=compile gcc -DHAVE_CONFIG_H -I. -I. -I. -D_GNU=
_SOURCE     -I. -I. -I./../include  -I./../intl -I../intl   -W -Wall -Wst=
rict-prototypes -Wmissing-prototypes -march=athlon64 -O2 -c -o tekhex.l=
o tekhex.c
gcc -DHAVE_CONFIG_H -I. -I. -I. -D_GNU_SOURCE -I. -I. -I./../include -I./=
=2E./intl -I../intl -W -Wall -Wstrict-prototypes -Wmissing-prototypes -ma=
rch=athlon64 -O2 -c tekhex.c -o tekhex.o
/bin/sh ./libtool --mode=compile gcc -DHAVE_CONFIG_H -I. -I. -I. -D_GNU=
_SOURCE     -I. -I. -I./../include  -I./../intl -I../intl   -W -Wall -Wst=
rict-prototypes -Wmissing-prototypes -march=athlon64 -O2 -c -o ihex.lo =
ihex.c
gcc -DHAVE_CONFIG_H -I. -I. -I. -D_GNU_SOURCE -I. -I. -I./../include -I./=
=2E./intl -I../intl -W -Wall -Wstrict-prototypes -Wmissing-prototypes -ma=
rch=athlon64 -O2 -c ihex.c -o ihex.o
/bin/sh ./libtool --mode=compile gcc -DHAVE_CONFIG_H -I. -I. -I. -D_GNU=
_SOURCE     -I. -I. -I./../include  -I./../intl -I../intl   -W -Wall -Wst=
rict-prototypes -Wmissing-prototypes -march=athlon64 -O2 -c -o stabs.lo=
 stabs.c
gcc -DHAVE_CONFIG_H -I. -I. -I. -D_GNU_SOURCE -I. -I. -I./../include -I./=
=2E./intl -I../intl -W -Wall -Wstrict-prototypes -Wmissing-prototypes -ma=
rch=athlon64 -O2 -c stabs.c -o stabs.o
/bin/sh ./libtool --mode=compile gcc -DHAVE_CONFIG_H -I. -I. -I. -D_GNU=
_SOURCE     -I. -I. -I./../include  -I./../intl -I../intl   -W -Wall -Wst=
rict-prototypes -Wmissing-prototypes -march=athlon64 -O2 -c -o stab-sym=
s.lo stab-syms.c
gcc -DHAVE_CONFIG_H -I. -I. -I. -D_GNU_SOURCE -I. -I. -I./../include -I./=
=2E./intl -I../intl -W -Wall -Wstrict-prototypes -Wmissing-prototypes -ma=
rch=athlon64 -O2 -c stab-syms.c -o stab-syms.o
/bin/sh ./libtool --mode=compile gcc -DHAVE_CONFIG_H -I. -I. -I. -D_GNU=
_SOURCE     -I. -I. -I./../include  -I./../intl -I../intl   -W -Wall -Wst=
rict-prototypes -Wmissing-prototypes -march=athlon64 -O2 -c -o merge.lo=
 merge.c
gcc -DHAVE_CONFIG_H -I. -I. -I. -D_GNU_SOURCE -I. -I. -I./../include -I./=
=2E./intl -I../intl -W -Wall -Wstrict-prototypes -Wmissing-prototypes -ma=
rch=athlon64 -O2 -c merge.c -o merge.o
/bin/sh ./libtool --mode=compile gcc -DHAVE_CONFIG_H -I. -I. -I. -D_GNU=
_SOURCE     -I. -I. -I./../include  -I./../intl -I../intl   -W -Wall -Wst=
rict-prototypes -Wmissing-prototypes -march=athlon64 -O2 -c -o dwarf2.l=
o dwarf2.c
gcc -DHAVE_CONFIG_H -I. -I. -I. -D_GNU_SOURCE -I. -I. -I./../include -I./=
=2E./intl -I../intl -W -Wall -Wstrict-prototypes -Wmissing-prototypes -ma=
rch=athlon64 -O2 -c dwarf2.c -o dwarf2.o
/bin/sh ./libtool --mode=compile gcc -DHAVE_CONFIG_H -I. -I. -I. -D_GNU=
_SOURCE     -I. -I. -I./../include  -I./../intl -I../intl   -W -Wall -Wst=
rict-prototypes -Wmissing-prototypes -march=athlon64 -O2 -c -o simple.l=
o simple.c
gcc -DHAVE_CONFIG_H -I. -I. -I. -D_GNU_SOURCE -I. -I. -I./../include -I./=
=2E./intl -I../intl -W -Wall -Wstrict-prototypes -Wmissing-prototypes -ma=
rch=athlon64 -O2 -c simple.c -o simple.o
/bin/sh ./libtool --mode=compile gcc -DHAVE_CONFIG_H -I. -I. -I. -D_GNU=
_SOURCE     -I. -I. -I./../include  -I./../intl -I../intl   -W -Wall -Wst=
rict-prototypes -Wmissing-prototypes -march=athlon64 -O2 -c -o archive6=
4.lo archive64.c
gcc -DHAVE_CONFIG_H -I. -I. -I. -D_GNU_SOURCE -I. -I. -I./../include -I./=
=2E./intl -I../intl -W -Wall -Wstrict-prototypes -Wmissing-prototypes -ma=
rch=athlon64 -O2 -c archive64.c -o archive64.o
rm -f elf64-target.h
sed -e s/NN/64/g < ./elfxx-target.h > elf64-target.new
mv -f elf64-target.new elf64-target.h
/bin/sh ./libtool --mode=compile gcc -DHAVE_CONFIG_H -I. -I. -I. -D_GNU=
_SOURCE     -I. -I. -I./../include  -I./../intl -I../intl   -W -Wall -Wst=
rict-prototypes -Wmissing-prototypes -march=athlon64 -O2 -c -o elf64-x8=
6-64.lo elf64-x86-64.c
gcc -DHAVE_CONFIG_H -I. -I. -I. -D_GNU_SOURCE -I. -I. -I./../include -I./=
=2E./intl -I../intl -W -Wall -Wstrict-prototypes -Wmissing-prototypes -ma=
rch=athlon64 -O2 -c elf64-x86-64.c -o elf64-x86-64.o
elf64-x86-64.c: In function 'elf64_x86_64_check_relocs':
elf64-x86-64.c:928: warning: dereferencing type-punned pointer will break=
 strict-aliasing rules
elf64-x86-64.c: In function 'elf64_x86_64_size_dynamic_sections':
elf64-x86-64.c:1549: warning: dereferencing type-punned pointer will brea=
k strict-aliasing rules
/bin/sh ./libtool --mode=compile gcc -DHAVE_CONFIG_H -I. -I. -I. -D_GNU=
_SOURCE     -I. -I. -I./../include  -I./../intl -I../intl   -W -Wall -Wst=
rict-prototypes -Wmissing-prototypes -march=athlon64 -O2 -c -o elf64.lo=
 elf64.c
gcc -DHAVE_CONFIG_H -I. -I. -I. -D_GNU_SOURCE -I. -I. -I./../include -I./=
=2E./intl -I../intl -W -Wall -Wstrict-prototypes -Wmissing-prototypes -ma=
rch=athlon64 -O2 -c elf64.c -o elf64.o
/bin/sh ./libtool --mode=compile gcc -DHAVE_CONFIG_H -I. -I. -I. -D_GNU=
_SOURCE     -I. -I. -I./../include  -I./../intl -I../intl   -W -Wall -Wst=
rict-prototypes -Wmissing-prototypes -march=athlon64 -O2 -c -o elf.lo e=
lf.c
gcc -DHAVE_CONFIG_H -I. -I. -I. -D_GNU_SOURCE -I. -I. -I./../include -I./=
=2E./intl -I../intl -W -Wall -Wstrict-prototypes -Wmissing-prototypes -ma=
rch=athlon64 -O2 -c elf.c -o elf.o
/bin/sh ./libtool --mode=compile gcc -DHAVE_CONFIG_H -I. -I. -I. -D_GNU=
_SOURCE     -I. -I. -I./../include  -I./../intl -I../intl   -W -Wall -Wst=
rict-prototypes -Wmissing-prototypes -march=athlon64 -O2 -c -o elflink.=
lo elflink.c
gcc -DHAVE_CONFIG_H -I. -I. -I. -D_GNU_SOURCE -I. -I. -I./../include -I./=
=2E./intl -I../intl -W -Wall -Wstrict-prototypes -Wmissing-prototypes -ma=
rch=athlon64 -O2 -c elflink.c -o elflink.o
/bin/sh ./libtool --mode=compile gcc -DHAVE_CONFIG_H -I. -I. -I. -D_GNU=
_SOURCE     -I. -I. -I./../include  -I./../intl -I../intl   -W -Wall -Wst=
rict-prototypes -Wmissing-prototypes -march=athlon64 -O2 -c -o elf-strt=
ab.lo elf-strtab.c
gcc -DHAVE_CONFIG_H -I. -I. -I. -D_GNU_SOURCE -I. -I. -I./../include -I./=
=2E./intl -I../intl -W -Wall -Wstrict-prototypes -Wmissing-prototypes -ma=
rch=athlon64 -O2 -c elf-strtab.c -o elf-strtab.o
/bin/sh ./libtool --mode=compile gcc -DHAVE_CONFIG_H -I. -I. -I. -D_GNU=
_SOURCE     -I. -I. -I./../include  -I./../intl -I../intl   -W -Wall -Wst=
rict-prototypes -Wmissing-prototypes -march=athlon64 -O2 -c -o elf-eh-f=
rame.lo elf-eh-frame.c
gcc -DHAVE_CONFIG_H -I. -I. -I. -D_GNU_SOURCE -I. -I. -I./../include -I./=
=2E./intl -I../intl -W -Wall -Wstrict-prototypes -Wmissing-prototypes -ma=
rch=athlon64 -O2 -c elf-eh-frame.c -o elf-eh-frame.o
/bin/sh ./libtool --mode=compile gcc -DHAVE_CONFIG_H -I. -I. -I. -D_GNU=
_SOURCE     -I. -I. -I./../include  -I./../intl -I../intl   -W -Wall -Wst=
rict-prototypes -Wmissing-prototypes -march=athlon64 -O2 -c -o dwarf1.l=
o dwarf1.c
gcc -DHAVE_CONFIG_H -I. -I. -I. -D_GNU_SOURCE -I. -I. -I./../include -I./=
=2E./intl -I../intl -W -Wall -Wstrict-prototypes -Wmissing-prototypes -ma=
rch=athlon64 -O2 -c dwarf1.c -o dwarf1.o
rm -f elf32-target.h
sed -e s/NN/32/g < ./elfxx-target.h > elf32-target.new
mv -f elf32-target.new elf32-target.h
/bin/sh ./libtool --mode=compile gcc -DHAVE_CONFIG_H -I. -I. -I. -D_GNU=
_SOURCE     -I. -I. -I./../include  -I./../intl -I../intl   -W -Wall -Wst=
rict-prototypes -Wmissing-prototypes -march=athlon64 -O2 -c -o elf32-i3=
86.lo elf32-i386.c
gcc -DHAVE_CONFIG_H -I. -I. -I. -D_GNU_SOURCE -I. -I. -I./../include -I./=
=2E./intl -I../intl -W -Wall -Wstrict-prototypes -Wmissing-prototypes -ma=
rch=athlon64 -O2 -c elf32-i386.c -o elf32-i386.o
elf32-i386.c: In function 'elf_i386_check_relocs':
elf32-i386.c:1133: warning: dereferencing type-punned pointer will break =
strict-aliasing rules
elf32-i386.c: In function 'elf_i386_size_dynamic_sections':
elf32-i386.c:1752: warning: dereferencing type-punned pointer will break =
strict-aliasing rules
/bin/sh ./libtool --mode=compile gcc -DHAVE_CONFIG_H -I. -I. -I. -D_GNU=
_SOURCE     -I. -I. -I./../include  -I./../intl -I../intl   -W -Wall -Wst=
rict-prototypes -Wmissing-prototypes -march=athlon64 -O2 -c -o elf32.lo=
 elf32.c
gcc -DHAVE_CONFIG_H -I. -I. -I. -D_GNU_SOURCE -I. -I. -I./../include -I./=
=2E./intl -I../intl -W -Wall -Wstrict-prototypes -Wmissing-prototypes -ma=
rch=athlon64 -O2 -c elf32.c -o elf32.o
/bin/sh ./libtool --mode=compile gcc -DHAVE_CONFIG_H -I. -I. -I. -D_GNU=
_SOURCE     -I. -I. -I./../include  -I./../intl -I../intl   -W -Wall -Wst=
rict-prototypes -Wmissing-prototypes -march=athlon64 -O2 -c -o i386linu=
x.lo i386linux.c
gcc -DHAVE_CONFIG_H -I. -I. -I. -D_GNU_SOURCE -I. -I. -I./../include -I./=
=2E./intl -I../intl -W -Wall -Wstrict-prototypes -Wmissing-prototypes -ma=
rch=athlon64 -O2 -c i386linux.c -o i386linux.o
/bin/sh ./libtool --mode=compile gcc -DHAVE_CONFIG_H -I. -I. -I. -D_GNU=
_SOURCE     -I. -I. -I./../include  -I./../intl -I../intl   -W -Wall -Wst=
rict-prototypes -Wmissing-prototypes -march=athlon64 -O2 -c -o aout32.l=
o aout32.c
gcc -DHAVE_CONFIG_H -I. -I. -I. -D_GNU_SOURCE -I. -I. -I./../include -I./=
=2E./intl -I../intl -W -Wall -Wstrict-prototypes -Wmissing-prototypes -ma=
rch=athlon64 -O2 -c aout32.c -o aout32.o
/bin/sh ./libtool --mode=compile gcc -DHAVE_CONFIG_H -I. -I. -I. -D_GNU=
_SOURCE     -I. -I. -I./../include  -I./../intl -I../intl   -W -Wall -Wst=
rict-prototypes -Wmissing-prototypes -march=athlon64 -O2 -c -o efi-app-=
ia32.lo efi-app-ia32.c
gcc -DHAVE_CONFIG_H -I. -I. -I. -D_GNU_SOURCE -I. -I. -I./../include -I./=
=2E./intl -I../intl -W -Wall -Wstrict-prototypes -Wmissing-prototypes -ma=
rch=athlon64 -O2 -c efi-app-ia32.c -o efi-app-ia32.o
rm -f peigen.c
sed -e s/XX/pe/g < ./peXXigen.c > peigen.new
mv -f peigen.new peigen.c
/bin/sh ./libtool --mode=compile gcc -DHAVE_CONFIG_H -I. -I. -I. -D_GNU=
_SOURCE     -I. -I. -I./../include  -I./../intl -I../intl   -W -Wall -Wst=
rict-prototypes -Wmissing-prototypes -march=athlon64 -O2 -c -o peigen.l=
o peigen.c
gcc -DHAVE_CONFIG_H -I. -I. -I. -D_GNU_SOURCE -I. -I. -I./../include -I./=
=2E./intl -I../intl -W -Wall -Wstrict-prototypes -Wmissing-prototypes -ma=
rch=athlon64 -O2 -c peigen.c -o peigen.o
/bin/sh ./libtool --mode=compile gcc -DHAVE_CONFIG_H -I. -I. -I. -D_GNU=
_SOURCE     -I. -I. -I./../include  -I./../intl -I../intl   -W -Wall -Wst=
rict-prototypes -Wmissing-prototypes -march=athlon64 -O2 -c -o cofflink=
=2Elo cofflink.c
gcc -DHAVE_CONFIG_H -I. -I. -I. -D_GNU_SOURCE -I. -I. -I./../include -I./=
=2E./intl -I../intl -W -Wall -Wstrict-prototypes -Wmissing-prototypes -ma=
rch=athlon64 -O2 -c cofflink.c -o cofflink.o
/bin/sh ./libtool --mode=compile gcc -DHAVE_CONFIG_H -I. -I. -I. -D_GNU=
_SOURCE     -I. -I. -I./../include  -I./../intl -I../intl   -W -Wall -Wst=
rict-prototypes -Wmissing-prototypes -march=athlon64 -O2 -c -o elf64-ge=
n.lo elf64-gen.c
gcc -DHAVE_CONFIG_H -I. -I. -I. -D_GNU_SOURCE -I. -I. -I./../include -I./=
=2E./intl -I../intl -W -Wall -Wstrict-prototypes -Wmissing-prototypes -ma=
rch=athlon64 -O2 -c elf64-gen.c -o elf64-gen.o
/bin/sh ./libtool --mode=compile gcc -DHAVE_CONFIG_H -I. -I. -I. -D_GNU=
_SOURCE     -I. -I. -I./../include  -I./../intl -I../intl   -W -Wall -Wst=
rict-prototypes -Wmissing-prototypes -march=athlon64 -O2 -c -o elf32-ge=
n.lo elf32-gen.c
gcc -DHAVE_CONFIG_H -I. -I. -I. -D_GNU_SOURCE -I. -I. -I./../include -I./=
=2E./intl -I../intl -W -Wall -Wstrict-prototypes -Wmissing-prototypes -ma=
rch=athlon64 -O2 -c elf32-gen.c -o elf32-gen.o
/bin/sh ./libtool --mode=compile gcc -DHAVE_CONFIG_H -I. -I. -I. -D_GNU=
_SOURCE     -I. -I. -I./../include  -I./../intl -I../intl   -W -Wall -Wst=
rict-prototypes -Wmissing-prototypes -march=athlon64 -O2 -c -o cpu-i386=
=2Elo cpu-i386.c
gcc -DHAVE_CONFIG_H -I. -I. -I. -D_GNU_SOURCE -I. -I. -I./../include -I./=
=2E./intl -I../intl -W -Wall -Wstrict-prototypes -Wmissing-prototypes -ma=
rch=athlon64 -O2 -c cpu-i386.c -o cpu-i386.o
rm -f tofiles
f=""; \
	for i in elf64-x86-64.lo elf64.lo elf.lo elflink.lo elf-strtab.lo elf-eh=
-frame.lo dwarf1.lo elf32-i386.lo elf32.lo i386linux.lo aout32.lo efi-app=
-ia32.lo peigen.lo cofflink.lo elf64-gen.lo elf32-gen.lo cpu-i386.lo  ; d=
o \
	  case " $f " in \
	    *" $i "*) ;; \
	    *) f="$f $i" ;; \
	  esac ; \
	done ; \
	echo $f > tofiles
/bin/sh ./../move-if-change tofiles ofiles
touch stamp-ofiles
/bin/sh ./libtool --mode=link gcc -W -Wall -Wstrict-prototypes -Wmissin=
g-prototypes -march=athlon64 -O2   -o libbfd.la -rpath /usr/local/lib -=
release 2.16.1  archive.lo archures.lo bfd.lo bfdio.lo bfdwin.lo cache.lo=
 coffgen.lo corefile.lo format.lo init.lo libbfd.lo opncls.lo reloc.lo se=
ction.lo syms.lo targets.lo hash.lo linker.lo srec.lo binary.lo tekhex.lo=
 ihex.lo stabs.lo stab-syms.lo merge.lo dwarf2.lo simple.lo archive64.lo =
`cat ofiles` 
mkdir .libs
ar cru .libs/libbfd.a  archive.o archures.o bfd.o bfdio.o bfdwin.o cache.=
o coffgen.o corefile.o format.o init.o libbfd.o opncls.o reloc.o section.=
o syms.o targets.o hash.o linker.o srec.o binary.o tekhex.o ihex.o stabs.=
o stab-syms.o merge.o dwarf2.o simple.o archive64.o elf64-x86-64.o elf64.=
o elf.o elflink.o elf-strtab.o elf-eh-frame.o dwarf1.o elf32-i386.o elf32=
=2Eo i386linux.o aout32.o efi-app-ia32.o peigen.o cofflink.o elf64-gen.o =
elf32-gen.o cpu-i386.o
ranlib .libs/libbfd.a
creating libbfd.la
(cd .libs && rm -f libbfd.la && ln -s ../libbfd.la libbfd.la)
libtooldir=`/bin/sh ./libtool --config | sed -n -e 's/^objdir=//p'`; =
\
	if [ -f $libtooldir/libbfd.a ]; then \
	  cp $libtooldir/libbfd.a libbfd.tmp; \
	  ranlib libbfd.tmp; \
	  /bin/sh ./../move-if-change libbfd.tmp libbfd.a; \
	else true; fi
touch stamp-lib
make[6]: Leaving directory `/home/axiom/silver/lsp/gcl-2.6.8pre/binutils/=
bfd'
make[5]: Leaving directory `/home/axiom/silver/lsp/gcl-2.6.8pre/binutils/=
bfd'
make[4]: Leaving directory `/home/axiom/silver/lsp/gcl-2.6.8pre/binutils/=
bfd'
cd binutils/libiberty && make
make[4]: Entering directory `/home/axiom/silver/lsp/gcl-2.6.8pre/binutils=
/libiberty'
if [ x"" != x ] && [ ! -d pic ]; then \
	  mkdir pic; \
	else true; fi
touch stamp-picdir
if [ x"" != x ]; then \
	  gcc -c -DHAVE_CONFIG_H -march=athlon64 -O2 -I. -I./../include  -W -W=
all -Wtraditional -pedantic  ./regex.c -o pic/regex.o; \
	else true; fi
gcc -c -DHAVE_CONFIG_H -march=athlon64 -O2 -I. -I./../include  -W -Wall=
 -Wtraditional -pedantic ./regex.c -o regex.o
In file included from ./../include/xregex.h:26,
                 from ./regex.c:199:
=2E/../include/xregex2.h:548: warning: ISO C90 does not support 'static' =
or type qualifiers in parameter array declarators
In file included from ./regex.c:653:
=2E/regex.c: In function 'byte_compile_range':
=2E/regex.c:4552: warning: signed and unsigned type in conditional expres=
sion
=2E/regex.c:4562: warning: signed and unsigned type in conditional expres=
sion
=2E/regex.c:4562: warning: signed and unsigned type in conditional expres=
sion
if [ x"" != x ]; then \
	  gcc -c -DHAVE_CONFIG_H -march=athlon64 -O2 -I. -I./../include  -W -W=
all -Wtraditional -pedantic  ./cplus-dem.c -o pic/cplus-dem.o; \
	else true; fi
gcc -c -DHAVE_CONFIG_H -march=athlon64 -O2 -I. -I./../include  -W -Wall=
 -Wtraditional -pedantic ./cplus-dem.c -o cplus-dem.o
if [ x"" != x ]; then \
	  gcc -c -DHAVE_CONFIG_H -march=athlon64 -O2 -I. -I./../include  -W -W=
all -Wtraditional -pedantic  ./cp-demangle.c -o pic/cp-demangle.o; \
	else true; fi
gcc -c -DHAVE_CONFIG_H -march=athlon64 -O2 -I. -I./../include  -W -Wall=
 -Wtraditional -pedantic ./cp-demangle.c -o cp-demangle.o
if [ x"" != x ]; then \
	  gcc -c -DHAVE_CONFIG_H -march=athlon64 -O2 -I. -I./../include  -W -W=
all -Wtraditional -pedantic  ./md5.c -o pic/md5.o; \
	else true; fi
gcc -c -DHAVE_CONFIG_H -march=athlon64 -O2 -I. -I./../include  -W -Wall=
 -Wtraditional -pedantic ./md5.c -o md5.o
if [ x"" != x ]; then \
	  gcc -c -DHAVE_CONFIG_H -march=athlon64 -O2 -I. -I./../include  -W -W=
all -Wtraditional -pedantic  ./alloca.c -o pic/alloca.o; \
	else true; fi
gcc -c -DHAVE_CONFIG_H -march=athlon64 -O2 -I. -I./../include  -W -Wall=
 -Wtraditional -pedantic ./alloca.c -o alloca.o
if [ x"" != x ]; then \
	  gcc -c -DHAVE_CONFIG_H -march=athlon64 -O2 -I. -I./../include  -W -W=
all -Wtraditional -pedantic  ./argv.c -o pic/argv.o; \
	else true; fi
gcc -c -DHAVE_CONFIG_H -march=athlon64 -O2 -I. -I./../include  -W -Wall=
 -Wtraditional -pedantic ./argv.c -o argv.o
if [ x"" != x ]; then \
	  gcc -c -DHAVE_CONFIG_H -march=athlon64 -O2 -I. -I./../include  -W -W=
all -Wtraditional -pedantic  ./choose-temp.c -o pic/choose-temp.o; \
	else true; fi
gcc -c -DHAVE_CONFIG_H -march=athlon64 -O2 -I. -I./../include  -W -Wall=
 -Wtraditional -pedantic ./choose-temp.c -o choose-temp.o
if [ x"" != x ]; then \
	  gcc -c -DHAVE_CONFIG_H -march=athlon64 -O2 -I. -I./../include  -W -W=
all -Wtraditional -pedantic  ./concat.c -o pic/concat.o; \
	else true; fi
gcc -c -DHAVE_CONFIG_H -march=athlon64 -O2 -I. -I./../include  -W -Wall=
 -Wtraditional -pedantic ./concat.c -o concat.o
=2E/concat.c: In function 'concat_length':
=2E/concat.c:112: warning: traditional C rejects ISO C style function def=
initions
=2E/concat.c: In function 'concat_copy':
=2E/concat.c:127: warning: traditional C rejects ISO C style function def=
initions
=2E/concat.c: In function 'concat_copy2':
=2E/concat.c:146: warning: traditional C rejects ISO C style function def=
initions
=2E/concat.c: In function 'concat':
=2E/concat.c:157: warning: traditional C rejects ISO C style function def=
initions
=2E/concat.c: In function 'reconcat':
=2E/concat.c:194: warning: traditional C rejects ISO C style function def=
initions
if [ x"" != x ]; then \
	  gcc -c -DHAVE_CONFIG_H -march=athlon64 -O2 -I. -I./../include  -W -W=
all -Wtraditional -pedantic  ./cp-demint.c -o pic/cp-demint.o; \
	else true; fi
gcc -c -DHAVE_CONFIG_H -march=athlon64 -O2 -I. -I./../include  -W -Wall=
 -Wtraditional -pedantic ./cp-demint.c -o cp-demint.o
if [ x"" != x ]; then \
	  gcc -c -DHAVE_CONFIG_H -march=athlon64 -O2 -I. -I./../include  -W -W=
all -Wtraditional -pedantic  ./dyn-string.c -o pic/dyn-string.o; \
	else true; fi
gcc -c -DHAVE_CONFIG_H -march=athlon64 -O2 -I. -I./../include  -W -Wall=
 -Wtraditional -pedantic ./dyn-string.c -o dyn-string.o
if [ x"" != x ]; then \
	  gcc -c -DHAVE_CONFIG_H -march=athlon64 -O2 -I. -I./../include  -W -W=
all -Wtraditional -pedantic  ./fdmatch.c -o pic/fdmatch.o; \
	else true; fi
gcc -c -DHAVE_CONFIG_H -march=athlon64 -O2 -I. -I./../include  -W -Wall=
 -Wtraditional -pedantic ./fdmatch.c -o fdmatch.o
if [ x"" != x ]; then \
	  gcc -c -DHAVE_CONFIG_H -march=athlon64 -O2 -I. -I./../include  -W -W=
all -Wtraditional -pedantic  ./fibheap.c -o pic/fibheap.o; \
	else true; fi
gcc -c -DHAVE_CONFIG_H -march=athlon64 -O2 -I. -I./../include  -W -Wall=
 -Wtraditional -pedantic ./fibheap.c -o fibheap.o
if [ x"" != x ]; then \
	  gcc -c -DHAVE_CONFIG_H -march=athlon64 -O2 -I. -I./../include  -W -W=
all -Wtraditional -pedantic  ./floatformat.c -o pic/floatformat.o; \
	else true; fi
gcc -c -DHAVE_CONFIG_H -march=athlon64 -O2 -I. -I./../include  -W -Wall=
 -Wtraditional -pedantic ./floatformat.c -o floatformat.o
if [ x"" != x ]; then \
	  gcc -c -DHAVE_CONFIG_H -march=athlon64 -O2 -I. -I./../include  -W -W=
all -Wtraditional -pedantic  ./fnmatch.c -o pic/fnmatch.o; \
	else true; fi
gcc -c -DHAVE_CONFIG_H -march=athlon64 -O2 -I. -I./../include  -W -Wall=
 -Wtraditional -pedantic ./fnmatch.c -o fnmatch.o
if [ x"" != x ]; then \
	  gcc -c -DHAVE_CONFIG_H -march=athlon64 -O2 -I. -I./../include  -W -W=
all -Wtraditional -pedantic  ./getopt.c -o pic/getopt.o; \
	else true; fi
gcc -c -DHAVE_CONFIG_H -march=athlon64 -O2 -I. -I./../include  -W -Wall=
 -Wtraditional -pedantic ./getopt.c -o getopt.o
if [ x"" != x ]; then \
	  gcc -c -DHAVE_CONFIG_H -march=athlon64 -O2 -I. -I./../include  -W -W=
all -Wtraditional -pedantic  ./getopt1.c -o pic/getopt1.o; \
	else true; fi
gcc -c -DHAVE_CONFIG_H -march=athlon64 -O2 -I. -I./../include  -W -Wall=
 -Wtraditional -pedantic ./getopt1.c -o getopt1.o
if [ x"" != x ]; then \
	  gcc -c -DHAVE_CONFIG_H -march=athlon64 -O2 -I. -I./../include  -W -W=
all -Wtraditional -pedantic  ./getpwd.c -o pic/getpwd.o; \
	else true; fi
gcc -c -DHAVE_CONFIG_H -march=athlon64 -O2 -I. -I./../include  -W -Wall=
 -Wtraditional -pedantic ./getpwd.c -o getpwd.o
if [ x"" != x ]; then \
	  gcc -c -DHAVE_CONFIG_H -march=athlon64 -O2 -I. -I./../include  -W -W=
all -Wtraditional -pedantic  ./getruntime.c -o pic/getruntime.o; \
	else true; fi
gcc -c -DHAVE_CONFIG_H -march=athlon64 -O2 -I. -I./../include  -W -Wall=
 -Wtraditional -pedantic ./getruntime.c -o getruntime.o
if [ x"" != x ]; then \
	  gcc -c -DHAVE_CONFIG_H -march=athlon64 -O2 -I. -I./../include  -W -W=
all -Wtraditional -pedantic  ./hashtab.c -o pic/hashtab.o; \
	else true; fi
gcc -c -DHAVE_CONFIG_H -march=athlon64 -O2 -I. -I./../include  -W -Wall=
 -Wtraditional -pedantic ./hashtab.c -o hashtab.o
if [ x"" != x ]; then \
	  gcc -c -DHAVE_CONFIG_H -march=athlon64 -O2 -I. -I./../include  -W -W=
all -Wtraditional -pedantic  ./hex.c -o pic/hex.o; \
	else true; fi
gcc -c -DHAVE_CONFIG_H -march=athlon64 -O2 -I. -I./../include  -W -Wall=
 -Wtraditional -pedantic ./hex.c -o hex.o
if [ x"" != x ]; then \
	  gcc -c -DHAVE_CONFIG_H -march=athlon64 -O2 -I. -I./../include  -W -W=
all -Wtraditional -pedantic  ./lbasename.c -o pic/lbasename.o; \
	else true; fi
gcc -c -DHAVE_CONFIG_H -march=athlon64 -O2 -I. -I./../include  -W -Wall=
 -Wtraditional -pedantic ./lbasename.c -o lbasename.o
if [ x"" != x ]; then \
	  gcc -c -DHAVE_CONFIG_H -march=athlon64 -O2 -I. -I./../include  -W -W=
all -Wtraditional -pedantic  ./lrealpath.c -o pic/lrealpath.o; \
	else true; fi
gcc -c -DHAVE_CONFIG_H -march=athlon64 -O2 -I. -I./../include  -W -Wall=
 -Wtraditional -pedantic ./lrealpath.c -o lrealpath.o
if [ x"" != x ]; then \
	  gcc -c -DHAVE_CONFIG_H -march=athlon64 -O2 -I. -I./../include  -W -W=
all -Wtraditional -pedantic  ./make-relative-prefix.c -o pic/make-relativ=
e-prefix.o; \
	else true; fi
gcc -c -DHAVE_CONFIG_H -march=athlon64 -O2 -I. -I./../include  -W -Wall=
 -Wtraditional -pedantic ./make-relative-prefix.c -o make-relative-prefix=
=2Eo
if [ x"" != x ]; then \
	  gcc -c -DHAVE_CONFIG_H -march=athlon64 -O2 -I. -I./../include  -W -W=
all -Wtraditional -pedantic  ./make-temp-file.c -o pic/make-temp-file.o; =
\
	else true; fi
gcc -c -DHAVE_CONFIG_H -march=athlon64 -O2 -I. -I./../include  -W -Wall=
 -Wtraditional -pedantic ./make-temp-file.c -o make-temp-file.o
if [ x"" != x ]; then \
	  gcc -c -DHAVE_CONFIG_H -march=athlon64 -O2 -I. -I./../include  -W -W=
all -Wtraditional -pedantic  ./objalloc.c -o pic/objalloc.o; \
	else true; fi
gcc -c -DHAVE_CONFIG_H -march=athlon64 -O2 -I. -I./../include  -W -Wall=
 -Wtraditional -pedantic ./objalloc.c -o objalloc.o
if [ x"" != x ]; then \
	  gcc -c -DHAVE_CONFIG_H -march=athlon64 -O2 -I. -I./../include  -W -W=
all -Wtraditional -pedantic  ./obstack.c -o pic/obstack.o; \
	else true; fi
gcc -c -DHAVE_CONFIG_H -march=athlon64 -O2 -I. -I./../include  -W -Wall=
 -Wtraditional -pedantic ./obstack.c -o obstack.o
if [ x"" != x ]; then \
	  gcc -c -DHAVE_CONFIG_H -march=athlon64 -O2 -I. -I./../include  -W -W=
all -Wtraditional -pedantic  ./partition.c -o pic/partition.o; \
	else true; fi
gcc -c -DHAVE_CONFIG_H -march=athlon64 -O2 -I. -I./../include  -W -Wall=
 -Wtraditional -pedantic ./partition.c -o partition.o
if [ x"" != x ]; then \
	  gcc -c -DHAVE_CONFIG_H -march=athlon64 -O2 -I. -I./../include  -W -W=
all -Wtraditional -pedantic  ./physmem.c -o pic/physmem.o; \
	else true; fi
gcc -c -DHAVE_CONFIG_H -march=athlon64 -O2 -I. -I./../include  -W -Wall=
 -Wtraditional -pedantic ./physmem.c -o physmem.o
if [ x"" != x ]; then \
	  gcc -c -DHAVE_CONFIG_H -march=athlon64 -O2 -I. -I./../include  -W -W=
all -Wtraditional -pedantic  ./pex-unix.c -o pic/pex-unix.o; \
	else true; fi
gcc -c -DHAVE_CONFIG_H -march=athlon64 -O2 -I. -I./../include  -W -Wall=
 -Wtraditional -pedantic ./pex-unix.c -o pex-unix.o
=2E/pex-unix.c: In function 'pexecute':
=2E/pex-unix.c:94: warning: variable 'out' might be clobbered by 'longjmp=
' or 'vfork'
if [ x"" != x ]; then \
	  gcc -c -DHAVE_CONFIG_H -march=athlon64 -O2 -I. -I./../include  -W -W=
all -Wtraditional -pedantic  ./safe-ctype.c -o pic/safe-ctype.o; \
	else true; fi
gcc -c -DHAVE_CONFIG_H -march=athlon64 -O2 -I. -I./../include  -W -Wall=
 -Wtraditional -pedantic ./safe-ctype.c -o safe-ctype.o
if [ x"" != x ]; then \
	  gcc -c -DHAVE_CONFIG_H -march=athlon64 -O2 -I. -I./../include  -W -W=
all -Wtraditional -pedantic  ./sort.c -o pic/sort.o; \
	else true; fi
gcc -c -DHAVE_CONFIG_H -march=athlon64 -O2 -I. -I./../include  -W -Wall=
 -Wtraditional -pedantic ./sort.c -o sort.o
if [ x"" != x ]; then \
	  gcc -c -DHAVE_CONFIG_H -march=athlon64 -O2 -I. -I./../include  -W -W=
all -Wtraditional -pedantic  ./spaces.c -o pic/spaces.o; \
	else true; fi
gcc -c -DHAVE_CONFIG_H -march=athlon64 -O2 -I. -I./../include  -W -Wall=
 -Wtraditional -pedantic ./spaces.c -o spaces.o
if [ x"" != x ]; then \
	  gcc -c -DHAVE_CONFIG_H -march=athlon64 -O2 -I. -I./../include  -W -W=
all -Wtraditional -pedantic  ./splay-tree.c -o pic/splay-tree.o; \
	else true; fi
gcc -c -DHAVE_CONFIG_H -march=athlon64 -O2 -I. -I./../include  -W -Wall=
 -Wtraditional -pedantic ./splay-tree.c -o splay-tree.o
if [ x"" != x ]; then \
	  gcc -c -DHAVE_CONFIG_H -march=athlon64 -O2 -I. -I./../include  -W -W=
all -Wtraditional -pedantic  ./strerror.c -o pic/strerror.o; \
	else true; fi
gcc -c -DHAVE_CONFIG_H -march=athlon64 -O2 -I. -I./../include  -W -Wall=
 -Wtraditional -pedantic ./strerror.c -o strerror.o
if [ x"" != x ]; then \
	  gcc -c -DHAVE_CONFIG_H -march=athlon64 -O2 -I. -I./../include  -W -W=
all -Wtraditional -pedantic  ./strsignal.c -o pic/strsignal.o; \
	else true; fi
gcc -c -DHAVE_CONFIG_H -march=athlon64 -O2 -I. -I./../include  -W -Wall=
 -Wtraditional -pedantic ./strsignal.c -o strsignal.o
if [ x"" != x ]; then \
	  gcc -c -DHAVE_CONFIG_H -march=athlon64 -O2 -I. -I./../include  -W -W=
all -Wtraditional -pedantic  ./ternary.c -o pic/ternary.o; \
	else true; fi
gcc -c -DHAVE_CONFIG_H -march=athlon64 -O2 -I. -I./../include  -W -Wall=
 -Wtraditional -pedantic ./ternary.c -o ternary.o
if [ x"" != x ]; then \
	  gcc -c -DHAVE_CONFIG_H -march=athlon64 -O2 -I. -I./../include  -W -W=
all -Wtraditional -pedantic  ./unlink-if-ordinary.c -o pic/unlink-if-ordi=
nary.o; \
	else true; fi
gcc -c -DHAVE_CONFIG_H -march=athlon64 -O2 -I. -I./../include  -W -Wall=
 -Wtraditional -pedantic ./unlink-if-ordinary.c -o unlink-if-ordinary.o
if [ x"" != x ]; then \
	  gcc -c -DHAVE_CONFIG_H -march=athlon64 -O2 -I. -I./../include  -W -W=
all -Wtraditional -pedantic  ./xatexit.c -o pic/xatexit.o; \
	else true; fi
gcc -c -DHAVE_CONFIG_H -march=athlon64 -O2 -I. -I./../include  -W -Wall=
 -Wtraditional -pedantic ./xatexit.c -o xatexit.o
if [ x"" != x ]; then \
	  gcc -c -DHAVE_CONFIG_H -march=athlon64 -O2 -I. -I./../include  -W -W=
all -Wtraditional -pedantic  ./xexit.c -o pic/xexit.o; \
	else true; fi
gcc -c -DHAVE_CONFIG_H -march=athlon64 -O2 -I. -I./../include  -W -Wall=
 -Wtraditional -pedantic ./xexit.c -o xexit.o
if [ x"" != x ]; then \
	  gcc -c -DHAVE_CONFIG_H -march=athlon64 -O2 -I. -I./../include  -W -W=
all -Wtraditional -pedantic  ./xmalloc.c -o pic/xmalloc.o; \
	else true; fi
gcc -c -DHAVE_CONFIG_H -march=athlon64 -O2 -I. -I./../include  -W -Wall=
 -Wtraditional -pedantic ./xmalloc.c -o xmalloc.o
if [ x"" != x ]; then \
	  gcc -c -DHAVE_CONFIG_H -march=athlon64 -O2 -I. -I./../include  -W -W=
all -Wtraditional -pedantic  ./xmemdup.c -o pic/xmemdup.o; \
	else true; fi
gcc -c -DHAVE_CONFIG_H -march=athlon64 -O2 -I. -I./../include  -W -Wall=
 -Wtraditional -pedantic ./xmemdup.c -o xmemdup.o
if [ x"" != x ]; then \
	  gcc -c -DHAVE_CONFIG_H -march=athlon64 -O2 -I. -I./../include  -W -W=
all -Wtraditional -pedantic  ./xstrdup.c -o pic/xstrdup.o; \
	else true; fi
gcc -c -DHAVE_CONFIG_H -march=athlon64 -O2 -I. -I./../include  -W -Wall=
 -Wtraditional -pedantic ./xstrdup.c -o xstrdup.o
if [ x"" != x ]; then \
	  gcc -c -DHAVE_CONFIG_H -march=athlon64 -O2 -I. -I./../include  -W -W=
all -Wtraditional -pedantic  ./xstrerror.c -o pic/xstrerror.o; \
	else true; fi
gcc -c -DHAVE_CONFIG_H -march=athlon64 -O2 -I. -I./../include  -W -Wall=
 -Wtraditional -pedantic ./xstrerror.c -o xstrerror.o
if [ x"" != x ]; then \
	  gcc -c -DHAVE_CONFIG_H -march=athlon64 -O2 -I. -I./../include  -W -W=
all -Wtraditional -pedantic  ./mkstemps.c -o pic/mkstemps.o; \
	else true; fi
gcc -c -DHAVE_CONFIG_H -march=athlon64 -O2 -I. -I./../include  -W -Wall=
 -Wtraditional -pedantic ./mkstemps.c -o mkstemps.o
rm -f ./libiberty.a pic/./libiberty.a
ar rc ./libiberty.a \
	  ./regex.o ./cplus-dem.o ./cp-demangle.o ./md5.o ./alloca.o ./argv.o ./=
choose-temp.o ./concat.o ./cp-demint.o ./dyn-string.o ./fdmatch.o ./fibhe=
ap.o ./floatformat.o ./fnmatch.o ./getopt.o ./getopt1.o ./getpwd.o ./getr=
untime.o ./hashtab.o ./hex.o ./lbasename.o ./lrealpath.o ./make-relative-=
prefix.o ./make-temp-file.o ./objalloc.o ./obstack.o ./partition.o ./phys=
mem.o ./pex-unix.o ./safe-ctype.o ./sort.o ./spaces.o ./splay-tree.o ./st=
rerror.o ./strsignal.o ./ternary.o ./unlink-if-ordinary.o ./xatexit.o ./x=
exit.o ./xmalloc.o ./xmemdup.o ./xstrdup.o ./xstrerror.o  ./mkstemps.o
ranlib ./libiberty.a
if [ x"" != x ]; then \
	  cd pic; \
	  ar rc ./libiberty.a \
	    ./regex.o ./cplus-dem.o ./cp-demangle.o ./md5.o ./alloca.o ./argv.o =
=2E/choose-temp.o ./concat.o ./cp-demint.o ./dyn-string.o ./fdmatch.o ./f=
ibheap.o ./floatformat.o ./fnmatch.o ./getopt.o ./getopt1.o ./getpwd.o ./=
getruntime.o ./hashtab.o ./hex.o ./lbasename.o ./lrealpath.o ./make-relat=
ive-prefix.o ./make-temp-file.o ./objalloc.o ./obstack.o ./partition.o ./=
physmem.o ./pex-unix.o ./safe-ctype.o ./sort.o ./spaces.o ./splay-tree.o =
=2E/strerror.o ./strsignal.o ./ternary.o ./unlink-if-ordinary.o ./xatexit=
=2Eo ./xexit.o ./xmalloc.o ./xmemdup.o ./xstrdup.o ./xstrerror.o  ./mkste=
mps.o; \
	  ranlib ./libiberty.a; \
	  cd ..; \
	else true; fi
rm -f needed-list; touch needed-list; \
	for f in atexit calloc memchr memcmp memcpy memmove memset rename strchr=
 strerror strncmp strrchr strstr strtol strtoul tmpnam vfprintf vprintf v=
fork waitpid bcmp bcopy bzero; do \
	  for g in ./mkstemps.o ; do \
	    case "$g" in \
	      *$f*) echo $g >> needed-list ;; \
	    esac; \
	  done; \
	done
echo ./regex.o ./cplus-dem.o ./cp-demangle.o ./md5.o ./alloca.o ./argv.o =
=2E/choose-temp.o ./concat.o ./cp-demint.o ./dyn-string.o ./fdmatch.o ./f=
ibheap.o ./floatformat.o ./fnmatch.o ./getopt.o ./getopt1.o ./getpwd.o ./=
getruntime.o ./hashtab.o ./hex.o ./lbasename.o ./lrealpath.o ./make-relat=
ive-prefix.o ./make-temp-file.o ./objalloc.o ./obstack.o ./partition.o ./=
physmem.o ./pex-unix.o ./safe-ctype.o ./sort.o ./spaces.o ./splay-tree.o =
=2E/strerror.o ./strsignal.o ./ternary.o ./unlink-if-ordinary.o ./xatexit=
=2Eo ./xexit.o ./xmalloc.o ./xmemdup.o ./xstrdup.o ./xstrerror.o > requir=
ed-list
make[5]: Entering directory `/home/axiom/silver/lsp/gcl-2.6.8pre/binutils=
/libiberty/testsuite'
make[5]: Nothing to be done for `all'.
make[5]: Leaving directory `/home/axiom/silver/lsp/gcl-2.6.8pre/binutils/=
libiberty/testsuite'
make[4]: Leaving directory `/home/axiom/silver/lsp/gcl-2.6.8pre/binutils/=
libiberty'
cp binutils/bfd/bfd.h h/bfd.h
cp binutils/bfd/../include/bfdlink.h h/bfdlink.h
cp binutils/bfd/../include/ansidecl.h h/ansidecl.h
cp binutils/bfd/../include/symcat.h h/symcat.h
(cd o && make ../h/new_decl.h)
make[4]: Entering directory `/home/axiom/silver/lsp/gcl-2.6.8pre/o'
gcc  -o grab_defs  grab_defs.c
gcc -c -march=athlon64 -O2 -Wall -DVOL=volatile -fsigned-char -pipe -=
O3 -fomit-frame-pointer  -I/home/axiom/silver/lsp/gcl-2.6.8pre/o -I../h -=
I../gcl-tk plttest.c 
plttest.c: In function 'main':
plttest.c:23: warning: statement with no effect
plttest.c:24: warning: statement with no effect
plttest.c:25: warning: statement with no effect
plttest.c:29: warning: statement with no effect
plttest.c:33: warning: statement with no effect
plttest.c:37: warning: statement with no effect
nm plttest.o | awk '/ U / {a=$2;if (k) sub("^_","",a);\
                            print a}' \
			k= |\
			sort | \
			grep -v '[^ \t_]_' |\
			awk '{A[++k]=$0} END {for (i=1;i<=k;i++) \
				printf("MY_PLT(%s)%s\n",A[i],i==k ? "" : ",");}' >plt.h
[ -e ../h/new_decl.h ] || touch ../h/new_decl.h
gcc -DNO_DEFUN -march=athlon64 -O2 -Wall -DVOL=volatile -fsigned-char=
 -pipe -O3 -fomit-frame-pointer  -I/home/axiom/silver/lsp/gcl-2.6.8pre/o =
-I../h -I../gcl-tk -E main.c | sed -e 's:\"[ ]*):\"):g' | ./grab_defs > m=
ain.ini
[ -e ../h/new_decl.h ] || touch ../h/new_decl.h
gcc -DNO_DEFUN -march=athlon64 -O2 -Wall -DVOL=volatile -fsigned-char=
 -pipe -O3 -fomit-frame-pointer  -I/home/axiom/silver/lsp/gcl-2.6.8pre/o =
-I../h -I../gcl-tk -E alloc.c | sed -e 's:\"[ ]*):\"):g' | ./grab_defs > =
alloc.ini
[ -e ../h/new_decl.h ] || touch ../h/new_decl.h
gcc -DNO_DEFUN -march=athlon64 -O2 -Wall -DVOL=volatile -fsigned-char=
 -pipe -O3 -fomit-frame-pointer  -I/home/axiom/silver/lsp/gcl-2.6.8pre/o =
-I../h -I../gcl-tk -E gbc.c | sed -e 's:\"[ ]*):\"):g' | ./grab_defs > gb=
c.ini
[ -e ../h/new_decl.h ] || touch ../h/new_decl.h
gcc -DNO_DEFUN -march=athlon64 -O2 -Wall -DVOL=volatile -fsigned-char=
 -pipe -O3 -fomit-frame-pointer  -I/home/axiom/silver/lsp/gcl-2.6.8pre/o =
-I../h -I../gcl-tk -E bitop.c | sed -e 's:\"[ ]*):\"):g' | ./grab_defs > =
bitop.ini
[ -e ../h/new_decl.h ] || touch ../h/new_decl.h
gcc -DNO_DEFUN -march=athlon64 -O2 -Wall -DVOL=volatile -fsigned-char=
 -pipe -O3 -fomit-frame-pointer  -I/home/axiom/silver/lsp/gcl-2.6.8pre/o =
-I../h -I../gcl-tk -E typespec.c | sed -e 's:\"[ ]*):\"):g' | ./grab_defs=
 > typespec.ini
[ -e ../h/new_decl.h ] || touch ../h/new_decl.h
gcc -DNO_DEFUN -march=athlon64 -O2 -Wall -DVOL=volatile -fsigned-char=
 -pipe -O3 -fomit-frame-pointer  -I/home/axiom/silver/lsp/gcl-2.6.8pre/o =
-I../h -I../gcl-tk -E eval.c | sed -e 's:\"[ ]*):\"):g' | ./grab_defs > e=
val.ini
[ -e ../h/new_decl.h ] || touch ../h/new_decl.h
gcc -DNO_DEFUN -march=athlon64 -O2 -Wall -DVOL=volatile -fsigned-char=
 -pipe -O3 -fomit-frame-pointer  -I/home/axiom/silver/lsp/gcl-2.6.8pre/o =
-I../h -I../gcl-tk -E macros.c | sed -e 's:\"[ ]*):\"):g' | ./grab_defs >=
 macros.ini
[ -e ../h/new_decl.h ] || touch ../h/new_decl.h
gcc -DNO_DEFUN -march=athlon64 -O2 -Wall -DVOL=volatile -fsigned-char=
 -pipe -O3 -fomit-frame-pointer  -I/home/axiom/silver/lsp/gcl-2.6.8pre/o =
-I../h -I../gcl-tk -E lex.c | sed -e 's:\"[ ]*):\"):g' | ./grab_defs > le=
x.ini
[ -e ../h/new_decl.h ] || touch ../h/new_decl.h
gcc -DNO_DEFUN -march=athlon64 -O2 -Wall -DVOL=volatile -fsigned-char=
 -pipe -O3 -fomit-frame-pointer  -I/home/axiom/silver/lsp/gcl-2.6.8pre/o =
-I../h -I../gcl-tk -E bds.c | sed -e 's:\"[ ]*):\"):g' | ./grab_defs > bd=
s.ini
[ -e ../h/new_decl.h ] || touch ../h/new_decl.h
gcc -DNO_DEFUN -march=athlon64 -O2 -Wall -DVOL=volatile -fsigned-char=
 -pipe -O3 -fomit-frame-pointer  -I/home/axiom/silver/lsp/gcl-2.6.8pre/o =
-I../h -I../gcl-tk -E frame.c | sed -e 's:\"[ ]*):\"):g' | ./grab_defs > =
frame.ini
[ -e ../h/new_decl.h ] || touch ../h/new_decl.h
gcc -DNO_DEFUN -march=athlon64 -O2 -Wall -DVOL=volatile -fsigned-char=
 -pipe -O3 -fomit-frame-pointer  -I/home/axiom/silver/lsp/gcl-2.6.8pre/o =
-I../h -I../gcl-tk -E predicate.c | sed -e 's:\"[ ]*):\"):g' | ./grab_def=
s > predicate.ini
[ -e ../h/new_decl.h ] || touch ../h/new_decl.h
gcc -DNO_DEFUN -march=athlon64 -O2 -Wall -DVOL=volatile -fsigned-char=
 -pipe -O3 -fomit-frame-pointer  -I/home/axiom/silver/lsp/gcl-2.6.8pre/o =
-I../h -I../gcl-tk -E reference.c | sed -e 's:\"[ ]*):\"):g' | ./grab_def=
s > reference.ini
[ -e ../h/new_decl.h ] || touch ../h/new_decl.h
gcc -DNO_DEFUN -march=athlon64 -O2 -Wall -DVOL=volatile -fsigned-char=
 -pipe -O3 -fomit-frame-pointer  -I/home/axiom/silver/lsp/gcl-2.6.8pre/o =
-I../h -I../gcl-tk -E assignment.c | sed -e 's:\"[ ]*):\"):g' | ./grab_de=
fs > assignment.ini
[ -e ../h/new_decl.h ] || touch ../h/new_decl.h
gcc -DNO_DEFUN -march=athlon64 -O2 -Wall -DVOL=volatile -fsigned-char=
 -pipe -O3 -fomit-frame-pointer  -I/home/axiom/silver/lsp/gcl-2.6.8pre/o =
-I../h -I../gcl-tk -E bind.c | sed -e 's:\"[ ]*):\"):g' | ./grab_defs > b=
ind.ini
[ -e ../h/new_decl.h ] || touch ../h/new_decl.h
gcc -DNO_DEFUN -march=athlon64 -O2 -Wall -DVOL=volatile -fsigned-char=
 -pipe -O3 -fomit-frame-pointer  -I/home/axiom/silver/lsp/gcl-2.6.8pre/o =
-I../h -I../gcl-tk -E let.c | sed -e 's:\"[ ]*):\"):g' | ./grab_defs > le=
t.ini
[ -e ../h/new_decl.h ] || touch ../h/new_decl.h
gcc -DNO_DEFUN -march=athlon64 -O2 -Wall -DVOL=volatile -fsigned-char=
 -pipe -O3 -fomit-frame-pointer  -I/home/axiom/silver/lsp/gcl-2.6.8pre/o =
-I../h -I../gcl-tk -E conditional.c | sed -e 's:\"[ ]*):\"):g' | ./grab_d=
efs > conditional.ini
[ -e ../h/new_decl.h ] || touch ../h/new_decl.h
gcc -DNO_DEFUN -march=athlon64 -O2 -Wall -DVOL=volatile -fsigned-char=
 -pipe -O3 -fomit-frame-pointer  -I/home/axiom/silver/lsp/gcl-2.6.8pre/o =
-I../h -I../gcl-tk -E block.c | sed -e 's:\"[ ]*):\"):g' | ./grab_defs > =
block.ini
[ -e ../h/new_decl.h ] || touch ../h/new_decl.h
gcc -DNO_DEFUN -march=athlon64 -O2 -Wall -DVOL=volatile -fsigned-char=
 -pipe -O3 -fomit-frame-pointer  -I/home/axiom/silver/lsp/gcl-2.6.8pre/o =
-I../h -I../gcl-tk -E iteration.c | sed -e 's:\"[ ]*):\"):g' | ./grab_def=
s > iteration.ini
[ -e ../h/new_decl.h ] || touch ../h/new_decl.h
gcc -DNO_DEFUN -march=athlon64 -O2 -Wall -DVOL=volatile -fsigned-char=
 -pipe -O3 -fomit-frame-pointer  -I/home/axiom/silver/lsp/gcl-2.6.8pre/o =
-I../h -I../gcl-tk -E mapfun.c | sed -e 's:\"[ ]*):\"):g' | ./grab_defs >=
 mapfun.ini
[ -e ../h/new_decl.h ] || touch ../h/new_decl.h
gcc -DNO_DEFUN -march=athlon64 -O2 -Wall -DVOL=volatile -fsigned-char=
 -pipe -O3 -fomit-frame-pointer  -I/home/axiom/silver/lsp/gcl-2.6.8pre/o =
-I../h -I../gcl-tk -E prog.c | sed -e 's:\"[ ]*):\"):g' | ./grab_defs > p=
rog.ini
[ -e ../h/new_decl.h ] || touch ../h/new_decl.h
gcc -DNO_DEFUN -march=athlon64 -O2 -Wall -DVOL=volatile -fsigned-char=
 -pipe -O3 -fomit-frame-pointer  -I/home/axiom/silver/lsp/gcl-2.6.8pre/o =
-I../h -I../gcl-tk -E multival.c | sed -e 's:\"[ ]*):\"):g' | ./grab_defs=
 > multival.ini
[ -e ../h/new_decl.h ] || touch ../h/new_decl.h
gcc -DNO_DEFUN -march=athlon64 -O2 -Wall -DVOL=volatile -fsigned-char=
 -pipe -O3 -fomit-frame-pointer  -I/home/axiom/silver/lsp/gcl-2.6.8pre/o =
-I../h -I../gcl-tk -E catch.c | sed -e 's:\"[ ]*):\"):g' | ./grab_defs > =
catch.ini
gcc -I../h -I../gcl-tk -o ../bin/dpp ../bin/dpp.c
[ -e ../h/new_decl.h ] || touch ../h/new_decl.h
=2E./bin/dpp symbol
dpp: symbol.d -> symbol.c
=2E/grab_defs < symbol.c > symbol.ini
rm symbol.c
[ -e ../h/new_decl.h ] || touch ../h/new_decl.h
gcc -DNO_DEFUN -march=athlon64 -O2 -Wall -DVOL=volatile -fsigned-char=
 -pipe -O3 -fomit-frame-pointer  -I/home/axiom/silver/lsp/gcl-2.6.8pre/o =
-I../h -I../gcl-tk -E cfun.c | sed -e 's:\"[ ]*):\"):g' | ./grab_defs > c=
fun.ini
[ -e ../h/new_decl.h ] || touch ../h/new_decl.h
gcc -DNO_DEFUN -march=athlon64 -O2 -Wall -DVOL=volatile -fsigned-char=
 -pipe -O3 -fomit-frame-pointer  -I/home/axiom/silver/lsp/gcl-2.6.8pre/o =
-I../h -I../gcl-tk -E cmpaux.c | sed -e 's:\"[ ]*):\"):g' | ./grab_defs >=
 cmpaux.ini
[ -e ../h/new_decl.h ] || touch ../h/new_decl.h
=2E./bin/dpp package
dpp: package.d -> package.c
=2E/grab_defs < package.c > package.ini
rm package.c
[ -e ../h/new_decl.h ] || touch ../h/new_decl.h
gcc -DNO_DEFUN -march=athlon64 -O2 -Wall -DVOL=volatile -fsigned-char=
 -pipe -O3 -fomit-frame-pointer  -I/home/axiom/silver/lsp/gcl-2.6.8pre/o =
-I../h -I../gcl-tk -E big.c | sed -e 's:\"[ ]*):\"):g' | ./grab_defs > bi=
g.ini
[ -e ../h/new_decl.h ] || touch ../h/new_decl.h
gcc -DNO_DEFUN -march=athlon64 -O2 -Wall -DVOL=volatile -fsigned-char=
 -pipe -O3 -fomit-frame-pointer  -I/home/axiom/silver/lsp/gcl-2.6.8pre/o =
-I../h -I../gcl-tk -E number.c | sed -e 's:\"[ ]*):\"):g' | ./grab_defs >=
 number.ini
[ -e ../h/new_decl.h ] || touch ../h/new_decl.h
gcc -DNO_DEFUN -march=athlon64 -O2 -Wall -DVOL=volatile -fsigned-char=
 -pipe -O3 -fomit-frame-pointer  -I/home/axiom/silver/lsp/gcl-2.6.8pre/o =
-I../h -I../gcl-tk -E num_pred.c | sed -e 's:\"[ ]*):\"):g' | ./grab_defs=
 > num_pred.ini
[ -e ../h/new_decl.h ] || touch ../h/new_decl.h
gcc -DNO_DEFUN -march=athlon64 -O2 -Wall -DVOL=volatile -fsigned-char=
 -pipe -O3 -fomit-frame-pointer  -I/home/axiom/silver/lsp/gcl-2.6.8pre/o =
-I../h -I../gcl-tk -E num_comp.c | sed -e 's:\"[ ]*):\"):g' | ./grab_defs=
 > num_comp.ini
[ -e ../h/new_decl.h ] || touch ../h/new_decl.h
gcc -DNO_DEFUN -march=athlon64 -O2 -Wall -DVOL=volatile -fsigned-char=
 -pipe -O3 -fomit-frame-pointer  -I/home/axiom/silver/lsp/gcl-2.6.8pre/o =
-I../h -I../gcl-tk -E num_arith.c | sed -e 's:\"[ ]*):\"):g' | ./grab_def=
s > num_arith.ini
[ -e ../h/new_decl.h ] || touch ../h/new_decl.h
gcc -DNO_DEFUN -march=athlon64 -O2 -Wall -DVOL=volatile -fsigned-char=
 -pipe -O3 -fomit-frame-pointer  -I/home/axiom/silver/lsp/gcl-2.6.8pre/o =
-I../h -I../gcl-tk -E num_sfun.c | sed -e 's:\"[ ]*):\"):g' | ./grab_defs=
 > num_sfun.ini
[ -e ../h/new_decl.h ] || touch ../h/new_decl.h
gcc -DNO_DEFUN -march=athlon64 -O2 -Wall -DVOL=volatile -fsigned-char=
 -pipe -O3 -fomit-frame-pointer  -I/home/axiom/silver/lsp/gcl-2.6.8pre/o =
-I../h -I../gcl-tk -E num_co.c | sed -e 's:\"[ ]*):\"):g' | ./grab_defs >=
 num_co.ini
[ -e ../h/new_decl.h ] || touch ../h/new_decl.h
gcc -DNO_DEFUN -march=athlon64 -O2 -Wall -DVOL=volatile -fsigned-char=
 -pipe -O3 -fomit-frame-pointer  -I/home/axiom/silver/lsp/gcl-2.6.8pre/o =
-I../h -I../gcl-tk -E num_log.c | sed -e 's:\"[ ]*):\"):g' | ./grab_defs =
> num_log.ini
[ -e ../h/new_decl.h ] || touch ../h/new_decl.h
gcc -DNO_DEFUN -march=athlon64 -O2 -Wall -DVOL=volatile -fsigned-char=
 -pipe -O3 -fomit-frame-pointer  -I/home/axiom/silver/lsp/gcl-2.6.8pre/o =
-I../h -I../gcl-tk -E num_rand.c | sed -e 's:\"[ ]*):\"):g' | ./grab_defs=
 > num_rand.ini
[ -e ../h/new_decl.h ] || touch ../h/new_decl.h
gcc -DNO_DEFUN -march=athlon64 -O2 -Wall -DVOL=volatile -fsigned-char=
 -pipe -O3 -fomit-frame-pointer  -I/home/axiom/silver/lsp/gcl-2.6.8pre/o =
-I../h -I../gcl-tk -E earith.c | sed -e 's:\"[ ]*):\"):g' | ./grab_defs >=
 earith.ini
[ -e ../h/new_decl.h ] || touch ../h/new_decl.h
=2E./bin/dpp character
dpp: character.d -> character.c
=2E/grab_defs < character.c > character.ini
rm character.c
[ -e ../h/new_decl.h ] || touch ../h/new_decl.h
=2E./bin/dpp sequence
dpp: sequence.d -> sequence.c
=2E/grab_defs < sequence.c > sequence.ini
rm sequence.c
[ -e ../h/new_decl.h ] || touch ../h/new_decl.h
=2E./bin/dpp list
dpp: list.d -> list.c
=2E/grab_defs < list.c > list.ini
rm list.c
[ -e ../h/new_decl.h ] || touch ../h/new_decl.h
=2E./bin/dpp hash
dpp: hash.d -> hash.c
=2E/grab_defs < hash.c > hash.ini
rm hash.c
[ -e ../h/new_decl.h ] || touch ../h/new_decl.h
gcc -DNO_DEFUN -march=athlon64 -O2 -Wall -DVOL=volatile -fsigned-char=
 -pipe -O3 -fomit-frame-pointer  -I/home/axiom/silver/lsp/gcl-2.6.8pre/o =
-I../h -I../gcl-tk -E array.c | sed -e 's:\"[ ]*):\"):g' | ./grab_defs > =
array.ini
[ -e ../h/new_decl.h ] || touch ../h/new_decl.h
=2E./bin/dpp string
dpp: string.d -> string.c
=2E/grab_defs < string.c > string.ini
rm string.c
[ -e ../h/new_decl.h ] || touch ../h/new_decl.h
gcc -DNO_DEFUN -march=athlon64 -O2 -Wall -DVOL=volatile -fsigned-char=
 -pipe -O3 -fomit-frame-pointer  -I/home/axiom/silver/lsp/gcl-2.6.8pre/o =
-I../h -I../gcl-tk -E regexpr.c | sed -e 's:\"[ ]*):\"):g' | ./grab_defs =
> regexpr.ini
[ -e ../h/new_decl.h ] || touch ../h/new_decl.h
gcc -DNO_DEFUN -march=athlon64 -O2 -Wall -DVOL=volatile -fsigned-char=
 -pipe -O3 -fomit-frame-pointer  -I/home/axiom/silver/lsp/gcl-2.6.8pre/o =
-I../h -I../gcl-tk -E structure.c | sed -e 's:\"[ ]*):\"):g' | ./grab_def=
s > structure.ini
[ -e ../h/new_decl.h ] || touch ../h/new_decl.h
gcc -DNO_DEFUN -march=athlon64 -O2 -Wall -DVOL=volatile -fsigned-char=
 -pipe -O3 -fomit-frame-pointer  -I/home/axiom/silver/lsp/gcl-2.6.8pre/o =
-I../h -I../gcl-tk -E toplevel.c | sed -e 's:\"[ ]*):\"):g' | ./grab_defs=
 > toplevel.ini
[ -e ../h/new_decl.h ] || touch ../h/new_decl.h
=2E./bin/dpp file
dpp: file.d -> file.c
=2E/grab_defs < file.c > file.ini
rm file.c
[ -e ../h/new_decl.h ] || touch ../h/new_decl.h
=2E./bin/dpp read
dpp: read.d -> read.c
=2E/grab_defs < read.c > read.ini
rm read.c
[ -e ../h/new_decl.h ] || touch ../h/new_decl.h
gcc -DNO_DEFUN -march=athlon64 -O2 -Wall -DVOL=volatile -fsigned-char=
 -pipe -O3 -fomit-frame-pointer  -I/home/axiom/silver/lsp/gcl-2.6.8pre/o =
-I../h -I../gcl-tk -E backq.c | sed -e 's:\"[ ]*):\"):g' | ./grab_defs > =
backq.ini
[ -e ../h/new_decl.h ] || touch ../h/new_decl.h
=2E./bin/dpp print
dpp: print.d -> print.c
=2E/grab_defs < print.c > print.ini
rm print.c
[ -e ../h/new_decl.h ] || touch ../h/new_decl.h
gcc -DNO_DEFUN -march=athlon64 -O2 -Wall -DVOL=volatile -fsigned-char=
 -pipe -O3 -fomit-frame-pointer  -I/home/axiom/silver/lsp/gcl-2.6.8pre/o =
-I../h -I../gcl-tk -E format.c | sed -e 's:\"[ ]*):\"):g' | ./grab_defs >=
 format.ini
[ -e ../h/new_decl.h ] || touch ../h/new_decl.h
=2E./bin/dpp pathname
dpp: pathname.d -> pathname.c
=2E/grab_defs < pathname.c > pathname.ini
rm pathname.c
[ -e ../h/new_decl.h ] || touch ../h/new_decl.h
gcc -DNO_DEFUN -march=athlon64 -O2 -Wall -DVOL=volatile -fsigned-char=
 -pipe -O3 -fomit-frame-pointer  -I/home/axiom/silver/lsp/gcl-2.6.8pre/o =
-I../h -I../gcl-tk -E unixfsys.c | sed -e 's:\"[ ]*):\"):g' | ./grab_defs=
 > unixfsys.ini
[ -e ../h/new_decl.h ] || touch ../h/new_decl.h
gcc -DNO_DEFUN -march=athlon64 -O2 -Wall -DVOL=volatile -fsigned-char=
 -pipe -O3 -fomit-frame-pointer  -I/home/axiom/silver/lsp/gcl-2.6.8pre/o =
-I../h -I../gcl-tk -E unixfasl.c | sed -e 's:\"[ ]*):\"):g' | ./grab_defs=
 > unixfasl.ini
[ -e ../h/new_decl.h ] || touch ../h/new_decl.h
gcc -DNO_DEFUN -march=athlon64 -O2 -Wall -DVOL=volatile -fsigned-char=
 -pipe -O3 -fomit-frame-pointer  -I/home/axiom/silver/lsp/gcl-2.6.8pre/o =
-I../h -I../gcl-tk -E error.c | sed -e 's:\"[ ]*):\"):g' | ./grab_defs > =
error.ini
[ -e ../h/new_decl.h ] || touch ../h/new_decl.h
gcc -DNO_DEFUN -march=athlon64 -O2 -Wall -DVOL=volatile -fsigned-char=
 -pipe -O3 -fomit-frame-pointer  -I/home/axiom/silver/lsp/gcl-2.6.8pre/o =
-I../h -I../gcl-tk -E unixtime.c | sed -e 's:\"[ ]*):\"):g' | ./grab_defs=
 > unixtime.ini
[ -e ../h/new_decl.h ] || touch ../h/new_decl.h
gcc -DNO_DEFUN -march=athlon64 -O2 -Wall -DVOL=volatile -fsigned-char=
 -pipe -O3 -fomit-frame-pointer  -I/home/axiom/silver/lsp/gcl-2.6.8pre/o =
-I../h -I../gcl-tk -E unixsys.c | sed -e 's:\"[ ]*):\"):g' | ./grab_defs =
> unixsys.ini
[ -e ../h/new_decl.h ] || touch ../h/new_decl.h
gcc -DNO_DEFUN -march=athlon64 -O2 -Wall -DVOL=volatile -fsigned-char=
 -pipe -O3 -fomit-frame-pointer  -I/home/axiom/silver/lsp/gcl-2.6.8pre/o =
-I../h -I../gcl-tk -E unixsave.c | sed -e 's:\"[ ]*):\"):g' | ./grab_defs=
 > unixsave.ini
[ -e ../h/new_decl.h ] || touch ../h/new_decl.h
gcc -DNO_DEFUN -march=athlon64 -O2 -Wall -DVOL=volatile -fsigned-char=
 -pipe -O3 -fomit-frame-pointer  -I/home/axiom/silver/lsp/gcl-2.6.8pre/o =
-I../h -I../gcl-tk -E funlink.c | sed -e 's:\"[ ]*):\"):g' | ./grab_defs =
> funlink.ini
[ -e ../h/new_decl.h ] || touch ../h/new_decl.h
gcc -DNO_DEFUN -march=athlon64 -O2 -Wall -DVOL=volatile -fsigned-char=
 -pipe -O3 -fomit-frame-pointer  -I/home/axiom/silver/lsp/gcl-2.6.8pre/o =
-I../h -I../gcl-tk -E plt.c | sed -e 's:\"[ ]*):\"):g' | ./grab_defs > pl=
t.ini
[ -e ../h/new_decl.h ] || touch ../h/new_decl.h
gcc -DNO_DEFUN -march=athlon64 -O2 -Wall -DVOL=volatile -fsigned-char=
 -pipe -O3 -fomit-frame-pointer  -I/home/axiom/silver/lsp/gcl-2.6.8pre/o =
-I../h -I../gcl-tk -E fat_string.c | sed -e 's:\"[ ]*):\"):g' | ./grab_de=
fs > fat_string.ini
[ -e ../h/new_decl.h ] || touch ../h/new_decl.h
gcc -DNO_DEFUN -march=athlon64 -O2 -Wall -DVOL=volatile -fsigned-char=
 -pipe -O3 -fomit-frame-pointer  -I/home/axiom/silver/lsp/gcl-2.6.8pre/o =
-I../h -I../gcl-tk -E run_process.c | sed -e 's:\"[ ]*):\"):g' | ./grab_d=
efs > run_process.ini
[ -e ../h/new_decl.h ] || touch ../h/new_decl.h
gcc -DNO_DEFUN -march=athlon64 -O2 -Wall -DVOL=volatile -fsigned-char=
 -pipe -O3 -fomit-frame-pointer  -I/home/axiom/silver/lsp/gcl-2.6.8pre/o =
-I../h -I../gcl-tk -E nfunlink.c | sed -e 's:\"[ ]*):\"):g' | ./grab_defs=
 > nfunlink.ini
[ -e ../h/new_decl.h ] || touch ../h/new_decl.h
gcc -DNO_DEFUN -march=athlon64 -O2 -Wall -DVOL=volatile -fsigned-char=
 -pipe -O3 -fomit-frame-pointer  -I/home/axiom/silver/lsp/gcl-2.6.8pre/o =
-I../h -I../gcl-tk -E usig.c | sed -e 's:\"[ ]*):\"):g' | ./grab_defs > u=
sig.ini
[ -e ../h/new_decl.h ] || touch ../h/new_decl.h
gcc -DNO_DEFUN -march=athlon64 -O2 -Wall -DVOL=volatile -fsigned-char=
 -pipe -O3 -fomit-frame-pointer  -I/home/axiom/silver/lsp/gcl-2.6.8pre/o =
-I../h -I../gcl-tk -E usig2.c | sed -e 's:\"[ ]*):\"):g' | ./grab_defs > =
usig2.ini
[ -e ../h/new_decl.h ] || touch ../h/new_decl.h
gcc -DNO_DEFUN -march=athlon64 -O2 -Wall -DVOL=volatile -fsigned-char=
 -pipe -O3 -fomit-frame-pointer  -I/home/axiom/silver/lsp/gcl-2.6.8pre/o =
-I../h -I../gcl-tk -E utils.c | sed -e 's:\"[ ]*):\"):g' | ./grab_defs > =
utils.ini
[ -e ../h/new_decl.h ] || touch ../h/new_decl.h
gcc -DNO_DEFUN -march=athlon64 -O2 -Wall -DVOL=volatile -fsigned-char=
 -pipe -O3 -fomit-frame-pointer  -I/home/axiom/silver/lsp/gcl-2.6.8pre/o =
-I../h -I../gcl-tk -E makefun.c | sed -e 's:\"[ ]*):\"):g' | ./grab_defs =
> makefun.ini
[ -e ../h/new_decl.h ] || touch ../h/new_decl.h
gcc -DNO_DEFUN -march=athlon64 -O2 -Wall -DVOL=volatile -fsigned-char=
 -pipe -O3 -fomit-frame-pointer  -I/home/axiom/silver/lsp/gcl-2.6.8pre/o =
-I../h -I../gcl-tk -E sockets.c | sed -e 's:\"[ ]*):\"):g' | ./grab_defs =
> sockets.ini
[ -e ../h/new_decl.h ] || touch ../h/new_decl.h
gcc -DNO_DEFUN -march=athlon64 -O2 -Wall -DVOL=volatile -fsigned-char=
 -pipe -O3 -fomit-frame-pointer  -I/home/axiom/silver/lsp/gcl-2.6.8pre/o =
-I../h -I../gcl-tk -E gmp_wrappers.c | sed -e 's:\"[ ]*):\"):g' | ./grab_=
defs > gmp_wrappers.ini
[ -e ../h/new_decl.h ] || touch ../h/new_decl.h
gcc -DNO_DEFUN -march=athlon64 -O2 -Wall -DVOL=volatile -fsigned-char=
 -pipe -O3 -fomit-frame-pointer  -I/home/axiom/silver/lsp/gcl-2.6.8pre/o =
-I../h -I../gcl-tk -E clxsocket.c | sed -e 's:\"[ ]*):\"):g' | ./grab_def=
s > clxsocket.ini
[ -e ../h/new_decl.h ] || touch ../h/new_decl.h
gcc -DNO_DEFUN -march=athlon64 -O2 -Wall -DVOL=volatile -fsigned-char=
 -pipe -O3 -fomit-frame-pointer  -I/home/axiom/silver/lsp/gcl-2.6.8pre/o =
-I../h -I../gcl-tk -E init_pari.c | sed -e 's:\"[ ]*):\"):g' | ./grab_def=
s > init_pari.ini
[ -e ../h/new_decl.h ] || touch ../h/new_decl.h
gcc -DNO_DEFUN -march=athlon64 -O2 -Wall -DVOL=volatile -fsigned-char=
 -pipe -O3 -fomit-frame-pointer  -I/home/axiom/silver/lsp/gcl-2.6.8pre/o =
-I../h -I../gcl-tk -E nsocket.c | sed -e 's:\"[ ]*):\"):g' | ./grab_defs =
> nsocket.ini
[ -e ../h/new_decl.h ] || touch ../h/new_decl.h
gcc -DNO_DEFUN -march=athlon64 -O2 -Wall -DVOL=volatile -fsigned-char=
 -pipe -O3 -fomit-frame-pointer  -I/home/axiom/silver/lsp/gcl-2.6.8pre/o =
-I../h -I../gcl-tk -E sfasl.c | sed -e 's:\"[ ]*):\"):g' | ./grab_defs > =
sfasl.ini
[ -e ../h/new_decl.h ] || touch ../h/new_decl.h
=2E./bin/dpp gcl_readline
dpp: gcl_readline.d -> gcl_readline.c
=2E/grab_defs < gcl_readline.c > gcl_readline.ini
rm gcl_readline.c
echo '#include "make-decl.h"' > foo.c
cat main.ini alloc.ini gbc.ini bitop.ini typespec.ini eval.ini macros.ini=
 lex.ini bds.ini frame.ini predicate.ini reference.ini assignment.ini bin=
d.ini let.ini conditional.ini block.ini iteration.ini mapfun.ini prog.ini=
 multival.ini catch.ini symbol.ini cfun.ini cmpaux.ini package.ini big.in=
i number.ini num_pred.ini num_comp.ini num_arith.ini num_sfun.ini num_co.=
ini num_log.ini num_rand.ini earith.ini character.ini sequence.ini list.i=
ni hash.ini array.ini string.ini regexpr.ini structure.ini toplevel.ini f=
ile.ini read.ini backq.ini print.ini format.ini pathname.ini unixfsys.ini=
 unixfasl.ini error.ini unixtime.ini unixsys.ini unixsave.ini funlink.ini=
 plt.ini fat_string.ini ./run_process.ini nfunlink.ini usig.ini usig2.ini=
 utils.ini makefun.ini sockets.ini gmp_wrappers.ini clxsocket.ini init_pa=
ri.ini nsocket.ini ./sfasl.ini /home/axiom/silver/obj/linux/lib/cfuns-c.i=
ni /home/axiom/silver/obj/linux/lib/sockio-c.ini gcl_readline.ini >> foo.=
c
gcc -E -I../h foo.c | sed -n -e '/#/d' -e '/DO_/d' -e '/[a-zA-Z;]/p' > ..=
/h/new_decl.h
rm foo.c
make[4]: Leaving directory `/home/axiom/silver/lsp/gcl-2.6.8pre/o'
cat h/config.h | sed -e "1,/Begin for cmpincl/d" \
		-e "/End for cmpinclude/,50000d" > tmpx
echo -e '#include "h/config.h"\n#ifdef SGC\n"#define SGC"\n#else\n"#undef=
 SGC"\n#endif' | cpp 2>/dev/null| grep -v '^ *$' | tail -1l | tr -d '"' >=
>tmpx
cat h/cmpincl1.h h/gclincl.h h/compbas.h h/enum.h h/mgmp.h h/object.h h/v=
s.h h/bds.h h/frame.h h/lex.h h/eval.h    h/funlink.h h/att_ext.h h/new_d=
ecl.h h/compbas2.h h/compat.h h/cmponly.h o/regexp.h h//protoize.h >> tmp=
x
=2E/xbin/move-if-changed mv tmpx h/cmpinclude.h
tmpx and h/cmpinclude.h were not the same.
ln tmpx h/cmpinclude.h
=2E/xbin/move-if-changed cp h/cmpinclude.h o/cmpinclude.h
h/cmpinclude.h and o/cmpinclude.h were not the same.
ln h/cmpinclude.h o/cmpinclude.h
(cd bin; make all)
make[4]: Entering directory `/home/axiom/silver/lsp/gcl-2.6.8pre/bin'
gcc  -I../h  -o append  append.c
gcc -I../h  -o file-sub file-sub.c
make[4]: Leaving directory `/home/axiom/silver/lsp/gcl-2.6.8pre/bin'
make mpfiles
make[4]: Entering directory `/home/axiom/silver/lsp/gcl-2.6.8pre'
make[4]: Nothing to be done for `mpfiles'.
make[4]: Leaving directory `/home/axiom/silver/lsp/gcl-2.6.8pre'
rm -f o/cmpinclude.h ; cp h/cmpinclude.h o
(cd o; make all)
make[4]: Entering directory `/home/axiom/silver/lsp/gcl-2.6.8pre/o'
gcc -c -march=athlon64 -O2 -Wall -DVOL=volatile -fsigned-char -pipe -=
O3 -fomit-frame-pointer  -I/home/axiom/silver/lsp/gcl-2.6.8pre/o -I../h -=
I../gcl-tk main.c 
main.c: In function 'initlisp':
main.c:457: warning: the address of 'j' will never be NULL
gcc -c -march=athlon64 -O2 -Wall -DVOL=volatile -fsigned-char -pipe -=
O3 -fomit-frame-pointer  -I/home/axiom/silver/lsp/gcl-2.6.8pre/o -I../h -=
I../gcl-tk alloc.c 
alloc.c: In function 'set_maxpage':
alloc.c:857: warning: cast from pointer to integer of different size
gcc -c -march=athlon64 -O2 -Wall -DVOL=volatile -fsigned-char -pipe -=
O3 -fomit-frame-pointer  -I/home/axiom/silver/lsp/gcl-2.6.8pre/o -I../h -=
I../gcl-tk gbc.c 
gcc -c -march=athlon64 -O2 -Wall -DVOL=volatile -fsigned-char -pipe -=
O3 -fomit-frame-pointer  -I/home/axiom/silver/lsp/gcl-2.6.8pre/o -I../h -=
I../gcl-tk bitop.c 
gcc -c -march=athlon64 -O2 -Wall -DVOL=volatile -fsigned-char -pipe -=
O3 -fomit-frame-pointer  -I/home/axiom/silver/lsp/gcl-2.6.8pre/o -I../h -=
I../gcl-tk typespec.c 
gcc -c -march=athlon64 -O2 -Wall -DVOL=volatile -fsigned-char -pipe -=
O3 -fomit-frame-pointer  -I/home/axiom/silver/lsp/gcl-2.6.8pre/o -I../h -=
I../gcl-tk eval.c 
gcc -c -march=athlon64 -O2 -Wall -DVOL=volatile -fsigned-char -pipe -=
O3 -fomit-frame-pointer  -I/home/axiom/silver/lsp/gcl-2.6.8pre/o -I../h -=
I../gcl-tk macros.c 
gcc -c -march=athlon64 -O2 -Wall -DVOL=volatile -fsigned-char -pipe -=
O3 -fomit-frame-pointer  -I/home/axiom/silver/lsp/gcl-2.6.8pre/o -I../h -=
I../gcl-tk lex.c 
gcc -c -march=athlon64 -O2 -Wall -DVOL=volatile -fsigned-char -pipe -=
O3 -fomit-frame-pointer  -I/home/axiom/silver/lsp/gcl-2.6.8pre/o -I../h -=
I../gcl-tk bds.c 
gcc -c -march=athlon64 -O2 -Wall -DVOL=volatile -fsigned-char -pipe -=
O3 -fomit-frame-pointer  -I/home/axiom/silver/lsp/gcl-2.6.8pre/o -I../h -=
I../gcl-tk frame.c 
gcc -c -march=athlon64 -O2 -Wall -DVOL=volatile -fsigned-char -pipe -=
O3 -fomit-frame-pointer  -I/home/axiom/silver/lsp/gcl-2.6.8pre/o -I../h -=
I../gcl-tk predicate.c 
gcc -c -march=athlon64 -O2 -Wall -DVOL=volatile -fsigned-char -pipe -=
O3 -fomit-frame-pointer  -I/home/axiom/silver/lsp/gcl-2.6.8pre/o -I../h -=
I../gcl-tk reference.c 
gcc -c -march=athlon64 -O2 -Wall -DVOL=volatile -fsigned-char -pipe -=
O3 -fomit-frame-pointer  -I/home/axiom/silver/lsp/gcl-2.6.8pre/o -I../h -=
I../gcl-tk assignment.c 
gcc -c -march=athlon64 -O2 -Wall -DVOL=volatile -fsigned-char -pipe -=
O3 -fomit-frame-pointer  -I/home/axiom/silver/lsp/gcl-2.6.8pre/o -I../h -=
I../gcl-tk bind.c 
bind.c: In function 'set_key_struct':
bind.c:1075: warning: dereferencing type-punned pointer will break strict=
-aliasing rules
gcc -c -march=athlon64 -O2 -Wall -DVOL=volatile -fsigned-char -pipe -=
O3 -fomit-frame-pointer  -I/home/axiom/silver/lsp/gcl-2.6.8pre/o -I../h -=
I../gcl-tk let.c 
gcc -c -march=athlon64 -O2 -Wall -DVOL=volatile -fsigned-char -pipe -=
O3 -fomit-frame-pointer  -I/home/axiom/silver/lsp/gcl-2.6.8pre/o -I../h -=
I../gcl-tk conditional.c 
gcc -c -march=athlon64 -O2 -Wall -DVOL=volatile -fsigned-char -pipe -=
O3 -fomit-frame-pointer  -I/home/axiom/silver/lsp/gcl-2.6.8pre/o -I../h -=
I../gcl-tk block.c 
gcc -c -march=athlon64 -O2 -Wall -DVOL=volatile -fsigned-char -pipe -=
O3 -fomit-frame-pointer  -I/home/axiom/silver/lsp/gcl-2.6.8pre/o -I../h -=
I../gcl-tk iteration.c 
gcc -c -march=athlon64 -O2 -Wall -DVOL=volatile -fsigned-char -pipe -=
O3 -fomit-frame-pointer  -I/home/axiom/silver/lsp/gcl-2.6.8pre/o -I../h -=
I../gcl-tk mapfun.c 
gcc -c -march=athlon64 -O2 -Wall -DVOL=volatile -fsigned-char -pipe -=
O3 -fomit-frame-pointer  -I/home/axiom/silver/lsp/gcl-2.6.8pre/o -I../h -=
I../gcl-tk prog.c 
gcc -c -march=athlon64 -O2 -Wall -DVOL=volatile -fsigned-char -pipe -=
O3 -fomit-frame-pointer  -I/home/axiom/silver/lsp/gcl-2.6.8pre/o -I../h -=
I../gcl-tk multival.c 
gcc -c -march=athlon64 -O2 -Wall -DVOL=volatile -fsigned-char -pipe -=
O3 -fomit-frame-pointer  -I/home/axiom/silver/lsp/gcl-2.6.8pre/o -I../h -=
I../gcl-tk catch.c 
=2E./bin/dpp symbol
dpp: symbol.d -> symbol.c
gcc -c -march=athlon64 -O2 -Wall -DVOL=volatile -fsigned-char -pipe -=
O3 -fomit-frame-pointer  -I/home/axiom/silver/lsp/gcl-2.6.8pre/o -I../h -=
I../gcl-tk symbol.c
rm symbol.c
gcc -c -march=athlon64 -O2 -Wall -DVOL=volatile -fsigned-char -pipe -=
O3 -fomit-frame-pointer  -I/home/axiom/silver/lsp/gcl-2.6.8pre/o -I../h -=
I../gcl-tk cfun.c 
gcc -c -march=athlon64 -O2 -Wall -DVOL=volatile -fsigned-char -pipe -=
O3 -fomit-frame-pointer  -I/home/axiom/silver/lsp/gcl-2.6.8pre/o -I../h -=
I../gcl-tk cmpaux.c 
=2E./bin/dpp package
dpp: package.d -> package.c
gcc -c -march=athlon64 -O2 -Wall -DVOL=volatile -fsigned-char -pipe -=
O3 -fomit-frame-pointer  -I/home/axiom/silver/lsp/gcl-2.6.8pre/o -I../h -=
I../gcl-tk package.c
rm package.c
gcc -c -march=athlon64 -O2 -Wall -DVOL=volatile -fsigned-char -pipe -=
O3 -fomit-frame-pointer  -I/home/axiom/silver/lsp/gcl-2.6.8pre/o -I../h -=
I../gcl-tk big.c 
gcc -c -march=athlon64 -O2 -Wall -DVOL=volatile -fsigned-char -pipe -=
O3 -fomit-frame-pointer  -I/home/axiom/silver/lsp/gcl-2.6.8pre/o -I../h -=
I../gcl-tk number.c 
gcc -c -march=athlon64 -O2 -Wall -DVOL=volatile -fsigned-char -pipe -=
O3 -fomit-frame-pointer  -I/home/axiom/silver/lsp/gcl-2.6.8pre/o -I../h -=
I../gcl-tk num_pred.c 
gcc -c -march=athlon64 -O2 -Wall -DVOL=volatile -fsigned-char -pipe -=
O3 -fomit-frame-pointer  -I/home/axiom/silver/lsp/gcl-2.6.8pre/o -I../h -=
I../gcl-tk num_comp.c 
gcc -c -march=athlon64 -O2 -Wall -DVOL=volatile -fsigned-char -pipe -=
O3 -fomit-frame-pointer  -I/home/axiom/silver/lsp/gcl-2.6.8pre/o -I../h -=
I../gcl-tk num_arith.c 
gcc -c -march=athlon64 -O2 -Wall -DVOL=volatile -fsigned-char -pipe -=
O3 -fomit-frame-pointer  -I/home/axiom/silver/lsp/gcl-2.6.8pre/o -I../h -=
I../gcl-tk num_sfun.c 
gcc -c -march=athlon64 -O2 -Wall -DVOL=volatile -fsigned-char -pipe -=
O3 -fomit-frame-pointer  -I/home/axiom/silver/lsp/gcl-2.6.8pre/o -I../h -=
I../gcl-tk num_co.c 
gcc -c -march=athlon64 -O2 -Wall -DVOL=volatile -fsigned-char -pipe -=
O3 -fomit-frame-pointer  -I/home/axiom/silver/lsp/gcl-2.6.8pre/o -I../h -=
I../gcl-tk num_log.c 
gcc -c -march=athlon64 -O2 -Wall -DVOL=volatile -fsigned-char -pipe -=
O3 -fomit-frame-pointer  -I/home/axiom/silver/lsp/gcl-2.6.8pre/o -I../h -=
I../gcl-tk num_rand.c 
gcc -c -march=athlon64 -O2 -Wall -DVOL=volatile -fsigned-char -pipe -=
O3 -fomit-frame-pointer  -I/home/axiom/silver/lsp/gcl-2.6.8pre/o -I../h -=
I../gcl-tk earith.c 
=2E./bin/dpp character
dpp: character.d -> character.c
gcc -c -march=athlon64 -O2 -Wall -DVOL=volatile -fsigned-char -pipe -=
O3 -fomit-frame-pointer  -I/home/axiom/silver/lsp/gcl-2.6.8pre/o -I../h -=
I../gcl-tk character.c
rm character.c
=2E./bin/dpp sequence
dpp: sequence.d -> sequence.c
gcc -c -march=athlon64 -O2 -Wall -DVOL=volatile -fsigned-char -pipe -=
O3 -fomit-frame-pointer  -I/home/axiom/silver/lsp/gcl-2.6.8pre/o -I../h -=
I../gcl-tk sequence.c
rm sequence.c
=2E./bin/dpp list
dpp: list.d -> list.c
gcc -c -march=athlon64 -O2 -Wall -DVOL=volatile -fsigned-char -pipe -=
O3 -fomit-frame-pointer  -I/home/axiom/silver/lsp/gcl-2.6.8pre/o -I../h -=
I../gcl-tk list.c
rm list.c
=2E./bin/dpp hash
dpp: hash.d -> hash.c
gcc -c -march=athlon64 -O2 -Wall -DVOL=volatile -fsigned-char -pipe -=
O3 -fomit-frame-pointer  -I/home/axiom/silver/lsp/gcl-2.6.8pre/o -I../h -=
I../gcl-tk hash.c
hash.d: In function 'hash_eql':
hash.d:72: warning: dereferencing type-punned pointer will break strict-a=
liasing rules
hash.d:75: warning: dereferencing type-punned pointer will break strict-a=
liasing rules
rm hash.c
gcc -c -march=athlon64 -O2 -Wall -DVOL=volatile -fsigned-char -pipe -=
O3 -fomit-frame-pointer  -I/home/axiom/silver/lsp/gcl-2.6.8pre/o -I../h -=
I../gcl-tk array.c 
=2E./bin/dpp string
dpp: string.d -> string.c
gcc -c -march=athlon64 -O2 -Wall -DVOL=volatile -fsigned-char -pipe -=
O3 -fomit-frame-pointer  -I/home/axiom/silver/lsp/gcl-2.6.8pre/o -I../h -=
I../gcl-tk string.c
rm string.c
gcc -c -march=athlon64 -O2 -Wall -DVOL=volatile -fsigned-char -pipe -=
O3 -fomit-frame-pointer  -I/home/axiom/silver/lsp/gcl-2.6.8pre/o -I../h -=
I../gcl-tk regexpr.c 
gcc -c -march=athlon64 -O2 -Wall -DVOL=volatile -fsigned-char -pipe -=
O3 -fomit-frame-pointer  -I/home/axiom/silver/lsp/gcl-2.6.8pre/o -I../h -=
I../gcl-tk structure.c 
gcc -c -march=athlon64 -O2 -Wall -DVOL=volatile -fsigned-char -pipe -=
O3 -fomit-frame-pointer  -I/home/axiom/silver/lsp/gcl-2.6.8pre/o -I../h -=
I../gcl-tk toplevel.c 
=2E./bin/dpp file
dpp: file.d -> file.c
gcc -c -march=athlon64 -O2 -Wall -DVOL=volatile -fsigned-char -pipe -=
O3 -fomit-frame-pointer  -I/home/axiom/silver/lsp/gcl-2.6.8pre/o -I../h -=
I../gcl-tk file.c
file.d: In function 'rmc':
file.d:2329: warning: cast from pointer to integer of different size
file.d: In function 'Lsocket':
file.d:2465: warning: cast to pointer from integer of different size
rm file.c
=2E./bin/dpp read
dpp: read.d -> read.c
gcc -c -march=athlon64 -O2 -Wall -DVOL=volatile -fsigned-char -pipe -=
O3 -fomit-frame-pointer  -I/home/axiom/silver/lsp/gcl-2.6.8pre/o -I../h -=
I../gcl-tk read.c
rm read.c
gcc -c -march=athlon64 -O2 -Wall -DVOL=volatile -fsigned-char -pipe -=
O3 -fomit-frame-pointer  -I/home/axiom/silver/lsp/gcl-2.6.8pre/o -I../h -=
I../gcl-tk backq.c 
=2E./bin/dpp print
dpp: print.d -> print.c
gcc -c -march=athlon64 -O2 -Wall -DVOL=volatile -fsigned-char -pipe -=
O3 -fomit-frame-pointer  -I/home/axiom/silver/lsp/gcl-2.6.8pre/o -I../h -=
I../gcl-tk print.c
rm print.c
gcc -c -march=athlon64 -O2 -Wall -DVOL=volatile -fsigned-char -pipe -=
O3 -fomit-frame-pointer  -I/home/axiom/silver/lsp/gcl-2.6.8pre/o -I../h -=
I../gcl-tk format.c 
=2E./bin/dpp pathname
dpp: pathname.d -> pathname.c
gcc -c -march=athlon64 -O2 -Wall -DVOL=volatile -fsigned-char -pipe -=
O3 -fomit-frame-pointer  -I/home/axiom/silver/lsp/gcl-2.6.8pre/o -I../h -=
I../gcl-tk pathname.c
rm pathname.c
gcc -c -march=athlon64 -O2 -Wall -DVOL=volatile -fsigned-char -pipe -=
O3 -fomit-frame-pointer  -I/home/axiom/silver/lsp/gcl-2.6.8pre/o -I../h -=
I../gcl-tk unixfsys.c 
unixfsys.c: In function 'truename':
unixfsys.c:277: warning: 'getwd' is deprecated (declared at unixfsys.c:15=
1)
unixfsys.c:360: warning: 'getwd' is deprecated (declared at unixfsys.c:15=
1)
gcc -c -march=athlon64 -O2 -Wall -DVOL=volatile -fsigned-char -pipe -=
O3 -fomit-frame-pointer  -I/home/axiom/silver/lsp/gcl-2.6.8pre/o -I../h -=
I../gcl-tk unixfasl.c 
gcc -c -march=athlon64 -O2 -Wall -DVOL=volatile -fsigned-char -pipe -=
O3 -fomit-frame-pointer  -I/home/axiom/silver/lsp/gcl-2.6.8pre/o -I../h -=
I../gcl-tk error.c 
gcc -c -march=athlon64 -O2 -Wall -DVOL=volatile -fsigned-char -pipe -=
O3 -fomit-frame-pointer  -I/home/axiom/silver/lsp/gcl-2.6.8pre/o -I../h -=
I../gcl-tk unixtime.c 
gcc -c -march=athlon64 -O2 -Wall -DVOL=volatile -fsigned-char -pipe -=
O3 -fomit-frame-pointer  -I/home/axiom/silver/lsp/gcl-2.6.8pre/o -I../h -=
I../gcl-tk unixsys.c 
gcc -c -march=athlon64 -O2 -Wall -DVOL=volatile -fsigned-char -pipe -=
O3 -fomit-frame-pointer  -I/home/axiom/silver/lsp/gcl-2.6.8pre/o -I../h -=
I../gcl-tk unixsave.c 
gcc -c -march=athlon64 -O2 -Wall -DVOL=volatile -fsigned-char -pipe -=
O3 -fomit-frame-pointer  -I/home/axiom/silver/lsp/gcl-2.6.8pre/o -I../h -=
I../gcl-tk funlink.c 
In file included from funlink.c:978:
xdrfuns.c: In function 'siGxdr_write':
xdrfuns.c:82: warning: dereferencing type-punned pointer will break stric=
t-aliasing rules
xdrfuns.c: In function 'siGxdr_read':
xdrfuns.c:144: warning: dereferencing type-punned pointer will break stri=
ct-aliasing rules
gcc -c -march=athlon64 -O2 -Wall -DVOL=volatile -fsigned-char -pipe -=
O3 -fomit-frame-pointer  -I/home/axiom/silver/lsp/gcl-2.6.8pre/o -I../h -=
I../gcl-tk plt.c 
gcc -c -march=athlon64 -O2 -Wall -DVOL=volatile -fsigned-char -pipe -=
O3 -fomit-frame-pointer  -I/home/axiom/silver/lsp/gcl-2.6.8pre/o -I../h -=
I../gcl-tk fat_string.c 
fat_string.c: In function 'fSprofile':
fat_string.c:53: warning: null argument where non-null required (argument=
 1)
gcc -c -march=athlon64 -O2 -Wall -DVOL=volatile -fsigned-char -pipe -=
O3 -fomit-frame-pointer  -I/home/axiom/silver/lsp/gcl-2.6.8pre/o -I../h -=
I../gcl-tk run_process.c 
run_process.c: In function 'siLmake_socket_stream':
run_process.c:455: warning: value computed is not used
gcc -c -march=athlon64 -O2 -Wall -DVOL=volatile -fsigned-char -pipe -=
O3 -fomit-frame-pointer  -I/home/axiom/silver/lsp/gcl-2.6.8pre/o -I../h -=
I../gcl-tk nfunlink.c 
gcc -c -march=athlon64 -O2 -Wall -DVOL=volatile -fsigned-char -pipe -=
O3 -fomit-frame-pointer  -I/home/axiom/silver/lsp/gcl-2.6.8pre/o -I../h -=
I../gcl-tk usig.c 
usig.c: In function 'unblock_signals':
usig.c:93: warning: 'sigblock' is deprecated (declared at /usr/include/ge=
ntoo-multilib/amd64/signal.h:181)
usig.c:93: warning: 'sigsetmask' is deprecated (declared at /usr/include/=
gentoo-multilib/amd64/signal.h:184)
gcc -c -march=athlon64 -O2 -Wall -DVOL=volatile -fsigned-char -pipe -=
O3 -fomit-frame-pointer  -I/home/axiom/silver/lsp/gcl-2.6.8pre/o -I../h -=
I../gcl-tk usig2.c 
gcc -c -march=athlon64 -O2 -Wall -DVOL=volatile -fsigned-char -pipe -=
O3 -fomit-frame-pointer  -I/home/axiom/silver/lsp/gcl-2.6.8pre/o -I../h -=
I../gcl-tk utils.c 
gcc -c -march=athlon64 -O2 -Wall -DVOL=volatile -fsigned-char -pipe -=
O3 -fomit-frame-pointer  -I/home/axiom/silver/lsp/gcl-2.6.8pre/o -I../h -=
I../gcl-tk makefun.c 
gcc -march=athlon64 -O2 -Wall -DVOL=volatile -fsigned-char -pipe -O3 =
-fomit-frame-pointer  -I/home/axiom/silver/lsp/gcl-2.6.8pre/o -I../h -I..=
/gcl-tk   -c  sockets.c
gcc -c -march=athlon64 -O2 -Wall -DVOL=volatile -fsigned-char -pipe -=
O3 -fomit-frame-pointer  -I/home/axiom/silver/lsp/gcl-2.6.8pre/o -I../h -=
I../gcl-tk gmp_wrappers.c 
gcc -march=athlon64 -O2 -Wall -DVOL=volatile -fsigned-char -pipe -O3 =
-fomit-frame-pointer  -I/home/axiom/silver/lsp/gcl-2.6.8pre/o -I../h -I..=
/gcl-tk   -c  clxsocket.c
gcc -c -march=athlon64 -O2 -Wall -DVOL=volatile -fsigned-char -pipe -=
O3 -fomit-frame-pointer  -I/home/axiom/silver/lsp/gcl-2.6.8pre/o -I../h -=
I../gcl-tk init_pari.c 
gcc -c -march=athlon64 -O2 -Wall -DVOL=volatile -fsigned-char -pipe -=
O3 -fomit-frame-pointer  -I/home/axiom/silver/lsp/gcl-2.6.8pre/o -I../h -=
I../gcl-tk nsocket.c 
gcc -c -march=athlon64 -O2 -Wall -DVOL=volatile -fsigned-char -pipe -=
O3 -fomit-frame-pointer  -I/home/axiom/silver/lsp/gcl-2.6.8pre/o -I../h -=
I../gcl-tk sfasl.c 
=2E./bin/dpp gcl_readline
dpp: gcl_readline.d -> gcl_readline.c
gcc -c -march=athlon64 -O2 -Wall -DVOL=volatile -fsigned-char -pipe -=
O3 -fomit-frame-pointer  -I/home/axiom/silver/lsp/gcl-2.6.8pre/o -I../h -=
I../gcl-tk gcl_readline.c
rm gcl_readline.c
gcc -c -march=athlon64 -O2 -Wall -DVOL=volatile -fsigned-char -pipe -=
O3 -fomit-frame-pointer  -I/home/axiom/silver/lsp/gcl-2.6.8pre/o -I../h -=
I../gcl-tk bcmp.c 
gcc -c -march=athlon64 -O2 -Wall -DVOL=volatile -fsigned-char -pipe -=
O3 -fomit-frame-pointer  -I/home/axiom/silver/lsp/gcl-2.6.8pre/o -I../h -=
I../gcl-tk bcopy.c 
gcc -c -march=athlon64 -O2 -Wall -DVOL=volatile -fsigned-char -pipe -=
O3 -fomit-frame-pointer  -I/home/axiom/silver/lsp/gcl-2.6.8pre/o -I../h -=
I../gcl-tk bzero.c 
gcc -c -march=athlon64 -O2 -Wall -DVOL=volatile -fsigned-char -pipe -=
O3 -fomit-frame-pointer  -I/home/axiom/silver/lsp/gcl-2.6.8pre/o -I../h -=
I../gcl-tk user_init.c 
gcc -c -march=athlon64 -O2 -Wall -DVOL=volatile -fsigned-char -pipe -=
O3 -fomit-frame-pointer  -I/home/axiom/silver/lsp/gcl-2.6.8pre/o -I../h -=
I../gcl-tk user_match.c 
echo '#include "make-init.h"' > new_init.c
echo 'void NewInit(void){' >> new_init.c
cat main.ini alloc.ini gbc.ini bitop.ini typespec.ini eval.ini macros.ini=
 lex.ini bds.ini frame.ini predicate.ini reference.ini assignment.ini bin=
d.ini let.ini conditional.ini block.ini iteration.ini mapfun.ini prog.ini=
 multival.ini catch.ini symbol.ini cfun.ini cmpaux.ini package.ini big.in=
i number.ini num_pred.ini num_comp.ini num_arith.ini num_sfun.ini num_co.=
ini num_log.ini num_rand.ini earith.ini character.ini sequence.ini list.i=
ni hash.ini array.ini string.ini regexpr.ini structure.ini toplevel.ini f=
ile.ini read.ini backq.ini print.ini format.ini pathname.ini unixfsys.ini=
 unixfasl.ini error.ini unixtime.ini unixsys.ini unixsave.ini funlink.ini=
 plt.ini fat_string.ini ./run_process.ini nfunlink.ini usig.ini usig2.ini=
 utils.ini makefun.ini sockets.ini gmp_wrappers.ini clxsocket.ini init_pa=
ri.ini nsocket.ini ./sfasl.ini /home/axiom/silver/obj/linux/lib/cfuns-c.i=
ni /home/axiom/silver/obj/linux/lib/sockio-c.ini gcl_readline.ini >> new_=
init.c
echo '}' >> new_init.c
gcc -c -march=athlon64 -O2 -Wall -DVOL=volatile -fsigned-char -pipe  =
 -I/home/axiom/silver/lsp/gcl-2.6.8pre/o -I../h -I../gcl-tk new_init.c -o=
 new_init.o
rm -f gcllib.a
ar qc gcllib.a bcmp.o bcopy.o bzero.o user_init.o user_match.o
ranlib gcllib.a
make[4]: Leaving directory `/home/axiom/silver/lsp/gcl-2.6.8pre/o'
make h/cmpinclude.h
make[4]: Entering directory `/home/axiom/silver/lsp/gcl-2.6.8pre'
make[4]: `h/cmpinclude.h' is up to date.
make[4]: Leaving directory `/home/axiom/silver/lsp/gcl-2.6.8pre'
rm -f o/cmpinclude.h ; cp h/cmpinclude.h o
(cd o; make all)
make[4]: Entering directory `/home/axiom/silver/lsp/gcl-2.6.8pre/o'
make[4]: Nothing to be done for `all'.
make[4]: Leaving directory `/home/axiom/silver/lsp/gcl-2.6.8pre/o'
cd unixport && make saved_pre_gcl
ls: cannot access ../lsp/*.o: No such file or directory
ls: cannot access ../cmpnew/*.o: No such file or directory
ls: cannot access ../mod/*.o: No such file or directory
ls: cannot access ../pcl/*.o: No such file or directory
ls: cannot access ../clcs/*.o: No such file or directory
ls: cannot access ../clcs/clcs_*.lisp: No such file or directory
make[4]: Entering directory `/home/axiom/silver/lsp/gcl-2.6.8pre/unixport=
'
gcc -march=athlon64 -O2 -Wall -DVOL=volatile -fsigned-char -pipe -O3 =
-fomit-frame-pointer  -I/home/axiom/silver/lsp/gcl-2.6.8pre/o   -c -o sys=
_pre_gcl.o sys_pre_gcl.c
rm -rf gmp
mkdir gmp
a="" ; \
	for i in $a ; do \
		cp $i gmp/$(echo $i | sed -e 's,\.\./,,1' -e 's,/,_,g') ; \
	done
touch gmpfiles
rm -rf bfd
mkdir bfd
a="../binutils/bfd/binary.o ../binutils/bfd/section.o ../binutils/bfd/c=
offgen.o ../binutils/bfd/dwarf1.o ../binutils/bfd/dwarf2.o ../binutils/bf=
d/reloc.o ../binutils/bfd/bfd.o ../binutils/bfd/archive64.o ../binutils/b=
fd/elf.o ../binutils/bfd/targets.o ../binutils/bfd/elf32-i386.o ../binuti=
ls/bfd/tekhex.o ../binutils/bfd/simple.o ../binutils/bfd/elf32.o ../binut=
ils/bfd/elf64.o ../binutils/bfd/stab-syms.o ../binutils/bfd/elf32-gen.o .=
=2E/binutils/bfd/format.o ../binutils/bfd/merge.o ../binutils/bfd/elf64-g=
en.o ../binutils/bfd/aout32.o ../binutils/bfd/archive.o ../binutils/bfd/s=
tabs.o ../binutils/bfd/i386linux.o ../binutils/bfd/bfdwin.o ../binutils/b=
fd/elflink.o ../binutils/bfd/elf-strtab.o ../binutils/bfd/hash.o ../binut=
ils/bfd/efi-app-ia32.o ../binutils/bfd/ihex.o ../binutils/bfd/init.o ../b=
inutils/bfd/archures.o ../binutils/bfd/srec.o ../binutils/bfd/syms.o ../b=
inutils/bfd/cofflink.o ../binutils/bfd/corefile.o ../binutils/bfd/bfdio.o=
 ../binutils/bfd/opncls.o ../binutils/bfd/libbfd.o ../binutils/bfd/peigen=
=2Eo ../binutils/bfd/elf64-x86-64.o ../binutils/bfd/cache.o ../binutils/b=
fd/elf-eh-frame.o ../binutils/bfd/linker.o ../binutils/bfd/cpu-i386.o ../=
binutils/libiberty/splay-tree.o ../binutils/libiberty/lbasename.o ../binu=
tils/libiberty/regex.o ../binutils/libiberty/spaces.o ../binutils/libiber=
ty/fnmatch.o ../binutils/libiberty/hex.o ../binutils/libiberty/getruntime=
=2Eo ../binutils/libiberty/md5.o ../binutils/libiberty/fdmatch.o ../binut=
ils/libiberty/obstack.o ../binutils/libiberty/floatformat.o ../binutils/l=
ibiberty/xmalloc.o ../binutils/libiberty/physmem.o ../binutils/libiberty/=
unlink-if-ordinary.o ../binutils/libiberty/xstrerror.o ../binutils/libibe=
rty/argv.o ../binutils/libiberty/concat.o ../binutils/libiberty/hashtab.o=
 ../binutils/libiberty/cp-demangle.o ../binutils/libiberty/getopt.o ../bi=
nutils/libiberty/getpwd.o ../binutils/libiberty/make-temp-file.o ../binut=
ils/libiberty/getopt1.o ../binutils/libiberty/lrealpath.o ../binutils/lib=
iberty/cplus-dem.o ../binutils/libiberty/partition.o ../binutils/libibert=
y/fibheap.o ../binutils/libiberty/sort.o ../binutils/libiberty/ternary.o =
=2E./binutils/libiberty/mkstemps.o ../binutils/libiberty/choose-temp.o ..=
/binutils/libiberty/xstrdup.o ../binutils/libiberty/xatexit.o ../binutils=
/libiberty/dyn-string.o ../binutils/libiberty/alloca.o ../binutils/libibe=
rty/xmemdup.o ../binutils/libiberty/strsignal.o ../binutils/libiberty/mak=
e-relative-prefix.o ../binutils/libiberty/safe-ctype.o ../binutils/libibe=
rty/strerror.o ../binutils/libiberty/objalloc.o ../binutils/libiberty/cp-=
demint.o ../binutils/libiberty/pex-unix.o ../binutils/libiberty/xexit.o" =
; \
	for i in $a ; do \
		cp $i bfd/$(echo $i | sed -e 's,\.\./,,1' -e 's,/,_,g') ; \
	done
touch bfdfiles
rm -rf libpre_gcl.a
ar rs libpre_gcl.a ../o/alloc.o ../o/array.o ../o/assignment.o ../o/backq=
=2Eo ../o/bds.o ../o/big.o ../o/bind.o ../o/bitop.o ../o/block.o ../o/cat=
ch.o ../o/cfun.o ../o/character.o ../o/clxsocket.o ../o/cmpaux.o ../o/con=
ditional.o ../o/earith.o ../o/error.o ../o/eval.o ../o/fat_string.o ../o/=
file.o ../o/format.o ../o/frame.o ../o/funlink.o ../o/gbc.o ../o/gcl_read=
line.o ../o/gmp_wrappers.o ../o/hash.o ../o/init_pari.o ../o/iteration.o =
=2E./o/let.o ../o/lex.o ../o/list.o ../o/macros.o ../o/main.o ../o/makefu=
n.o ../o/mapfun.o ../o/multival.o ../o/new_init.o ../o/nfunlink.o ../o/ns=
ocket.o ../o/num_arith.o ../o/num_co.o ../o/num_comp.o ../o/num_log.o ../=
o/num_pred.o ../o/num_rand.o ../o/num_sfun.o ../o/number.o ../o/package.o=
 ../o/pathname.o ../o/plt.o ../o/predicate.o ../o/print.o ../o/prog.o ../=
o/read.o ../o/reference.o ../o/regexpr.o ../o/run_process.o ../o/sequence=
=2Eo ../o/sfasl.o ../o/sockets.o ../o/string.o ../o/structure.o ../o/symb=
ol.o ../o/toplevel.o ../o/typespec.o ../o/unixfasl.o ../o/unixfsys.o ../o=
/unixsave.o ../o/unixsys.o ../o/unixtime.o ../o/usig.o ../o/usig2.o ../o/=
utils.o sys_pre_gcl.o bfd/binutils_bfd_i386linux.o bfd/binutils_libiberty=
_dyn-string.o bfd/binutils_libiberty_strerror.o bfd/binutils_libiberty_ch=
oose-temp.o bfd/binutils_bfd_bfdio.o bfd/binutils_bfd_opncls.o bfd/binuti=
ls_libiberty_objalloc.o bfd/binutils_libiberty_fibheap.o bfd/binutils_lib=
iberty_safe-ctype.o bfd/binutils_bfd_libbfd.o bfd/binutils_libiberty_pex-=
unix.o bfd/binutils_bfd_peigen.o bfd/binutils_bfd_bfd.o bfd/binutils_bfd_=
elf.o bfd/binutils_libiberty_make-relative-prefix.o bfd/binutils_bfd_elf6=
4-x86-64.o bfd/binutils_bfd_cpu-i386.o bfd/binutils_bfd_section.o bfd/bin=
utils_bfd_cache.o bfd/binutils_libiberty_ternary.o bfd/binutils_bfd_coffg=
en.o bfd/binutils_libiberty_strsignal.o bfd/binutils_libiberty_splay-tree=
=2Eo bfd/binutils_libiberty_argv.o bfd/binutils_libiberty_xstrdup.o bfd/b=
inutils_libiberty_xatexit.o bfd/binutils_bfd_elf-eh-frame.o bfd/binutils_=
libiberty_cp-demint.o bfd/binutils_bfd_hash.o bfd/binutils_bfd_linker.o b=
fd/binutils_libiberty_unlink-if-ordinary.o bfd/binutils_bfd_ihex.o bfd/bi=
nutils_bfd_binary.o bfd/binutils_bfd_init.o bfd/binutils_libiberty_xmemdu=
p.o bfd/binutils_bfd_targets.o bfd/binutils_libiberty_lbasename.o bfd/bin=
utils_libiberty_concat.o bfd/binutils_libiberty_getruntime.o bfd/binutils=
_libiberty_getopt.o bfd/binutils_libiberty_getpwd.o bfd/binutils_bfd_dwar=
f1.o bfd/binutils_bfd_dwarf2.o bfd/binutils_bfd_elf32-i386.o bfd/binutils=
_bfd_reloc.o bfd/binutils_bfd_srec.o bfd/binutils_bfd_syms.o bfd/binutils=
_libiberty_make-temp-file.o bfd/binutils_libiberty_sort.o bfd/binutils_li=
biberty_floatformat.o bfd/binutils_bfd_archive.o bfd/binutils_bfd_tekhex.=
o bfd/binutils_bfd_simple.o bfd/binutils_bfd_elf32.o bfd/binutils_bfd_elf=
64.o bfd/binutils_bfd_elflink.o bfd/binutils_libiberty_fnmatch.o bfd/binu=
tils_bfd_format.o bfd/binutils_libiberty_fdmatch.o bfd/binutils_bfd_elf-s=
trtab.o bfd/binutils_libiberty_obstack.o bfd/binutils_bfd_aout32.o bfd/bi=
nutils_bfd_merge.o bfd/binutils_libiberty_alloca.o bfd/binutils_bfd_archi=
ve64.o bfd/binutils_libiberty_xstrerror.o bfd/binutils_libiberty_xmalloc.=
o bfd/binutils_bfd_stabs.o bfd/binutils_bfd_bfdwin.o bfd/binutils_libiber=
ty_cp-demangle.o bfd/binutils_bfd_archures.o bfd/binutils_libiberty_physm=
em.o bfd/binutils_libiberty_xexit.o bfd/binutils_bfd_efi-app-ia32.o bfd/b=
inutils_bfd_cofflink.o bfd/binutils_libiberty_mkstemps.o bfd/binutils_bfd=
_stab-syms.o bfd/binutils_libiberty_lrealpath.o bfd/binutils_bfd_elf32-ge=
n.o bfd/binutils_bfd_corefile.o bfd/binutils_libiberty_cplus-dem.o bfd/bi=
nutils_libiberty_regex.o bfd/binutils_libiberty_partition.o bfd/binutils_=
bfd_elf64-gen.o bfd/binutils_libiberty_hex.o bfd/binutils_libiberty_hasht=
ab.o bfd/binutils_libiberty_md5.o bfd/binutils_libiberty_spaces.o bfd/bin=
utils_libiberty_getopt1.o
ar: creating libpre_gcl.a
cp ../o/gcllib.a libgclp.a
ranlib libgclp.a
cp init_pre_gcl.lsp.in init_pre_gcl.lsp.tmp
touch raw_pre_gcl_map
gcc -o raw_pre_gcl /home/axiom/silver/obj/linux/lib/cfuns-c.o /home/axiom=
/silver/obj/linux/lib/sockio-c.o \
		-L.  -Wl,-Map raw_pre_gcl_map   -lpre_gcl -lm  -lgmp -lreadline -lncurs=
es -lc -lgclp /home/axiom/silver/obj/linux/lib/libspad.a 
cat init_pre_gcl.lsp.tmp | sed \
		-e "s#@LI-VERS@#(`cat ../majvers`.`cat ../minvers`) `date`#1" \
		-e "s#@LI-EXTVERS@#`cat ../minvers | cut -f2 -d.`#1" \
		-e "s#@LI-MINVERS@#`cat ../minvers | cut -f1 -d.`#1" \
		-e "s#@LI-MAJVERS@#`cat ../majvers`#1" \
		-e "s#@LI-CC@#\"gcc -c -march=athlon64 -O2 -Wall -DVOL=volatile -fs=
igned-char -pipe \"#1" \
		-e "s#@LI-LD@#\"gcc -o \"#1" \
		-e "s#@LI-LD-LIBS@#\"   -lpre_gcl -lm  -lgmp -lreadline -lncurses -lc -=
lgclp /home/axiom/silver/obj/linux/lib/libspad.a  \"#1" \
		-e "s#@LI-OPT-THREE@#\"-O3 -fomit-frame-pointer\"#1" \
		-e "s#@LI-OPT-TWO@#\"-O\"#1" \
		-e "s#@LI-INIT-LSP@#\"init_pre_gcl.lsp\"#1" >init_pre_gcl.lsp
cp init_pre_gcl.lsp foo
echo " (in-package \"USER\")(system:save-system \"saved_pre_gcl\")" >>foo=

/home/axiom/silver/lsp/gcl-2.6.8pre/unixport/raw_pre_gcl /home/axiom/silv=
er/lsp/gcl-2.6.8pre/unixport/ -libdir /home/axiom/silver/lsp/gcl-2.6.8pre=
/ < foo
GCL (GNU Common Lisp)  April 1994  262144 pages
Building symbol table for /home/axiom/silver/lsp/gcl-2.6.8pre/unixport/ra=
w_pre_gcl ..
I'm not an object
Lisp initialization failed.
rm raw_pre_gcl init_pre_gcl.lsp
make[4]: Leaving directory `/home/axiom/silver/lsp/gcl-2.6.8pre/unixport'=

(cd lsp; touch *.lsp ; make all)
make[4]: Entering directory `/home/axiom/silver/lsp/gcl-2.6.8pre/lsp'
make[4]: Leaving directory `/home/axiom/silver/lsp/gcl-2.6.8pre/lsp'
(cd cmpnew; touch *.lsp ; make all)
make[4]: Entering directory `/home/axiom/silver/lsp/gcl-2.6.8pre/cmpnew'
make[4]: Leaving directory `/home/axiom/silver/lsp/gcl-2.6.8pre/cmpnew'
cd unixport && make saved_gcl
ls: cannot access ../lsp/*.o: No such file or directory
ls: cannot access ../cmpnew/*.o: No such file or directory
ls: cannot access ../mod/*.o: No such file or directory
ls: cannot access ../pcl/*.o: No such file or directory
ls: cannot access ../clcs/*.o: No such file or directory
ls: cannot access ../clcs/clcs_*.lisp: No such file or directory
make[4]: Entering directory `/home/axiom/silver/lsp/gcl-2.6.8pre/unixport=
'
gcc -march=athlon64 -O2 -Wall -DVOL=volatile -fsigned-char -pipe -O3 =
-fomit-frame-pointer  -I/home/axiom/silver/lsp/gcl-2.6.8pre/o   -c -o sys=
_gcl.o sys_gcl.c
rm -rf libgcl.a
ar rs libgcl.a ../o/alloc.o ../o/array.o ../o/assignment.o ../o/backq.o .=
=2E/o/bds.o ../o/big.o ../o/bind.o ../o/bitop.o ../o/block.o ../o/catch.o=
 ../o/cfun.o ../o/character.o ../o/clxsocket.o ../o/cmpaux.o ../o/conditi=
onal.o ../o/earith.o ../o/error.o ../o/eval.o ../o/fat_string.o ../o/file=
=2Eo ../o/format.o ../o/frame.o ../o/funlink.o ../o/gbc.o ../o/gcl_readli=
ne.o ../o/gmp_wrappers.o ../o/hash.o ../o/init_pari.o ../o/iteration.o ..=
/o/let.o ../o/lex.o ../o/list.o ../o/macros.o ../o/main.o ../o/makefun.o =
=2E./o/mapfun.o ../o/multival.o ../o/new_init.o ../o/nfunlink.o ../o/nsoc=
ket.o ../o/num_arith.o ../o/num_co.o ../o/num_comp.o ../o/num_log.o ../o/=
num_pred.o ../o/num_rand.o ../o/num_sfun.o ../o/number.o ../o/package.o .=
=2E/o/pathname.o ../o/plt.o ../o/predicate.o ../o/print.o ../o/prog.o ../=
o/read.o ../o/reference.o ../o/regexpr.o ../o/run_process.o ../o/sequence=
=2Eo ../o/sfasl.o ../o/sockets.o ../o/string.o ../o/structure.o ../o/symb=
ol.o ../o/toplevel.o ../o/typespec.o ../o/unixfasl.o ../o/unixfsys.o ../o=
/unixsave.o ../o/unixsys.o ../o/unixtime.o ../o/usig.o ../o/usig2.o ../o/=
utils.o sys_gcl.o bfd/binutils_bfd_i386linux.o bfd/binutils_libiberty_dyn=
-string.o bfd/binutils_libiberty_strerror.o bfd/binutils_libiberty_choose=
-temp.o bfd/binutils_bfd_bfdio.o bfd/binutils_bfd_opncls.o bfd/binutils_l=
ibiberty_objalloc.o bfd/binutils_libiberty_fibheap.o bfd/binutils_libiber=
ty_safe-ctype.o bfd/binutils_bfd_libbfd.o bfd/binutils_libiberty_pex-unix=
=2Eo bfd/binutils_bfd_peigen.o bfd/binutils_bfd_bfd.o bfd/binutils_bfd_el=
f.o bfd/binutils_libiberty_make-relative-prefix.o bfd/binutils_bfd_elf64-=
x86-64.o bfd/binutils_bfd_cpu-i386.o bfd/binutils_bfd_section.o bfd/binut=
ils_bfd_cache.o bfd/binutils_libiberty_ternary.o bfd/binutils_bfd_coffgen=
=2Eo bfd/binutils_libiberty_strsignal.o bfd/binutils_libiberty_splay-tree=
=2Eo bfd/binutils_libiberty_argv.o bfd/binutils_libiberty_xstrdup.o bfd/b=
inutils_libiberty_xatexit.o bfd/binutils_bfd_elf-eh-frame.o bfd/binutils_=
libiberty_cp-demint.o bfd/binutils_bfd_hash.o bfd/binutils_bfd_linker.o b=
fd/binutils_libiberty_unlink-if-ordinary.o bfd/binutils_bfd_ihex.o bfd/bi=
nutils_bfd_binary.o bfd/binutils_bfd_init.o bfd/binutils_libiberty_xmemdu=
p.o bfd/binutils_bfd_targets.o bfd/binutils_libiberty_lbasename.o bfd/bin=
utils_libiberty_concat.o bfd/binutils_libiberty_getruntime.o bfd/binutils=
_libiberty_getopt.o bfd/binutils_libiberty_getpwd.o bfd/binutils_bfd_dwar=
f1.o bfd/binutils_bfd_dwarf2.o bfd/binutils_bfd_elf32-i386.o bfd/binutils=
_bfd_reloc.o bfd/binutils_bfd_srec.o bfd/binutils_bfd_syms.o bfd/binutils=
_libiberty_make-temp-file.o bfd/binutils_libiberty_sort.o bfd/binutils_li=
biberty_floatformat.o bfd/binutils_bfd_archive.o bfd/binutils_bfd_tekhex.=
o bfd/binutils_bfd_simple.o bfd/binutils_bfd_elf32.o bfd/binutils_bfd_elf=
64.o bfd/binutils_bfd_elflink.o bfd/binutils_libiberty_fnmatch.o bfd/binu=
tils_bfd_format.o bfd/binutils_libiberty_fdmatch.o bfd/binutils_bfd_elf-s=
trtab.o bfd/binutils_libiberty_obstack.o bfd/binutils_bfd_aout32.o bfd/bi=
nutils_bfd_merge.o bfd/binutils_libiberty_alloca.o bfd/binutils_bfd_archi=
ve64.o bfd/binutils_libiberty_xstrerror.o bfd/binutils_libiberty_xmalloc.=
o bfd/binutils_bfd_stabs.o bfd/binutils_bfd_bfdwin.o bfd/binutils_libiber=
ty_cp-demangle.o bfd/binutils_bfd_archures.o bfd/binutils_libiberty_physm=
em.o bfd/binutils_libiberty_xexit.o bfd/binutils_bfd_efi-app-ia32.o bfd/b=
inutils_bfd_cofflink.o bfd/binutils_libiberty_mkstemps.o bfd/binutils_bfd=
_stab-syms.o bfd/binutils_libiberty_lrealpath.o bfd/binutils_bfd_elf32-ge=
n.o bfd/binutils_bfd_corefile.o bfd/binutils_libiberty_cplus-dem.o bfd/bi=
nutils_libiberty_regex.o bfd/binutils_libiberty_partition.o bfd/binutils_=
bfd_elf64-gen.o bfd/binutils_libiberty_hex.o bfd/binutils_libiberty_hasht=
ab.o bfd/binutils_libiberty_md5.o bfd/binutils_libiberty_spaces.o bfd/bin=
utils_libiberty_getopt1.o
ar: creating libgcl.a
touch raw_gcl_map
gcc -o raw_gcl /home/axiom/silver/obj/linux/lib/cfuns-c.o /home/axiom/sil=
ver/obj/linux/lib/sockio-c.o \
		-L.  -Wl,-Map raw_gcl_map   -lgcl -lm  -lgmp -lreadline -lncurses -lc -=
lgclp /home/axiom/silver/obj/linux/lib/libspad.a 
=2E/libgcl.a(sys_gcl.o): In function `gcl_init_system':
sys_gcl.c:(.text+0x35bd): undefined reference to `init_gcl_cmpwt'
sys_gcl.c:(.text+0x363a): undefined reference to `init_gcl_predlib'
sys_gcl.c:(.text+0x36b7): undefined reference to `init_gcl_setf'
sys_gcl.c:(.text+0x3734): undefined reference to `init_gcl_assert'
sys_gcl.c:(.text+0x37b1): undefined reference to `init_gcl_arraylib'
sys_gcl.c:(.text+0x382e): undefined reference to `init_gcl_defstruct'
sys_gcl.c:(.text+0x38ab): undefined reference to `init_gcl_describe'
sys_gcl.c:(.text+0x3928): undefined reference to `init_gcl_numlib'
sys_gcl.c:(.text+0x39a5): undefined reference to `init_gcl_listlib'
sys_gcl.c:(.text+0x3a22): undefined reference to `init_gcl_seq'
sys_gcl.c:(.text+0x3a9f): undefined reference to `init_gcl_iolib'
sys_gcl.c:(.text+0x3b1c): undefined reference to `init_gcl_packlib'
sys_gcl.c:(.text+0x3b99): undefined reference to `init_gcl_mislib'
sys_gcl.c:(.text+0x3c16): undefined reference to `init_gcl_seqlib'
sys_gcl.c:(.text+0x3c93): undefined reference to `init_gcl_trace'
sys_gcl.c:(.text+0x3d10): undefined reference to `init_gcl_cmpenv'
sys_gcl.c:(.text+0x3d8d): undefined reference to `init_gcl_cmputil'
sys_gcl.c:(.text+0x3e0a): undefined reference to `init_gcl_cmploc'
sys_gcl.c:(.text+0x3e87): undefined reference to `init_gcl_loop'
sys_gcl.c:(.text+0x3f04): undefined reference to `init_gcl_cmpif'
sys_gcl.c:(.text+0x3f81): undefined reference to `init_gcl_cmpbind'
sys_gcl.c:(.text+0x3ffe): undefined reference to `init_gcl_cmptag'
sys_gcl.c:(.text+0x407b): undefined reference to `init_gcl_serror'
sys_gcl.c:(.text+0x40f8): undefined reference to `init_gcl_cmpflet'
sys_gcl.c:(.text+0x4175): undefined reference to `init_gcl_info'
sys_gcl.c:(.text+0x41f2): undefined reference to `init_gcl_cmpmulti'
sys_gcl.c:(.text+0x426f): undefined reference to `init_gcl_make_defpackag=
e'
sys_gcl.c:(.text+0x42ec): undefined reference to `init_gcl_cmplam'
sys_gcl.c:(.text+0x4369): undefined reference to `init_gcl_cmpcall'
sys_gcl.c:(.text+0x43e6): undefined reference to `init_gcl_cmpvar'
sys_gcl.c:(.text+0x4463): undefined reference to `init_gcl_sloop'
sys_gcl.c:(.text+0x44e0): undefined reference to `init_gcl_cmpeval'
sys_gcl.c:(.text+0x455d): undefined reference to `init_gcl_debug'
sys_gcl.c:(.text+0x45da): undefined reference to `init_gcl_cmpmap'
sys_gcl.c:(.text+0x4657): undefined reference to `init_gcl_defpackage'
sys_gcl.c:(.text+0x46d4): undefined reference to `init_gcl_cmplabel'
sys_gcl.c:(.text+0x4751): undefined reference to `init_gcl_cmpblock'
sys_gcl.c:(.text+0x47ce): undefined reference to `init_gcl_cmptop'
sys_gcl.c:(.text+0x484b): undefined reference to `init_gcl_destructuring_=
bind'
sys_gcl.c:(.text+0x48c8): undefined reference to `init_gcl_cmpfun'
sys_gcl.c:(.text+0x4945): undefined reference to `init_gcl_cmptype'
sys_gcl.c:(.text+0x49c2): undefined reference to `init_gcl_cmpspecial'
sys_gcl.c:(.text+0x4a3f): undefined reference to `init_gcl_cmpinline'
sys_gcl.c:(.text+0x4abc): undefined reference to `init_gcl_cmplet'
sys_gcl.c:(.text+0x4b39): undefined reference to `init_gcl_cmpcatch'
sys_gcl.c:(.text+0x4bb2): undefined reference to `init_gcl_cmpvs'
=2E/libgcl.a(sys_gcl.o): In function `gcl_init_init':
sys_gcl.c:(.text+0x525d): undefined reference to `init_gcl_defmacro'
sys_gcl.c:(.text+0x52c7): undefined reference to `init_gcl_evalmacros'
sys_gcl.c:(.text+0x5331): undefined reference to `init_gcl_top'
sys_gcl.c:(.text+0x539c): undefined reference to `init_gcl_module'
collect2: ld returned 1 exit status
make[4]: *** [raw_gcl_map] Error 1
make[4]: Leaving directory `/home/axiom/silver/lsp/gcl-2.6.8pre/unixport'=

make[3]: *** [unixport/saved_gcl] Error 2
make[3]: Leaving directory `/home/axiom/silver/lsp/gcl-2.6.8pre'
/bin/sh: line 5: unixport/saved_gcl: No such file or directory
make[2]: *** [gcldir] Error 127
make[2]: Leaving directory `/home/axiom/silver/lsp'
make[1]: *** [lspdir] Error 2
make[1]: Leaving directory `/home/axiom/silver'
make: *** [all] Error 2

--------------070201030909010107080208--

\start
Date: Sun, 16 Sep 2007 17:52:37 -0500
From: Tim Daly
To: list
Subject: 20070916.01.tpd.patch (bug 103 fix)

The call

  solve(z=z,z)

fails with:

   >> Error detected within library code:
   (1 . failed) cannot be coerced to mode (Polynomial (Integer))


The bug fix, proposed by William, changes exquo in EuclideanDomain
to add the zero? x test.

      x exquo y ==
         zero? x => 0
         zero? y => "failed"
         qr:=divide(x,y)
         zero?(qr.remainder) => qr.quotient
         "failed"

This change was made but does not affect the behavior of the bug.

This fix, proposed by Martin, changes primitivePart in 
PolynomialCategory to add the zero? test.

      primitivePart p ==
        zero? p => p
        unitNormal((p exquo content p) ::%).canonical
      primitivePart(p,v) ==
        zero? p => p
        unitNormal((p exquo content(p,v)) ::%).canonical

succeeds with:

  [0= 0]
                Type: List Equation Fraction Polynomial Integer
========================================================================
diff --git a/changelog b/changelog
index 9baab4b..48493c1 100644
--- a/changelog
+++ b/changelog
@@ -1,3 +1,7 @@
+20070916 tpd src/input/Makefile add bug103.input regression test
+20070916 tpd src/input/bug103.input test solve(z=z,z) bug fix
+20070916 tpd src/algebra/polycat.spad solve(z=z,z) bug fix
+20070916 tpd src/algebra/catdef.spad add zero? to exquo
 20070915 tpd merge bug100 branch
 20070915 tpd src/input/Makefile add bug100.input regression test
 20070915 tpd src/input/bug100.input test integrate((z^a+1)^b,z) infinite loop
diff --git a/src/algebra/catdef.spad.pamphlet b/src/algebra/catdef.spad.pamphlet
index d7b7274..38c9a1c 100644
--- a/src/algebra/catdef.spad.pamphlet
+++ b/src/algebra/catdef.spad.pamphlet
@@ -1319,6 +1319,7 @@ EuclideanDomain(): Category == PrincipalIdealDomain with
       x quo y == divide(x,y).quotient --divide must be user-supplied
       x rem y == divide(x,y).remainder
       x exquo y ==
+         zero? x => 0
          zero? y => "failed"
          qr:=divide(x,y)
          zero?(qr.remainder) => qr.quotient
@@ -1544,601 +1545,507 @@ recompiling.
 @
 \subsubsection{EUCDOM-;sizeLess?;2SB;1}
 <<EUCDOM-;sizeLess?;2SB;1>>=
-(DEFUN |EUCDOM-;sizeLess?;2SB;1| (|x| |y| |$|) 
-  (COND 
-    ((SPADCALL |y| (QREFELT |$| 8)) (QUOTE NIL))
-    ((SPADCALL |x| (QREFELT |$| 8)) (QUOTE T))
-    ((QUOTE T) 
-      (|<| (SPADCALL |x| (QREFELT |$| 10)) (SPADCALL |y| (QREFELT |$| 10)))))) 
+(DEFUN |EUCDOM-;sizeLess?;2SB;1| (|x| |y| $)
+ (COND
+  ((SPADCALL |y| (QREFELT $ 8)) (QUOTE NIL))
+  ((SPADCALL |x| (QREFELT $ 8)) (QUOTE T))
+  ((QUOTE T)
+   (< (SPADCALL |x| (QREFELT $ 10)) (SPADCALL |y| (QREFELT $ 10)))))) 
 
 @
 
 \subsubsection{EUCDOM-;quo;3S;2}
 <<EUCDOM-;quo;3S;2>>=
-(DEFUN |EUCDOM-;quo;3S;2| (|x| |y| |$|) 
-  (QCAR (SPADCALL |x| |y| (QREFELT |$| 13)))) 
+(DEFUN |EUCDOM-;quo;3S;2| (|x| |y| $)
+ (QCAR (SPADCALL |x| |y| (QREFELT $ 13)))) 
 
 @
 \subsubsection{EUCDOM-;rem;3S;3}
 <<EUCDOM-;rem;3S;3>>=
-(DEFUN |EUCDOM-;rem;3S;3| (|x| |y| |$|) 
-  (QCDR (SPADCALL |x| |y| (QREFELT |$| 13)))) 
+(DEFUN |EUCDOM-;rem;3S;3| (|x| |y| $)
+ (QCDR (SPADCALL |x| |y| (QREFELT $ 13)))) 
 
 @
 \subsubsection{EUCDOM-;exquo;2SU;4}
 <<EUCDOM-;exquo;2SU;4>>=
-(DEFUN |EUCDOM-;exquo;2SU;4| (|x| |y| |$|) 
-  (PROG (|qr|) 
-    (RETURN 
-      (SEQ 
-        (COND 
-          ((SPADCALL |y| (QREFELT |$| 8)) (CONS 1 "failed"))
-          ((QUOTE T) 
-            (SEQ 
-              (LETT |qr| 
-                (SPADCALL |x| |y| (QREFELT |$| 13))
-                |EUCDOM-;exquo;2SU;4|)
-              (EXIT 
-                (COND 
-                  ((SPADCALL (QCDR |qr|) (QREFELT |$| 8)) (CONS 0 (QCAR |qr|)))
-                  ((QUOTE T) (CONS 1 "failed"))))))))))) 
+(DEFUN |EUCDOM-;exquo;2SU;4| (|x| |y| $)
+ (PROG (|qr|)
+  (RETURN
+   (SEQ
+    (COND
+     ((SPADCALL |x| (QREFELT $ 8)) (CONS 0 (|spadConstant| $ 16)))
+     ((SPADCALL |y| (QREFELT $ 8)) (CONS 1 "failed"))
+     ((QUOTE T)
+      (SEQ
+       (LETT |qr|
+        (SPADCALL |x| |y| (QREFELT $ 13))
+        |EUCDOM-;exquo;2SU;4|)
+       (EXIT
+        (COND
+         ((SPADCALL (QCDR |qr|) (QREFELT $ 8)) (CONS 0 (QCAR |qr|)))
+         ((QUOTE T) (CONS 1 "failed"))))))))))) 
 
 @
 \subsubsection{EUCDOM-;gcd;3S;5}
 <<EUCDOM-;gcd;3S;5>>=
-(DEFUN |EUCDOM-;gcd;3S;5| (|x| |y| |$|) 
-  (PROG (|#G13| |#G14|) 
-    (RETURN 
-      (SEQ 
-        (LETT |x| (SPADCALL |x| (QREFELT |$| 18)) |EUCDOM-;gcd;3S;5|)
-        (LETT |y| (SPADCALL |y| (QREFELT |$| 18)) |EUCDOM-;gcd;3S;5|)
-        (SEQ G190 
-          (COND 
-            ((NULL 
-              (COND 
-                ((SPADCALL |y| (QREFELT |$| 8)) (QUOTE NIL))
-                ((QUOTE T) (QUOTE T))))
-              (GO G191)))
-          (SEQ 
-            (PROGN 
-              (LETT |#G13| |y| |EUCDOM-;gcd;3S;5|)
-              (LETT |#G14| (SPADCALL |x| |y| (QREFELT |$| 19)) |EUCDOM-;gcd;3S;5|)
-              (LETT |x| |#G13| |EUCDOM-;gcd;3S;5|)
-              (LETT |y| |#G14| |EUCDOM-;gcd;3S;5|))
-            (EXIT 
-              (LETT |y| (SPADCALL |y| (QREFELT |$| 18)) |EUCDOM-;gcd;3S;5|)))
-          NIL 
-          (GO G190) 
-          G191 
-          (EXIT NIL))
-        (EXIT |x|))))) 
+(DEFUN |EUCDOM-;gcd;3S;5| (|x| |y| $)
+ (PROG (|#G13| |#G14|)
+  (RETURN
+   (SEQ
+    (LETT |x| (SPADCALL |x| (QREFELT $ 19)) |EUCDOM-;gcd;3S;5|)
+    (LETT |y| (SPADCALL |y| (QREFELT $ 19)) |EUCDOM-;gcd;3S;5|)
+    (SEQ G190
+     (COND
+      ((NULL
+       (COND 
+        ((SPADCALL |y| (QREFELT $ 8)) (QUOTE NIL))
+        ((QUOTE T) (QUOTE T))))
+       (GO G191)))
+     (SEQ
+      (PROGN
+       (LETT |#G13| |y| |EUCDOM-;gcd;3S;5|)
+       (LETT |#G14| (SPADCALL |x| |y| (QREFELT $ 20)) |EUCDOM-;gcd;3S;5|)
+       (LETT |x| |#G13| |EUCDOM-;gcd;3S;5|)
+       (LETT |y| |#G14| |EUCDOM-;gcd;3S;5|))
+      (EXIT
+       (LETT |y| (SPADCALL |y| (QREFELT $ 19)) |EUCDOM-;gcd;3S;5|)))
+     NIL
+     (GO G190)
+    G191
+   (EXIT NIL))
+  (EXIT |x|))))) 
 
 @
 \subsubsection{EUCDOM-;unitNormalizeIdealElt}
 <<EUCDOM-;unitNormalizeIdealElt>>=
-(DEFUN |EUCDOM-;unitNormalizeIdealElt| (|s| |$|) 
-  (PROG (|#G16| |u| |c| |a|) 
-    (RETURN 
-      (SEQ 
-        (PROGN 
-          (LETT |#G16| (SPADCALL (QVELT |s| 2) (QREFELT |$| 22)) |EUCDOM-;unitNormalizeIdealElt|)
-          (LETT |u| (QVELT |#G16| 0) |EUCDOM-;unitNormalizeIdealElt|)
-          (LETT |c| (QVELT |#G16| 1) |EUCDOM-;unitNormalizeIdealElt|)
-          (LETT |a| (QVELT |#G16| 2) |EUCDOM-;unitNormalizeIdealElt|)
-          |#G16|) 
-       (EXIT 
-         (COND 
-           ((SPADCALL |a| (QREFELT |$| 23)) |s|)
-           ((QUOTE T) 
-             (VECTOR 
-               (SPADCALL |a| (QVELT |s| 0) (QREFELT |$| 24))
-               (SPADCALL |a| (QVELT |s| 1) (QREFELT |$| 24))
-               |c|)))))))) 
+(DEFUN |EUCDOM-;unitNormalizeIdealElt| (|s| $)
+ (PROG (|#G16| |u| |c| |a|)
+  (RETURN
+   (SEQ
+    (PROGN
+     (LETT |#G16| 
+       (SPADCALL (QVELT |s| 2) (QREFELT $ 23))
+       |EUCDOM-;unitNormalizeIdealElt|)
+     (LETT |u| (QVELT |#G16| 0) |EUCDOM-;unitNormalizeIdealElt|)
+     (LETT |c| (QVELT |#G16| 1) |EUCDOM-;unitNormalizeIdealElt|)
+     (LETT |a| (QVELT |#G16| 2) |EUCDOM-;unitNormalizeIdealElt|)
+     |#G16|)
+    (EXIT
+     (COND
+      ((SPADCALL |a| (|spadConstant| $ 24) (QREFELT $ 25)) |s|)
+      ((QUOTE T)
+       (VECTOR
+        (SPADCALL |a| (QVELT |s| 0) (QREFELT $ 26))
+        (SPADCALL |a| (QVELT |s| 1) (QREFELT $ 26))
+        |c|)))))))) 
 
 @
 \subsubsection{EUCDOM-;extendedEuclidean;2SR;7}
 <<EUCDOM-;extendedEuclidean;2SR;7>>=
-(DEFUN |EUCDOM-;extendedEuclidean;2SR;7| (|x| |y| |$|) 
-  (PROG (|s3| |s2| |qr| |s1|) 
-    (RETURN 
-      (SEQ 
-        (LETT |s1| 
-          (|EUCDOM-;unitNormalizeIdealElt| 
-            (VECTOR (|spadConstant| |$| 25) (|spadConstant| |$| 26) |x|) |$|)
-          |EUCDOM-;extendedEuclidean;2SR;7|)
-        (LETT |s2| 
-          (|EUCDOM-;unitNormalizeIdealElt| 
-            (VECTOR (|spadConstant| |$| 26) (|spadConstant| |$| 25) |y|) |$|)
-          |EUCDOM-;extendedEuclidean;2SR;7|)
-        (EXIT 
-          (COND 
-            ((SPADCALL |y| (QREFELT |$| 8)) |s1|)
-            ((SPADCALL |x| (QREFELT |$| 8)) |s2|)
-            ((QUOTE T) 
-              (SEQ 
-                (SEQ G190 
-                  (COND 
-                    ((NULL 
-                       (COND 
-                         ((SPADCALL (QVELT |s2| 2) (QREFELT |$| 8))
-                           (QUOTE NIL))
-                         ((QUOTE T) (QUOTE T))))
-                     (GO G191))) 
-                  (SEQ 
-                    (LETT |qr| 
-                      (SPADCALL (QVELT |s1| 2) (QVELT |s2| 2) (QREFELT |$| 13))
-                      |EUCDOM-;extendedEuclidean;2SR;7|)
-                    (LETT |s3| 
-                      (VECTOR 
-                        (SPADCALL 
-                          (QVELT |s1| 0)
-                          (SPADCALL 
-                            (QCAR |qr|)
-                            (QVELT |s2| 0)
-                            (QREFELT |$| 24))
-                          (QREFELT |$| 27))
-                        (SPADCALL 
-                          (QVELT |s1| 1)
-                          (SPADCALL 
-                            (QCAR |qr|)
-                            (QVELT |s2| 1)
-                            (QREFELT |$| 24))
-                          (QREFELT |$| 27))
-                        (QCDR |qr|))
-                      |EUCDOM-;extendedEuclidean;2SR;7|)
-                    (LETT |s1| |s2| |EUCDOM-;extendedEuclidean;2SR;7|)
-                    (EXIT 
-                      (LETT |s2| 
-                        (|EUCDOM-;unitNormalizeIdealElt| |s3| |$|)
-                        |EUCDOM-;extendedEuclidean;2SR;7|)))
-                   NIL 
-                   (GO G190) 
-                   G191 
-                   (EXIT NIL)) 
-                 (COND 
-                   ((NULL (SPADCALL (QVELT |s1| 0) (QREFELT |$| 8)))
-                     (COND 
-                       ((NULL (SPADCALL (QVELT |s1| 0) |y| (QREFELT |$| 28)))
-                         (SEQ 
-                           (LETT |qr| 
-                             (SPADCALL (QVELT |s1| 0) |y| (QREFELT |$| 13))
-                             |EUCDOM-;extendedEuclidean;2SR;7|)
-                           (QSETVELT |s1| 0 (QCDR |qr|))
-                           (QSETVELT |s1| 1 
-                             (SPADCALL 
-                               (QVELT |s1| 1)
-                               (SPADCALL (QCAR |qr|) |x| (QREFELT |$| 24))
-                               (QREFELT |$| 29)))
-                           (EXIT 
-                             (LETT |s1| 
-                               (|EUCDOM-;unitNormalizeIdealElt| |s1| |$|)
-                               |EUCDOM-;extendedEuclidean;2SR;7|)))))))
-               (EXIT |s1|))))))))) 
+(DEFUN |EUCDOM-;extendedEuclidean;2SR;7| (|x| |y| $)
+ (PROG (|s3| |s2| |qr| |s1|)
+  (RETURN
+   (SEQ
+    (LETT |s1|
+     (|EUCDOM-;unitNormalizeIdealElt|
+      (VECTOR (|spadConstant| $ 24) (|spadConstant| $ 16) |x|)
+       $)
+     |EUCDOM-;extendedEuclidean;2SR;7|)
+    (LETT |s2|
+     (|EUCDOM-;unitNormalizeIdealElt|
+      (VECTOR (|spadConstant| $ 16) (|spadConstant| $ 24) |y|)
+      $)
+      |EUCDOM-;extendedEuclidean;2SR;7|)
+    (EXIT
+     (COND
+      ((SPADCALL |y| (QREFELT $ 8)) |s1|)
+      ((SPADCALL |x| (QREFELT $ 8)) |s2|)
+      ((QUOTE T)
+       (SEQ
+        (SEQ
+         G190
+         (COND
+          ((NULL 
+            (COND 
+             ((SPADCALL (QVELT |s2| 2) (QREFELT $ 8)) (QUOTE NIL))
+             ((QUOTE T) (QUOTE T))))
+           (GO G191)))
+         (SEQ
+          (LETT |qr|
+           (SPADCALL (QVELT |s1| 2) (QVELT |s2| 2) (QREFELT $ 13))
+           |EUCDOM-;extendedEuclidean;2SR;7|)
+          (LETT |s3|
+           (VECTOR
+            (SPADCALL (QVELT |s1| 0)
+             (SPADCALL (QCAR |qr|) (QVELT |s2| 0) (QREFELT $ 26))
+             (QREFELT $ 27))
+            (SPADCALL (QVELT |s1| 1)
+             (SPADCALL (QCAR |qr|) (QVELT |s2| 1) (QREFELT $ 26))
+             (QREFELT $ 27))
+            (QCDR |qr|))
+           |EUCDOM-;extendedEuclidean;2SR;7|)
+          (LETT |s1| |s2| |EUCDOM-;extendedEuclidean;2SR;7|)
+          (EXIT
+           (LETT |s2|
+            (|EUCDOM-;unitNormalizeIdealElt| |s3| $)
+            |EUCDOM-;extendedEuclidean;2SR;7|)))
+         NIL
+         (GO G190)
+         G191
+         (EXIT NIL))
+        (COND
+         ((NULL (SPADCALL (QVELT |s1| 0) (QREFELT $ 8)))
+           (COND
+            ((NULL (SPADCALL (QVELT |s1| 0) |y| (QREFELT $ 28)))
+             (SEQ
+              (LETT |qr|
+               (SPADCALL (QVELT |s1| 0) |y| (QREFELT $ 13))
+               |EUCDOM-;extendedEuclidean;2SR;7|)
+              (QSETVELT |s1| 0 (QCDR |qr|))
+              (QSETVELT |s1| 1
+               (SPADCALL (QVELT |s1| 1)
+                (SPADCALL (QCAR |qr|) |x| (QREFELT $ 26)) (QREFELT $ 29)))
+              (EXIT
+               (LETT |s1|
+                (|EUCDOM-;unitNormalizeIdealElt| |s1| $)
+                |EUCDOM-;extendedEuclidean;2SR;7|)))))))
+        (EXIT |s1|))))))))) 
 
 @
 \subsubsection{EUCDOM-;extendedEuclidean;3SU;8}
 <<EUCDOM-;extendedEuclidean;3SU;8>>=
-(DEFUN |EUCDOM-;extendedEuclidean;3SU;8| (|x| |y| |z| |$|) 
-  (PROG (|s| |w| |qr|) 
-    (RETURN 
-      (SEQ 
-        (COND 
-          ((SPADCALL |z| (QREFELT |$| 8))
-             (CONS 0 (CONS (|spadConstant| |$| 26) (|spadConstant| |$| 26))))
-          ((QUOTE T) 
-            (SEQ 
-              (LETT |s| 
-                (SPADCALL |x| |y| (QREFELT |$| 32))
-                |EUCDOM-;extendedEuclidean;3SU;8|)
-              (LETT |w| 
-                (SPADCALL |z| (QVELT |s| 2) (QREFELT |$| 33))
-                |EUCDOM-;extendedEuclidean;3SU;8|)
-              (EXIT 
-                (COND 
-                  ((QEQCAR |w| 1) (CONS 1 "failed"))
-                  ((SPADCALL |y| (QREFELT |$| 8))
-                    (CONS 0 
-                      (CONS 
-                        (SPADCALL (QVELT |s| 0) (QCDR |w|) (QREFELT |$| 24))
-                        (SPADCALL (QVELT |s| 1) (QCDR |w|) (QREFELT |$| 24)))))
-                  ((QUOTE T) 
-                    (SEQ 
-                      (LETT |qr| 
-                        (SPADCALL 
-                          (SPADCALL (QVELT |s| 0) (QCDR |w|) (QREFELT |$| 24))
-                          |y| 
-                          (QREFELT |$| 13))
-                        |EUCDOM-;extendedEuclidean;3SU;8|)
-                      (EXIT 
-                        (CONS 
-                          0 
-                          (CONS 
-                            (QCDR |qr|) 
-                            (SPADCALL 
-                              (SPADCALL 
-                                (QVELT |s| 1)
-                                (QCDR |w|)
-                                (QREFELT |$| 24)) 
-                              (SPADCALL 
-                                (QCAR |qr|)
-                                |x|
-                                (QREFELT |$| 24)) 
-                            (QREFELT |$| 29)))))))))))))))) 
+(DEFUN |EUCDOM-;extendedEuclidean;3SU;8| (|x| |y| |z| $)
+ (PROG (|s| |w| |qr|)
+  (RETURN
+   (SEQ
+    (COND
+     ((SPADCALL |z| (QREFELT $ 8))
+       (CONS 0 (CONS (|spadConstant| $ 16) (|spadConstant| $ 16))))
+     ((QUOTE T)
+       (SEQ
+        (LETT |s|
+         (SPADCALL |x| |y| (QREFELT $ 32))
+         |EUCDOM-;extendedEuclidean;3SU;8|)
+        (LETT |w|
+         (SPADCALL |z| (QVELT |s| 2) (QREFELT $ 33))
+         |EUCDOM-;extendedEuclidean;3SU;8|)
+        (EXIT
+         (COND
+          ((QEQCAR |w| 1) (CONS 1 "failed"))
+          ((SPADCALL |y| (QREFELT $ 8))
+            (CONS 0
+             (CONS (SPADCALL (QVELT |s| 0) (QCDR |w|) (QREFELT $ 26))
+              (SPADCALL (QVELT |s| 1) (QCDR |w|) (QREFELT $ 26)))))
+          ((QUOTE T)
+           (SEQ
+            (LETT |qr|
+             (SPADCALL
+              (SPADCALL (QVELT |s| 0) (QCDR |w|) (QREFELT $ 26))
+              |y|
+              (QREFELT $ 13))
+             |EUCDOM-;extendedEuclidean;3SU;8|)
+            (EXIT
+             (CONS 0
+              (CONS (QCDR |qr|)
+               (SPADCALL
+                (SPADCALL (QVELT |s| 1) (QCDR |w|) (QREFELT $ 26))
+                (SPADCALL (QCAR |qr|) |x| (QREFELT $ 26))
+                (QREFELT $ 29)))))))))))))))) 
 
 @
 \subsubsection{EUCDOM-;principalIdeal;LR;9}
 <<EUCDOM-;principalIdeal;LR;9>>=
-(DEFUN |EUCDOM-;principalIdeal;LR;9| (|l| |$|) 
-  (PROG (|uca| |v| |u| #1=#:G83663 |vv| #2=#:G83664) 
-    (RETURN 
-      (SEQ 
-        (COND 
-          ((SPADCALL |l| NIL (QREFELT |$| 38))
-             (|error| "empty list passed to principalIdeal"))
-          ((SPADCALL (CDR |l|) NIL (QREFELT |$| 38))
-             (SEQ 
-               (LETT |uca| 
-                 (SPADCALL (|SPADfirst| |l|) (QREFELT |$| 22))
-                 |EUCDOM-;principalIdeal;LR;9|)
-               (EXIT (CONS (LIST (QVELT |uca| 0)) (QVELT |uca| 1)))))
-          ((SPADCALL (CDR (CDR |l|)) NIL (QREFELT |$| 38))
-             (SEQ 
-               (LETT |u| 
-                 (SPADCALL 
-                   (|SPADfirst| |l|)
-                   (SPADCALL |l| (QREFELT |$| 39))
-                   (QREFELT |$| 32))
-                 |EUCDOM-;principalIdeal;LR;9|)
-               (EXIT 
-                 (CONS (LIST (QVELT |u| 0) (QVELT |u| 1)) (QVELT |u| 2)))))
-          ((QUOTE T) 
-            (SEQ 
-              (LETT |v| 
-                (SPADCALL (CDR |l|) (QREFELT |$| 42))
-                |EUCDOM-;principalIdeal;LR;9|)
-              (LETT |u| 
-                (SPADCALL (|SPADfirst| |l|) (QCDR |v|) (QREFELT |$| 32))
-                |EUCDOM-;principalIdeal;LR;9|)
-              (EXIT 
-                (CONS 
-                  (CONS 
-                    (QVELT |u| 0)
-                    (PROGN 
-                      (LETT #1# NIL |EUCDOM-;principalIdeal;LR;9|)
-                      (SEQ 
-                        (LETT |vv| NIL |EUCDOM-;principalIdeal;LR;9|)
-                        (LETT #2# (QCAR |v|) |EUCDOM-;principalIdeal;LR;9|)
-                        G190
-                        (COND 
-                          ((OR 
-                              (ATOM #2#)
-                              (PROGN 
-                                (LETT |vv| 
-                                  (CAR #2#) 
-                                  |EUCDOM-;principalIdeal;LR;9|) 
-                                NIL))
-                            (GO G191)))
-                        (SEQ 
-                          (EXIT 
-                            (LETT #1# 
-                              (CONS 
-                                (SPADCALL 
-                                  (QVELT |u| 1) 
-                                  |vv| 
-                                  (QREFELT |$| 24)) 
-                                #1#)
-                              |EUCDOM-;principalIdeal;LR;9|)))
-                        (LETT #2# (CDR #2#) |EUCDOM-;principalIdeal;LR;9|)
-                        (GO G190)
-                        G191
-                        (EXIT (NREVERSE0 #1#)))))
-                  (QVELT |u| 2)))))))))) 
+(DEFUN |EUCDOM-;principalIdeal;LR;9| (|l| $)
+ (PROG (|uca| |v| |u| #0=#:G1497 |vv| #1=#:G1498)
+  (RETURN
+   (SEQ
+    (COND
+     ((SPADCALL |l| NIL (QREFELT $ 38))
+       (|error| "empty list passed to principalIdeal"))
+     ((SPADCALL (CDR |l|) NIL (QREFELT $ 38))
+       (SEQ
+        (LETT |uca|
+         (SPADCALL (|SPADfirst| |l|) (QREFELT $ 23))
+         |EUCDOM-;principalIdeal;LR;9|)
+        (EXIT (CONS (LIST (QVELT |uca| 0)) (QVELT |uca| 1)))))
+     ((SPADCALL (CDR (CDR |l|)) NIL (QREFELT $ 38))
+       (SEQ
+        (LETT |u|
+         (SPADCALL (|SPADfirst| |l|)
+          (SPADCALL |l| (QREFELT $ 39)) (QREFELT $ 32))
+         |EUCDOM-;principalIdeal;LR;9|)
+        (EXIT (CONS (LIST (QVELT |u| 0) (QVELT |u| 1)) (QVELT |u| 2)))))
+     ((QUOTE T)
+       (SEQ
+        (LETT |v|
+         (SPADCALL (CDR |l|) (QREFELT $ 42))
+         |EUCDOM-;principalIdeal;LR;9|)
+        (LETT |u|
+         (SPADCALL (|SPADfirst| |l|) (QCDR |v|) (QREFELT $ 32))
+         |EUCDOM-;principalIdeal;LR;9|)
+        (EXIT
+         (CONS 
+          (CONS (QVELT |u| 0)
+           (PROGN
+            (LETT #0# NIL |EUCDOM-;principalIdeal;LR;9|)
+            (SEQ
+             (LETT |vv| NIL |EUCDOM-;principalIdeal;LR;9|)
+             (LETT #1# (QCAR |v|) |EUCDOM-;principalIdeal;LR;9|)
+             G190
+             (COND
+              ((OR (ATOM #1#)
+                   (PROGN
+                    (LETT |vv| (CAR #1#) |EUCDOM-;principalIdeal;LR;9|) NIL))
+               (GO G191)))
+             (SEQ
+              (EXIT
+               (LETT #0#
+                (CONS (SPADCALL (QVELT |u| 1) |vv| (QREFELT $ 26))
+                   #0#)
+                |EUCDOM-;principalIdeal;LR;9|)))
+             (LETT #1# (CDR #1#)
+              |EUCDOM-;principalIdeal;LR;9|)
+             (GO G190)
+             G191
+             (EXIT (NREVERSE0 #0#)))))
+          (QVELT |u| 2)))))))))) 
+
 @
 \subsubsection{EUCDOM-;expressIdealMember;LSU;10}
 <<EUCDOM-;expressIdealMember;LSU;10>>=
-(DEFUN |EUCDOM-;expressIdealMember;LSU;10| (|l| |z| |$|) 
-  (PROG (#1=#:G83681 #2=#:G83682 |pid| |q| #3=#:G83679 |v| #4=#:G83680) 
-    (RETURN 
-      (SEQ 
-        (COND 
-          ((SPADCALL |z| (|spadConstant| |$| 26) (QREFELT |$| 44))
-             (CONS 
-               0 
-               (PROGN 
-                 (LETT #1# NIL |EUCDOM-;expressIdealMember;LSU;10|)
-                 (SEQ 
-                   (LETT |v| NIL |EUCDOM-;expressIdealMember;LSU;10|)
-                   (LETT #2# |l| |EUCDOM-;expressIdealMember;LSU;10|)
-                   G190 
-                   (COND 
-                     ((OR 
-                        (ATOM #2#)
-                        (PROGN 
-                          (LETT |v| 
-                            (CAR #2#) 
-                            |EUCDOM-;expressIdealMember;LSU;10|) 
-                          NIL))
-                       (GO G191)))
-                   (SEQ 
-                     (EXIT 
-                       (LETT #1# 
-                         (CONS (|spadConstant| |$| 26) #1#)
-                         |EUCDOM-;expressIdealMember;LSU;10|)))
-                   (LETT #2# (CDR #2#) |EUCDOM-;expressIdealMember;LSU;10|)
-                   (GO G190)
-                   G191
-                   (EXIT (NREVERSE0 #1#))))))
-          ((QUOTE T) 
-            (SEQ 
-              (LETT |pid| 
-                (SPADCALL |l| (QREFELT |$| 42))
-                |EUCDOM-;expressIdealMember;LSU;10|)
-              (LETT |q| 
-                (SPADCALL |z| (QCDR |pid|) (QREFELT |$| 33))
-                |EUCDOM-;expressIdealMember;LSU;10|)
-              (EXIT 
-                (COND 
-                  ((QEQCAR |q| 1) (CONS 1 "failed"))
-                  ((QUOTE T) 
-                    (CONS 
-                      0 
-                      (PROGN 
-                        (LETT #3# NIL |EUCDOM-;expressIdealMember;LSU;10|)
-                        (SEQ 
-                          (LETT |v| NIL |EUCDOM-;expressIdealMember;LSU;10|)
-                          (LETT #4# (QCAR |pid|) |EUCDOM-;expressIdealMember;LSU;10|)
-                          G190
-                          (COND 
-                            ((OR 
-                               (ATOM #4#)
-                               (PROGN 
-                                 (LETT |v| 
-                                   (CAR #4#) 
-                                   |EUCDOM-;expressIdealMember;LSU;10|) 
-                                 NIL))
-                              (GO G191)))
-                          (SEQ 
-                            (EXIT 
-                              (LETT #3# 
-                                (CONS 
-                                  (SPADCALL (QCDR |q|) |v| (QREFELT |$| 24))
-                                   #3#)
-                                |EUCDOM-;expressIdealMember;LSU;10|)))
-                          (LETT #4# 
-                            (CDR #4#) 
-                            |EUCDOM-;expressIdealMember;LSU;10|)
-                          (GO G190)
-                          G191
-                          (EXIT (NREVERSE0 #3#))))))))))))))) 
+(DEFUN |EUCDOM-;expressIdealMember;LSU;10| (|l| |z| $)
+ (PROG (#0=#:G1513 #1=#:G1514 |pid| |q| #2=#:G1515 |v| #3=#:G1516)
+  (RETURN
+   (SEQ
+    (COND
+     ((SPADCALL |z| (|spadConstant| $ 16) (QREFELT $ 25))
+      (CONS 0
+       (PROGN
+        (LETT #0# NIL |EUCDOM-;expressIdealMember;LSU;10|)
+        (SEQ
+         (LETT |v| NIL |EUCDOM-;expressIdealMember;LSU;10|)
+         (LETT #1# |l| |EUCDOM-;expressIdealMember;LSU;10|)
+         G190
+         (COND
+          ((OR (ATOM #1#)
+               (PROGN
+                (LETT |v| (CAR #1#) |EUCDOM-;expressIdealMember;LSU;10|) NIL))
+           (GO G191)))
+         (SEQ 
+          (EXIT
+           (LETT #0#
+            (CONS (|spadConstant| $ 16) #0#)
+            |EUCDOM-;expressIdealMember;LSU;10|)))
+         (LETT #1# (CDR #1#) |EUCDOM-;expressIdealMember;LSU;10|)
+         (GO G190)
+         G191
+        (EXIT (NREVERSE0 #0#))))))
+     ((QUOTE T)
+      (SEQ
+       (LETT |pid|
+        (SPADCALL |l| (QREFELT $ 42))
+        |EUCDOM-;expressIdealMember;LSU;10|)
+       (LETT |q|
+        (SPADCALL |z| (QCDR |pid|) (QREFELT $ 33))
+        |EUCDOM-;expressIdealMember;LSU;10|)
+       (EXIT
+        (COND
+         ((QEQCAR |q| 1) (CONS 1 "failed"))
+         ((QUOTE T)
+          (CONS 0
+           (PROGN
+            (LETT #2# NIL |EUCDOM-;expressIdealMember;LSU;10|)
+            (SEQ
+             (LETT |v| NIL |EUCDOM-;expressIdealMember;LSU;10|)
+             (LETT #3# (QCAR |pid|) |EUCDOM-;expressIdealMember;LSU;10|)
+             G190
+             (COND
+              ((OR (ATOM #3#)
+                   (PROGN
+                    (LETT |v| (CAR #3#) |EUCDOM-;expressIdealMember;LSU;10|)
+                    NIL))
+               (GO G191)))
+             (SEQ
+              (EXIT
+              (LETT #2#
+               (CONS (SPADCALL (QCDR |q|) |v| (QREFELT $ 26))
+                  #2#) 
+               |EUCDOM-;expressIdealMember;LSU;10|)))
+             (LETT #3# (CDR #3#) |EUCDOM-;expressIdealMember;LSU;10|)
+             (GO G190)
+             G191
+             (EXIT (NREVERSE0 #2#))))))))))))))) 
 
 @
 \subsubsection{EUCDOM-;multiEuclidean;LSU;11}
 <<EUCDOM-;multiEuclidean;LSU;11>>=
-(DEFUN |EUCDOM-;multiEuclidean;LSU;11| (|l| |z| |$|) 
-  (PROG (|n| |l1| |l2| #1=#:G83565 #2=#:G83702 #3=#:G83688 #4=#:G83686 
-         #5=#:G83687 #6=#:G83566 #7=#:G83701 #8=#:G83691 #9=#:G83689 
-         #10=#:G83690 |u| |v1| |v2|) 
-    (RETURN 
-      (SEQ 
-        (LETT |n| (LENGTH |l|) |EUCDOM-;multiEuclidean;LSU;11|)
-        (EXIT 
-          (COND 
-            ((ZEROP |n|) (|error| "empty list passed to multiEuclidean"))
-            ((EQL |n| 1) (CONS 0 (LIST |z|)))
-            ((QUOTE T) 
-              (SEQ 
-                (LETT |l1| 
-                  (SPADCALL |l| (QREFELT |$| 47))
-                  |EUCDOM-;multiEuclidean;LSU;11|)
-                (LETT |l2| 
-                  (SPADCALL |l1| (QUOTIENT2 |n| 2) (QREFELT |$| 49))
-                  |EUCDOM-;multiEuclidean;LSU;11|)
-                (LETT |u| 
-                  (SPADCALL 
-                    (PROGN 
-                      (LETT #5# NIL |EUCDOM-;multiEuclidean;LSU;11|)
-                      (SEQ 
-                        (LETT #1# NIL |EUCDOM-;multiEuclidean;LSU;11|)
-                        (LETT #2# |l1| |EUCDOM-;multiEuclidean;LSU;11|)
-                        G190
-                        (COND 
-                          ((OR 
-                            (ATOM #2#)
-                            (PROGN 
-                              (LETT #1# 
-                                (CAR #2#) 
-                                |EUCDOM-;multiEuclidean;LSU;11|) 
-                              NIL))
-                            (GO G191)))
-                        (SEQ 
-                          (EXIT 
-                            (PROGN 
-                              (LETT #3# #1# |EUCDOM-;multiEuclidean;LSU;11|)
-                              (COND 
-                                (#5# 
-                                  (LETT #4# 
-                                    (SPADCALL #4# #3# (QREFELT |$| 24)) 
-                                    |EUCDOM-;multiEuclidean;LSU;11|))
-                                ((QUOTE T) 
-                                  (PROGN 
-                                    (LETT #4# 
-                                      #3# 
-                                      |EUCDOM-;multiEuclidean;LSU;11|) 
-                                    (LETT #5# 
-                                      (QUOTE T) 
-                                      |EUCDOM-;multiEuclidean;LSU;11|)))))))
-                        (LETT #2# (CDR #2#) |EUCDOM-;multiEuclidean;LSU;11|)
-                        (GO G190)
-                        G191
-                        (EXIT NIL))
-                      (COND (#5# #4#) ((QUOTE T) (|spadConstant| |$| 25))))
-                    (PROGN 
-                      (LETT #10# NIL |EUCDOM-;multiEuclidean;LSU;11|)
-                      (SEQ 
-                        (LETT #6# NIL |EUCDOM-;multiEuclidean;LSU;11|)
-                        (LETT #7# |l2| |EUCDOM-;multiEuclidean;LSU;11|)
-                        G190
-                        (COND 
-                          ((OR 
-                             (ATOM #7#) 
-                             (PROGN 
-                               (LETT #6# 
-                                 (CAR #7#) 
-                                 |EUCDOM-;multiEuclidean;LSU;11|) 
-                               NIL))
-                            (GO G191)))
-                        (SEQ 
-                          (EXIT 
-                            (PROGN 
-                              (LETT #8# #6# |EUCDOM-;multiEuclidean;LSU;11|)
-                              (COND 
-                                (#10# 
-                                  (LETT #9# 
-                                    (SPADCALL #9# #8# (QREFELT |$| 24)) 
-                                    |EUCDOM-;multiEuclidean;LSU;11|))
-                                ((QUOTE T) 
-                                  (PROGN 
-                                    (LETT #9# 
-                                      #8# 
-                                      |EUCDOM-;multiEuclidean;LSU;11|)
-                                    (LETT #10# 
-                                      (QUOTE T) 
-                                      |EUCDOM-;multiEuclidean;LSU;11|)))))))
-                        (LETT #7# (CDR #7#) |EUCDOM-;multiEuclidean;LSU;11|)
-                        (GO G190)
-                        G191
-                        (EXIT NIL))
-                      (COND 
-                        (#10# #9#) 
-                        ((QUOTE T) (|spadConstant| |$| 25))))
-                    |z| 
-                    (QREFELT |$| 50))
-                  |EUCDOM-;multiEuclidean;LSU;11|)
-                (EXIT 
-                  (COND 
-                    ((QEQCAR |u| 1) (CONS 1 "failed"))
-                    ((QUOTE T) 
-                      (SEQ 
-                        (LETT |v1| 
-                          (SPADCALL |l1| (QCDR (QCDR |u|)) (QREFELT |$| 51))
-                          |EUCDOM-;multiEuclidean;LSU;11|)
-                        (EXIT 
-                          (COND 
-                            ((QEQCAR |v1| 1) (CONS 1 "failed"))
-                            ((QUOTE T) 
-                              (SEQ 
-                                (LETT |v2| 
-                                  (SPADCALL 
-                                    |l2| 
-                                    (QCAR (QCDR |u|))
-                                    (QREFELT |$| 51))
-                                  |EUCDOM-;multiEuclidean;LSU;11|)
-                                (EXIT 
-                                  (COND 
-                                   ((QEQCAR |v2| 1) (CONS 1 "failed"))
-                                   ((QUOTE T) 
-                                     (CONS 
-                                       0 
-                                       (SPADCALL 
-                                         (QCDR |v1|) 
-                                         (QCDR |v2|) 
-                                         (QREFELT |$| 52)))))))))))))))))))))) 
+(DEFUN |EUCDOM-;multiEuclidean;LSU;11| (|l| |z| $)
+ (PROG (|n| |l1| |l2| #0=#:G1405 #1=#:G1535 #2=#:G1522 #3=#:G1520 
+        #4=#:G1521 #5=#:G1406 #6=#:G1536 #7=#:G1525 #8=#:G1523 #9=#:G1524 
+        |u| |v1| |v2|)
+  (RETURN
+   (SEQ
+    (LETT |n| (LENGTH |l|) |EUCDOM-;multiEuclidean;LSU;11|)
+    (EXIT
+     (COND
+      ((ZEROP |n|) (|error| "empty list passed to multiEuclidean"))
+      ((EQL |n| 1) (CONS 0 (LIST |z|)))
+      ((QUOTE T)
+       (SEQ
+        (LETT |l1|
+         (SPADCALL |l| (QREFELT $ 46)) |EUCDOM-;multiEuclidean;LSU;11|)
+        (LETT |l2|
+         (SPADCALL |l1| (QUOTIENT2 |n| 2) (QREFELT $ 48))
+         |EUCDOM-;multiEuclidean;LSU;11|)
+        (LETT |u|
+         (SPADCALL
+          (PROGN
+           (LETT #4# NIL |EUCDOM-;multiEuclidean;LSU;11|)
+           (SEQ
+            (LETT #0# NIL |EUCDOM-;multiEuclidean;LSU;11|)
+            (LETT #1# |l1| |EUCDOM-;multiEuclidean;LSU;11|)
+            G190
+            (COND
+             ((OR (ATOM #1#)
+                  (PROGN
+                   (LETT #0# (CAR #1#) |EUCDOM-;multiEuclidean;LSU;11|)
+                   NIL))
+              (GO G191)))
+            (SEQ 
+             (EXIT
+              (PROGN
+               (LETT #2# #0# |EUCDOM-;multiEuclidean;LSU;11|)
+               (COND
+                (#4#
+                 (LETT #3#
+                  (SPADCALL #3# #2# (QREFELT $ 26))
+                  |EUCDOM-;multiEuclidean;LSU;11|))
+                ((QUOTE T)
+                 (PROGN
+                  (LETT #3# #2# |EUCDOM-;multiEuclidean;LSU;11|)
+                  (LETT #4# (QUOTE T) |EUCDOM-;multiEuclidean;LSU;11|)))))))
+            (LETT #1# (CDR #1#) |EUCDOM-;multiEuclidean;LSU;11|)
+            (GO G190)
+            G191
+            (EXIT NIL))
+           (COND (#4# #3#) ((QUOTE T) (|spadConstant| $ 24))))
+          (PROGN
+           (LETT #9# NIL |EUCDOM-;multiEuclidean;LSU;11|)
+           (SEQ
+            (LETT #5# NIL |EUCDOM-;multiEuclidean;LSU;11|)
+            (LETT #6# |l2| |EUCDOM-;multiEuclidean;LSU;11|)
+            G190
+            (COND
+             ((OR (ATOM #6#)
+                  (PROGN
+                   (LETT #5# (CAR #6#) |EUCDOM-;multiEuclidean;LSU;11|)
+                   NIL))
+              (GO G191)))
+            (SEQ
+             (EXIT
+              (PROGN
+               (LETT #7# #5# |EUCDOM-;multiEuclidean;LSU;11|)
+               (COND
+                (#9#
+                 (LETT #8#
+                  (SPADCALL #8# #7# (QREFELT $ 26))
+                  |EUCDOM-;multiEuclidean;LSU;11|))
+                ((QUOTE T)
+                 (PROGN
+                  (LETT #8# #7# |EUCDOM-;multiEuclidean;LSU;11|)
+                  (LETT #9# (QUOTE T) |EUCDOM-;multiEuclidean;LSU;11|)))))))
+            (LETT #6# (CDR #6#) |EUCDOM-;multiEuclidean;LSU;11|)
+            (GO G190)
+            G191
+            (EXIT NIL))
+           (COND (#9# #8#) ((QUOTE T) (|spadConstant| $ 24))))
+          |z| (QREFELT $ 49))
+         |EUCDOM-;multiEuclidean;LSU;11|)
+        (EXIT
+         (COND
+          ((QEQCAR |u| 1) (CONS 1 "failed"))
+          ((QUOTE T)
+           (SEQ
+            (LETT |v1|
+             (SPADCALL |l1| (QCDR (QCDR |u|)) (QREFELT $ 50))
+             |EUCDOM-;multiEuclidean;LSU;11|)
+            (EXIT
+             (COND
+              ((QEQCAR |v1| 1) (CONS 1 "failed"))
+              ((QUOTE T)
+               (SEQ
+                (LETT |v2|
+                 (SPADCALL |l2| (QCAR (QCDR |u|)) (QREFELT $ 50))
+                 |EUCDOM-;multiEuclidean;LSU;11|)
+                (EXIT
+                 (COND
+                  ((QEQCAR |v2| 1) (CONS 1 "failed"))
+                  ((QUOTE T)
+                   (CONS 0
+                    (SPADCALL
+                     (QCDR |v1|)
+                     (QCDR |v2|)
+                     (QREFELT $ 51)))))))))))))))))))))) 
 
 @
 \subsubsection{EuclideanDomain\&}
 <<EuclideanDomainAmp>>=
-(DEFUN |EuclideanDomain&| (|#1|) 
-  (PROG (|DV$1| |dv$| |$| |pv$|) 
-    (RETURN 
-      (PROGN 
-        (LETT |DV$1| (|devaluate| |#1|) . #1=(|EuclideanDomain&|))
-        (LETT |dv$| (LIST (QUOTE |EuclideanDomain&|) |DV$1|) . #1#)
-        (LETT |$| (GETREFV 54) . #1#)
-        (QSETREFV |$| 0 |dv$|)
-        (QSETREFV |$| 3 (LETT |pv$| (|buildPredVector| 0 0 NIL) . #1#))
-        (|stuffDomainSlots| |$|)
-        (QSETREFV |$| 6 |#1|)
-        |$|)))) 
+(DEFUN |EuclideanDomain&| (|#1|)
+ (PROG (DV$1 |dv$| $ |pv$|)
+  (RETURN
+   (PROGN 
+    (LETT DV$1 (|devaluate| |#1|) . #0=(|EuclideanDomain&|))
+    (LETT |dv$| (LIST (QUOTE |EuclideanDomain&|) DV$1) . #0#)
+    (LETT $ (GETREFV 53) . #0#)
+    (QSETREFV $ 0 |dv$|)
+    (QSETREFV $ 3 (LETT |pv$| (|buildPredVector| 0 0 NIL) . #0#))
+    (|stuffDomainSlots| $)
+    (QSETREFV $ 6 |#1|)
+    $)))) 
 
 @
 \subsubsection{EUCDOM-;MAKEPROP}
 <<EUCDOM-;MAKEPROP>>=
-(MAKEPROP 
-  (QUOTE |EuclideanDomain&|)
-  (QUOTE |infovec|)
-  (LIST 
-    (QUOTE 
-      #(NIL NIL NIL NIL NIL NIL 
-        (|local| |#1|)
-        (|Boolean|)
-        (0 . |zero?|)
-        (|NonNegativeInteger|)
-        (5 . |euclideanSize|)
-        |EUCDOM-;sizeLess?;2SB;1| 
-        (|Record| (|:| |quotient| |$|) (|:| |remainder| |$|))
-        (10 . |divide|)
-        |EUCDOM-;quo;3S;2| 
-        |EUCDOM-;rem;3S;3| 
-        (|Union| |$| (QUOTE "failed"))
-        |EUCDOM-;exquo;2SU;4| 
-        (16 . |unitCanonical|)
-        (21 . |rem|)
-        |EUCDOM-;gcd;3S;5| 
-        (|Record| (|:| |unit| |$|) (|:| |canonical| |$|) (|:| |associate| |$|))
-        (27 . |unitNormal|)
-        (32 . |one?|)
-        (37 . |*|)
-        (43 . |One|)
-        (47 . |Zero|)
-        (51 . |-|)
-        (57 . |sizeLess?|)
-        (63 . |+|)
-        (|Record| (|:| |coef1| |$|) (|:| |coef2| |$|) (|:| |generator| |$|))
-        |EUCDOM-;extendedEuclidean;2SR;7| 
-        (69 . |extendedEuclidean|)
-        (75 . |exquo|)
-        (|Record| (|:| |coef1| |$|) (|:| |coef2| |$|))
-        (|Union| 34 (QUOTE "failed"))
-        |EUCDOM-;extendedEuclidean;3SU;8| 
-        (|List| 6)
-        (81 . |=|)
-        (87 . |second|)
-        (|Record| (|:| |coef| 41) (|:| |generator| |$|))
-        (|List| |$|)
-        (92 . |principalIdeal|)
-        |EUCDOM-;principalIdeal;LR;9| 
-        (97 . |=|)
-        (|Union| 41 (QUOTE "failed"))
-        |EUCDOM-;expressIdealMember;LSU;10| 
-        (103 . |copy|)
-        (|Integer|)
-        (108 . |split!|)
-        (114 . |extendedEuclidean|)
-        (121 . |multiEuclidean|)
-        (127 . |concat|)
-        |EUCDOM-;multiEuclidean;LSU;11|)) 
-    (QUOTE 
-      #(|sizeLess?| 133 |rem| 139 |quo| 145 |principalIdeal| 151 
-        |multiEuclidean| 156 |gcd| 162 |extendedEuclidean| 168 |exquo| 181 
-        |expressIdealMember| 187)) 
-    (QUOTE NIL) 
-    (CONS 
-      (|makeByteWordVec2| 1 (QUOTE NIL))
-      (CONS 
-        (QUOTE #()) 
-        (CONS 
-          (QUOTE #()) 
-          (|makeByteWordVec2| 53 
-            (QUOTE 
-              (1 6 7 0 8 1 6 9 0 10 2 6 12 0 0 13 1 6 0 0 18 2 6 0 0 0 19 1 6
-               21 0 22 1 6 7 0 23 2 6 0 0 0 24 0 6 0 25 0 6 0 26 2 6 0 0 0 27
-               2 6 7 0 0 28 2 6 0 0 0 29 2 6 30 0 0 32 2 6 16 0 0 33 2 37 7 0
-               0 38 1 37 6 0 39 1 6 40 41 42 2 6 7 0 0 44 1 37 0 0 47 2 37 0 0
-               48 49 3 6 35 0 0 0 50 2 6 45 41 0 51 2 37 0 0 0 52 2 0 7 0 0 11
-               2 0 0 0 0 15 2 0 0 0 0 14 1 0 40 41 43 2 0 45 41 0 53 2 0 0 0 0
-               20 3 0 35 0 0 0 36 2 0 30 0 0 31 2 0 16 0 0 17 2 0 45 41 0
-               46)))))) 
-    (QUOTE |lookupComplete|))) 
+(MAKEPROP
+ (QUOTE |EuclideanDomain&|)
+ (QUOTE |infovec|)
+ (LIST
+  (QUOTE #(NIL NIL NIL NIL NIL NIL (|local| |#1|) (|Boolean|) (0 . |zero?|)
+  (|NonNegativeInteger|) (5 . |euclideanSize|) |EUCDOM-;sizeLess?;2SB;1|
+  (|Record| (|:| |quotient| $) (|:| |remainder| $)) (10 . |divide|)
+  |EUCDOM-;quo;3S;2| |EUCDOM-;rem;3S;3| (16 . |Zero|)
+  (|Union| $ (QUOTE "failed")) |EUCDOM-;exquo;2SU;4| (20 . |unitCanonical|)
+  (25 . |rem|) |EUCDOM-;gcd;3S;5|
+  (|Record| (|:| |unit| $) (|:| |canonical| $) (|:| |associate| $))
+  (31 . |unitNormal|) (36 . |One|) (40 . =) (46 . *) (52 . -)
+  (58 . |sizeLess?|) (64 . +) 
+  (|Record| (|:| |coef1| $) (|:| |coef2| $) (|:| |generator| $))
+  |EUCDOM-;extendedEuclidean;2SR;7|
+  (70 . |extendedEuclidean|) (76 . |exquo|) 
+  (|Record| (|:| |coef1| $) (|:| |coef2| $))
+  (|Union| 34 (QUOTE "failed")) |EUCDOM-;extendedEuclidean;3SU;8|
+  (|List| 6) (82 . =) (88 . |second|) 
+  (|Record| (|:| |coef| 41) (|:| |generator| $))
+  (|List| $) (93 . |principalIdeal|) |EUCDOM-;principalIdeal;LR;9| 
+  (|Union| 41 (QUOTE "failed")) |EUCDOM-;expressIdealMember;LSU;10|
+  (98 . |copy|) (|Integer|) (103 . |split!|) (109 . |extendedEuclidean|)
+  (116 . |multiEuclidean|) (122 . |concat|) |EUCDOM-;multiEuclidean;LSU;11|))
+  (QUOTE
+   #(|sizeLess?| 128 |rem| 134 |quo| 140 |principalIdeal| 146 
+     |multiEuclidean| 151 |gcd| 157 |extendedEuclidean| 163 
+     |exquo| 176 |expressIdealMember| 182))
+  (QUOTE NIL)
+  (CONS (|makeByteWordVec2| 1 (QUOTE NIL))
+   (CONS (QUOTE #())
+    (CONS (QUOTE #())
+     (|makeByteWordVec2| 52 (QUOTE (1 6 7 0 8 1 6 9 0 10 2 6 12 0 0 13 0 
+       6 0 16 1 6 0 0 19 2 6 0 0 0 20 1 6 22 0 23 0 6 0 24 2 6 7 0 0 25 2 6 0 
+       0 0 26 2 6 0 0 0 27 2 6 7 0 0 28 2 6 0 0 0 29 2 6 30 0 0 32 2 6 17 0 0 
+       33 2 37 7 0 0 38 1 37 6 0 39 1 6 40 41 42 1 37 0 0 46 2 37 0 0 47 48 3 
+       6 35 0 0 0 49 2 6 44 41 0 50 2 37 0 0 0 51 2 0 7 0 0 11 2 0 0 0 0 15 2 
+       0 0 0 0 14 1 0 40 41 43 2 0 44 41 0 52 2 0 0 0 0 21 3 0 35 0 0 0 36 2 0 
+       30 0 0 31 2 0 17 0 0 18 2 0 44 41 0 45))))))
+  (QUOTE |lookupComplete|))) 
 
 @
 <<EUCDOM-.lsp BOOTSTRAP>>=
diff --git a/src/algebra/polycat.spad.pamphlet b/src/algebra/polycat.spad.pamphlet
index 01cbbcc..d1e38b7 100644
--- a/src/algebra/polycat.spad.pamphlet
+++ b/src/algebra/polycat.spad.pamphlet
@@ -568,8 +568,10 @@ PolynomialCategory(R:Ring, E:OrderedAbelianMonoidSup, VarSet:OrderedSet):
         unit(s := squareFree p) * */[f.factor for f in factors s]
       content(p,v) == content univariate(p,v)
       primitivePart p ==
+        zero? p => p
         unitNormal((p exquo content p) ::%).canonical
       primitivePart(p,v) ==
+        zero? p => p
         unitNormal((p exquo content(p,v)) ::%).canonical
     if R has OrderedSet then
       p:% < q:% ==
@@ -617,171 +619,125 @@ Note that this code is not included in the generated catdef.spad file.
 
 <<POLYCAT.lsp BOOTSTRAP>>=
 
-(|/VERSIONCHECK| 2) 
+(/VERSIONCHECK 2) 
 
 (SETQ |PolynomialCategory;CAT| (QUOTE NIL)) 
 
 (SETQ |PolynomialCategory;AL| (QUOTE NIL)) 
 
-(DEFUN |PolynomialCategory| (|&REST| #1=#:G101841 |&AUX| #2=#:G101839) 
-  (DSETQ #2# #1#)
-  (LET (#3=#:G101840) 
-    (COND 
-      ((SETQ #3# (|assoc| (|devaluateList| #2#) |PolynomialCategory;AL|))
-        (CDR #3#))
-      (T 
-        (SETQ |PolynomialCategory;AL| 
-          (|cons5| 
-            (CONS 
-              (|devaluateList| #2#)
-              (SETQ #3# (APPLY (FUNCTION |PolynomialCategory;|) #2#)))
-            |PolynomialCategory;AL|))
-        #3#)))) 
-
-(DEFUN |PolynomialCategory;| (|t#1| |t#2| |t#3|) 
-  (PROG (#1=#:G101838) 
-    (RETURN 
-      (PROG1 
-        (LETT #1# 
-          (|sublisV| 
-            (PAIR 
-              (QUOTE (|t#1| |t#2| |t#3|))
-              (LIST 
-                (|devaluate| |t#1|)
-                (|devaluate| |t#2|)
-                (|devaluate| |t#3|)))
-            (COND 
-              (|PolynomialCategory;CAT|)
-              ((QUOTE T)
-                (LETT |PolynomialCategory;CAT| 
-                  (|Join| 
-                    (|PartialDifferentialRing| (QUOTE |t#3|))
-                    (|FiniteAbelianMonoidRing| (QUOTE |t#1|) (QUOTE |t#2|))
-                    (|Evalable| (QUOTE |$|))
-                    (|InnerEvalable| (QUOTE |t#3|) (QUOTE |t#1|))
-                    (|InnerEvalable| (QUOTE |t#3|) (QUOTE |$|))
-                    (|RetractableTo| (QUOTE |t#3|))
-                    (|FullyLinearlyExplicitRingOver| (QUOTE |t#1|))
-                    (|mkCategory| 
-                      (QUOTE |domain|)
-                      (QUOTE (
-                        ((|degree| ((|NonNegativeInteger|) |$| |t#3|)) T)
-                        ((|degree| 
-                           ((|List| (|NonNegativeInteger|))
-                             |$| 
-                             (|List| |t#3|))) T)
-                        ((|coefficient| 
-                           (|$| |$| |t#3| (|NonNegativeInteger|))) T)
-                        ((|coefficient| 
-                           (|$| 
-                            |$| 
-                            (|List| |t#3|)
-                            (|List| (|NonNegativeInteger|)))) T)
-                        ((|monomials| ((|List| |$|) |$|)) T)
-                        ((|univariate| 
-                           ((|SparseUnivariatePolynomial| |$|) |$| |t#3|)) T)
-                        ((|univariate| 
-                           ((|SparseUnivariatePolynomial| |t#1|) |$|)) T)
-                        ((|mainVariable| ((|Union| |t#3| "failed") |$|)) T)
-                        ((|minimumDegree| 
-                           ((|NonNegativeInteger|) |$| |t#3|)) T)
-                        ((|minimumDegree| 
-                           ((|List| (|NonNegativeInteger|))
-                            |$| 
-                            (|List| |t#3|))) T)
-                        ((|monicDivide| 
-                           ((|Record| 
-                              (|:| |quotient| |$|)
-                              (|:| |remainder| |$|))
-                            |$| 
-                            |$| 
-                            |t#3|)) T)
-                        ((|monomial| (|$| |$| |t#3| (|NonNegativeInteger|))) T)
-                        ((|monomial| 
-                           (|$| 
-                            |$| 
-                            (|List| |t#3|)
-                            (|List| (|NonNegativeInteger|)))) T)
-                        ((|multivariate| 
-                           (|$| (|SparseUnivariatePolynomial| |t#1|) |t#3|)) T)
-                        ((|multivariate| 
-                           (|$| (|SparseUnivariatePolynomial| |$|) |t#3|)) T)
-                        ((|isPlus| ((|Union| (|List| |$|) "failed") |$|)) T)
-                        ((|isTimes| ((|Union| (|List| |$|) "failed") |$|)) T)
-                        ((|isExpt| 
-                           ((|Union| 
-                              (|Record| 
-                                (|:| |var| |t#3|)
-                                (|:| |exponent| (|NonNegativeInteger|)))
-                              "failed")
-                             |$|)) T)
-                        ((|totalDegree| ((|NonNegativeInteger|) |$|)) T)
-                        ((|totalDegree| 
-                          ((|NonNegativeInteger|) |$| (|List| |t#3|))) T)
-                        ((|variables| ((|List| |t#3|) |$|)) T)
-                        ((|primitiveMonomials| ((|List| |$|) |$|)) T)
-                        ((|resultant| (|$| |$| |$| |t#3|))
-                          (|has| |t#1| (|CommutativeRing|)))
-                        ((|discriminant| (|$| |$| |t#3|)) 
-                          (|has| |t#1| (|CommutativeRing|)))
-                        ((|content| (|$| |$| |t#3|)) 
-                          (|has| |t#1| (|GcdDomain|)))
-                        ((|primitivePart| (|$| |$|)) 
-                          (|has| |t#1| (|GcdDomain|)))
-                        ((|primitivePart| (|$| |$| |t#3|)) 
-                          (|has| |t#1| (|GcdDomain|)))
-                        ((|squareFree| ((|Factored| |$|) |$|)) 
-                          (|has| |t#1| (|GcdDomain|)))
-                        ((|squareFreePart| (|$| |$|)) (
-                          |has| |t#1| (|GcdDomain|)))))
-                      (QUOTE (
-                        ((|OrderedSet|) (|has| |t#1| (|OrderedSet|)))
-                        ((|ConvertibleTo| (|InputForm|))
-                          (AND 
-                            (|has| |t#3| (|ConvertibleTo| (|InputForm|)))
-                            (|has| |t#1| (|ConvertibleTo| (|InputForm|)))))
-                        ((|ConvertibleTo| (|Pattern| (|Integer|))) 
-                          (AND 
-                            (|has| |t#3| 
-                              (|ConvertibleTo| (|Pattern| (|Integer|))))
-                            (|has| |t#1| 
-                              (|ConvertibleTo| (|Pattern| (|Integer|))))))
-                        ((|ConvertibleTo| (|Pattern| (|Float|))) 
-                          (AND 
-                            (|has| |t#3| 
-                              (|ConvertibleTo| (|Pattern| (|Float|))))
-                            (|has| |t#1| 
-                              (|ConvertibleTo| (|Pattern| (|Float|))))))
-                        ((|PatternMatchable| (|Integer|)) 
-                          (AND 
-                            (|has| |t#3| (|PatternMatchable| (|Integer|)))
-                            (|has| |t#1| (|PatternMatchable| (|Integer|)))))
-                        ((|PatternMatchable| (|Float|)) 
-                          (AND 
-                            (|has| |t#3| (|PatternMatchable| (|Float|)))
-                            (|has| |t#1| (|PatternMatchable| (|Float|)))))
-                        ((|GcdDomain|) (|has| |t#1| (|GcdDomain|)))
-                        (|canonicalUnitNormal| 
-                          (|has| |t#1| (ATTRIBUTE |canonicalUnitNormal|)))
-                        ((|PolynomialFactorizationExplicit|) 
-                          (|has| |t#1| (|PolynomialFactorizationExplicit|)))))
-                      (QUOTE (
-                        (|Factored| |$|)
-                        (|List| |$|)
-                        (|List| |t#3|)
-                        (|NonNegativeInteger|)
-                        (|SparseUnivariatePolynomial| |$|)
-                        (|SparseUnivariatePolynomial| |t#1|)
-                        (|List| (|NonNegativeInteger|))))
-                       NIL))
-                   . #2=(|PolynomialCategory|)))))
-           . #2#)
-         (SETELT #1# 0 
-           (LIST 
-             (QUOTE |PolynomialCategory|)
-             (|devaluate| |t#1|)
-             (|devaluate| |t#2|)
-             (|devaluate| |t#3|))))))) 
+(DEFUN |PolynomialCategory| (&REST #0=#:G1430 &AUX #1=#:G1428)
+ (DSETQ #1# #0#)
+ (LET (#2=#:G1429)
+  (COND
+   ((SETQ #2# (|assoc| (|devaluateList| #1#) |PolynomialCategory;AL|))
+     (CDR #2#))
+   (T
+     (SETQ |PolynomialCategory;AL|
+      (|cons5|
+       (CONS (|devaluateList| #1#)
+        (SETQ #2# (APPLY (FUNCTION |PolynomialCategory;|) #1#)))
+       |PolynomialCategory;AL|))
+     #2#)))) 
+
+(DEFUN |PolynomialCategory;| (|t#1| |t#2| |t#3|)
+ (PROG (#0=#:G1427)
+  (RETURN
+   (PROG1 
+    (LETT #0#
+     (|sublisV|
+      (PAIR (QUOTE (|t#1| |t#2| |t#3|)) (LIST (|devaluate| |t#1|) (|devaluate| |t#2|) (|devaluate| |t#3|)))
+      (COND
+       (|PolynomialCategory;CAT|)
+       ((QUOTE T)
+        (LETT |PolynomialCategory;CAT|
+         (|Join|
+          (|PartialDifferentialRing| (QUOTE |t#3|))
+          (|FiniteAbelianMonoidRing| (QUOTE |t#1|) (QUOTE |t#2|))
+          (|Evalable| (QUOTE $))
+          (|InnerEvalable| (QUOTE |t#3|) (QUOTE |t#1|))
+          (|InnerEvalable| (QUOTE |t#3|) (QUOTE $))
+          (|RetractableTo| (QUOTE |t#3|))
+          (|FullyLinearlyExplicitRingOver| (QUOTE |t#1|))
+          (|mkCategory| (QUOTE |domain|)
+           (QUOTE
+            (((|degree| ((|NonNegativeInteger|) $ |t#3|)) T)
+             ((|degree| ((|List| (|NonNegativeInteger|)) $ (|List| |t#3|))) T)
+             ((|coefficient| ($ $ |t#3| (|NonNegativeInteger|))) T)
+             ((|coefficient| ($ $ (|List| |t#3|)
+               (|List| (|NonNegativeInteger|)))) T)
+             ((|monomials| ((|List| $) $)) T)
+             ((|univariate| ((|SparseUnivariatePolynomial| $) $ |t#3|)) T)
+             ((|univariate| ((|SparseUnivariatePolynomial| |t#1|) $)) T)
+             ((|mainVariable| ((|Union| |t#3| "failed") $)) T)
+             ((|minimumDegree| ((|NonNegativeInteger|) $ |t#3|)) T)
+             ((|minimumDegree| ((|List| (|NonNegativeInteger|)) $
+               (|List| |t#3|))) T)
+             ((|monicDivide|
+               ((|Record| (|:| |quotient| $) (|:| |remainder| $)) $ $ |t#3|))
+               T)
+             ((|monomial| ($ $ |t#3| (|NonNegativeInteger|))) T)
+             ((|monomial| ($ $ (|List| |t#3|) (|List| (|NonNegativeInteger|))))
+               T)
+             ((|multivariate| ($ (|SparseUnivariatePolynomial| |t#1|) |t#3|))
+               T)
+             ((|multivariate| ($ (|SparseUnivariatePolynomial| $) |t#3|)) T)
+             ((|isPlus| ((|Union| (|List| $) "failed") $)) T)
+             ((|isTimes| ((|Union| (|List| $) "failed") $)) T)
+             ((|isExpt|
+               ((|Union| 
+                (|Record| (|:| |var| |t#3|) 
+                          (|:| |exponent| (|NonNegativeInteger|)))
+                "failed") $))
+               T)
+             ((|totalDegree| ((|NonNegativeInteger|) $)) T)
+             ((|totalDegree| ((|NonNegativeInteger|) $ (|List| |t#3|))) T)
+             ((|variables| ((|List| |t#3|) $)) T)
+             ((|primitiveMonomials| ((|List| $) $)) T)
+             ((|resultant| ($ $ $ |t#3|)) (|has| |t#1| (|CommutativeRing|)))
+             ((|discriminant| ($ $ |t#3|)) (|has| |t#1| (|CommutativeRing|)))
+             ((|content| ($ $ |t#3|)) (|has| |t#1| (|GcdDomain|)))
+             ((|primitivePart| ($ $)) (|has| |t#1| (|GcdDomain|)))
+             ((|primitivePart| ($ $ |t#3|)) (|has| |t#1| (|GcdDomain|)))
+             ((|squareFree| ((|Factored| $) $)) (|has| |t#1| (|GcdDomain|)))
+             ((|squareFreePart| ($ $)) (|has| |t#1| (|GcdDomain|)))))
+           (QUOTE
+            (((|OrderedSet|) (|has| |t#1| (|OrderedSet|)))
+             ((|ConvertibleTo| (|InputForm|))
+              (AND (|has| |t#3| (|ConvertibleTo| (|InputForm|)))
+                   (|has| |t#1| (|ConvertibleTo| (|InputForm|)))))
+             ((|ConvertibleTo| (|Pattern| (|Integer|)))
+              (AND (|has| |t#3| (|ConvertibleTo| (|Pattern| (|Integer|))))
+                   (|has| |t#1| (|ConvertibleTo| (|Pattern| (|Integer|))))))
+             ((|ConvertibleTo| (|Pattern| (|Float|)))
+              (AND (|has| |t#3| (|ConvertibleTo| (|Pattern| (|Float|))))
+                   (|has| |t#1| (|ConvertibleTo| (|Pattern| (|Float|))))))
+             ((|PatternMatchable| (|Integer|))
+              (AND
+               (|has| |t#3| (|PatternMatchable| (|Integer|)))
+               (|has| |t#1| (|PatternMatchable| (|Integer|)))))
+             ((|PatternMatchable| (|Float|))
+              (AND
+               (|has| |t#3| (|PatternMatchable| (|Float|)))
+               (|has| |t#1| (|PatternMatchable| (|Float|)))))
+             ((|GcdDomain|) (|has| |t#1| (|GcdDomain|)))
+             (|canonicalUnitNormal|
+               (|has| |t#1| (ATTRIBUTE |canonicalUnitNormal|)))
+             ((|PolynomialFactorizationExplicit|)
+               (|has| |t#1| (|PolynomialFactorizationExplicit|)))))
+           (QUOTE
+            ((|Factored| $)
+             (|List| $)
+             (|List| |t#3|)
+             (|NonNegativeInteger|)
+             (|SparseUnivariatePolynomial| $)
+             (|SparseUnivariatePolynomial| |t#1|)
+             (|List| (|NonNegativeInteger|))))
+            NIL))
+          . #1=(|PolynomialCategory|)))))
+      . #1#)
+    (SETELT #0# 0
+     (LIST (QUOTE |PolynomialCategory|)
+      (|devaluate| |t#1|) (|devaluate| |t#2|) (|devaluate| |t#3|))))))) 
 
 @
 \section{POLYCAT-.lsp BOOTSTRAP}
@@ -797,1924 +753,1521 @@ Note that this code is not included in the generated catdef.spad file.
 
 (|/VERSIONCHECK| 2) 
 
-(DEFUN |POLYCAT-;eval;SLS;1| (|p| |l| |$|) 
-  (PROG (#1=#:G101870 #2=#:G101860 #3=#:G101868 #4=#:G101869 
-         |lvar| #5=#:G101866 |e| #6=#:G101867) 
-    (RETURN 
-      (SEQ 
-        (COND 
-          ((NULL |l|) |p|)
-          ((QUOTE T) 
-            (SEQ 
-              (SEQ 
-                (EXIT 
-                  (SEQ 
-                    (LETT |e| NIL |POLYCAT-;eval;SLS;1|)
-                    (LETT #1# |l| |POLYCAT-;eval;SLS;1|)
-                    G190
-                    (COND 
-                      ((OR 
-                        (ATOM #1#)
-                        (PROGN (LETT |e| (CAR #1#) |POLYCAT-;eval;SLS;1|) NIL))
-                       (GO G191)))
-                    (SEQ 
-                      (EXIT 
-                        (COND 
-                          ((QEQCAR 
-                             (SPADCALL 
-                               (SPADCALL |e| (QREFELT |$| 11))
-                               (QREFELT |$| 13))
-                              1)
-                            (PROGN 
-                              (LETT #2# 
-                                (|error| "cannot find a variable to evaluate")
-                                |POLYCAT-;eval;SLS;1|)
-                              (GO #2#))))))
-                    (LETT #1# (CDR #1#) |POLYCAT-;eval;SLS;1|)
-                    (GO G190)
-                    G191
-                   (EXIT NIL)))
-                #2# 
-                (EXIT #2#))
-              (LETT |lvar| 
-                (PROGN 
-                  (LETT #3# NIL |POLYCAT-;eval;SLS;1|)
-                  (SEQ 
-                    (LETT |e| NIL |POLYCAT-;eval;SLS;1|)
-                    (LETT #4# |l| |POLYCAT-;eval;SLS;1|)
-                    G190
-                    (COND 
-                      ((OR 
-                        (ATOM #4#)
-                        (PROGN 
-                          (LETT |e| (CAR #4#) |POLYCAT-;eval;SLS;1|) NIL))
-                       (GO G191)))
-                    (SEQ 
-                      (EXIT 
-                        (LETT #3# 
-                          (CONS 
-                            (SPADCALL 
-                              (SPADCALL |e| (QREFELT |$| 11))
-                              (QREFELT |$| 14))
-                            #3#)
-                          |POLYCAT-;eval;SLS;1|)))
-                    (LETT #4# (CDR #4#) |POLYCAT-;eval;SLS;1|)
-                    (GO G190)
-                    G191
-                    (EXIT (NREVERSE0 #3#))))
-                |POLYCAT-;eval;SLS;1|)
-              (EXIT 
-                (SPADCALL 
-                  |p| 
-                  |lvar| 
-                  (PROGN 
-                    (LETT #5# NIL |POLYCAT-;eval;SLS;1|)
-                    (SEQ 
-                      (LETT |e| NIL |POLYCAT-;eval;SLS;1|)
-                      (LETT #6# |l| |POLYCAT-;eval;SLS;1|)
-                      G190 
-                      (COND 
-                        ((OR 
-                          (ATOM #6#)
-                          (PROGN 
-                            (LETT |e| (CAR #6#) |POLYCAT-;eval;SLS;1|)
-                            NIL))
-                         (GO G191)))
-                      (SEQ 
-                        (EXIT 
-                          (LETT #5# 
-                            (CONS (SPADCALL |e| (QREFELT |$| 15)) #5#)
-                            |POLYCAT-;eval;SLS;1|)))
-                      (LETT #6# (CDR #6#) |POLYCAT-;eval;SLS;1|)
-                      (GO G190)
-                      G191
-                      (EXIT (NREVERSE0 #5#))))
-                  (QREFELT |$| 18)))))))))) 
 
-(DEFUN |POLYCAT-;monomials;SL;2| (|p| |$|) 
-  (PROG (|ml|) 
-    (RETURN 
-      (SEQ 
-        (LETT |ml| NIL |POLYCAT-;monomials;SL;2|)
-        (SEQ G190 
-          (COND 
-            ((NULL 
-               (COND 
-                 ((SPADCALL |p| (|spadConstant| |$| 21) (QREFELT |$| 24))
-                   (QUOTE NIL))
-                 ((QUOTE T) (QUOTE T))))
-             (GO G191)))
-          (SEQ 
-            (LETT |ml| 
-              (CONS (SPADCALL |p| (QREFELT |$| 25)) |ml|)
-              |POLYCAT-;monomials;SL;2|)
-            (EXIT 
-              (LETT |p| 
-                (SPADCALL |p| (QREFELT |$| 26))
-                |POLYCAT-;monomials;SL;2|)))
-          NIL 
-          (GO G190) 
-          G191 
-          (EXIT NIL))
-        (EXIT (REVERSE |ml|)))))) 
+(/VERSIONCHECK 2) 
 
-(DEFUN |POLYCAT-;isPlus;SU;3| (|p| |$|) 
-  (PROG (|l|) 
-    (RETURN 
-      (COND 
-        ((NULL 
-            (CDR 
-              (LETT |l| 
-                (SPADCALL |p| (QREFELT |$| 28))
-                |POLYCAT-;isPlus;SU;3|)))
-          (CONS 1 "failed"))
-        ((QUOTE T) (CONS 0 |l|)))))) 
-
-(DEFUN |POLYCAT-;isTimes;SU;4| (|p| |$|) 
-  (PROG (|lv| #1=#:G101892 |v| #2=#:G101893 |l| |r|)
-    (RETURN 
-      (SEQ 
-        (COND 
-          ((OR 
-              (NULL 
-                (LETT |lv| 
-                  (SPADCALL |p| (QREFELT |$| 31))
-                  |POLYCAT-;isTimes;SU;4|))
-              (NULL (SPADCALL |p| (QREFELT |$| 32))))
-            (CONS 1 "failed"))
-          ((QUOTE T) 
-            (SEQ 
-              (LETT |l| 
-                (PROGN 
-                  (LETT #1# NIL |POLYCAT-;isTimes;SU;4|)
-                  (SEQ 
-                    (LETT |v| NIL |POLYCAT-;isTimes;SU;4|)
-                    (LETT #2# |lv| |POLYCAT-;isTimes;SU;4|)
-                    G190
-                    (COND 
-                      ((OR 
-                         (ATOM #2#) 
-                         (PROGN 
-                           (LETT |v| (CAR #2#) |POLYCAT-;isTimes;SU;4|)
-                           NIL))
-                       (GO G191)))
-                    (SEQ 
-                      (EXIT 
-                        (LETT #1# 
-                          (CONS 
-                            (SPADCALL 
-                              (|spadConstant| |$| 33)
-                              |v|
-                              (SPADCALL |p| |v| (QREFELT |$| 36))
-                              (QREFELT |$| 37))
-                            #1#)
-                          |POLYCAT-;isTimes;SU;4|)))
-                    (LETT #2# (CDR #2#) |POLYCAT-;isTimes;SU;4|)
-                    (GO G190)
-                    G191
-                    (EXIT (NREVERSE0 #1#))))
-                |POLYCAT-;isTimes;SU;4|)
-              (EXIT 
-                (COND 
-                  ((SPADCALL 
-                     (LETT |r| 
-                       (SPADCALL |p| (QREFELT |$| 38))
-                       |POLYCAT-;isTimes;SU;4|) 
-                     (QREFELT |$| 39))
-                    (COND 
-                      ((NULL (CDR |lv|)) (CONS 1 "failed"))
-                      ((QUOTE T) (CONS 0 |l|))))
-                  ((QUOTE T) 
-                    (CONS 0 
-                      (CONS (SPADCALL |r| (QREFELT |$| 40)) |l|)))))))))))) 
-
-(DEFUN |POLYCAT-;isExpt;SU;5| (|p| |$|) 
-  (PROG (|u| |d|) 
-    (RETURN 
-      (SEQ 
-        (LETT |u| (SPADCALL |p| (QREFELT |$| 42)) |POLYCAT-;isExpt;SU;5|)
-        (EXIT 
-          (COND 
-            ((OR 
-               (QEQCAR |u| 1)
-               (NULL 
-                 (SPADCALL |p| 
-                   (SPADCALL 
-                     (|spadConstant| |$| 33)
-                     (QCDR |u|)
-                     (LETT |d| 
-                       (SPADCALL |p| (QCDR |u|) (QREFELT |$| 36))
-                       |POLYCAT-;isExpt;SU;5|)
-                     (QREFELT |$| 37))
-                   (QREFELT |$| 24))))
-              (CONS 1 "failed"))
-            ((QUOTE T) (CONS 0 (CONS (QCDR |u|) |d|))))))))) 
-
-(DEFUN |POLYCAT-;coefficient;SVarSetNniS;6| (|p| |v| |n| |$|) 
-  (SPADCALL (SPADCALL |p| |v| (QREFELT |$| 47)) |n| (QREFELT |$| 49))) 
-
-(DEFUN |POLYCAT-;coefficient;SLLS;7| (|p| |lv| |ln| |$|) 
-  (COND 
-    ((NULL |lv|) 
-      (COND 
-        ((NULL |ln|) |p|)
-        ((QUOTE T) (|error| "mismatched lists in coefficient"))))
-    ((NULL |ln|) 
-      (|error| "mismatched lists in coefficient"))
-    ((QUOTE T) 
-      (SPADCALL 
-        (SPADCALL 
-          (SPADCALL |p| (|SPADfirst| |lv|) (QREFELT |$| 47))
-          (|SPADfirst| |ln|)
-          (QREFELT |$| 49))
-        (CDR |lv|)
-        (CDR |ln|)
-        (QREFELT |$| 52))))) 
-
-(DEFUN |POLYCAT-;monomial;SLLS;8| (|p| |lv| |ln| |$|) 
-  (COND 
-    ((NULL |lv|) 
-      (COND 
-        ((NULL |ln|) |p|)
-        ((QUOTE T) (|error| "mismatched lists in monomial"))))
-    ((NULL |ln|) 
-      (|error| "mismatched lists in monomial"))
-    ((QUOTE T) 
-      (SPADCALL 
-        (SPADCALL |p| (|SPADfirst| |lv|) (|SPADfirst| |ln|) (QREFELT |$| 37))
-        (CDR |lv|)
-        (CDR |ln|)
-        (QREFELT |$| 54))))) 
-
-(DEFUN |POLYCAT-;retract;SVarSet;9| (|p| |$|) 
-  (PROG (#1=#:G101918 |q|) 
-    (RETURN 
-      (SEQ 
-        (LETT |q| 
-          (PROG2 
-            (LETT #1# 
-              (SPADCALL |p| (QREFELT |$| 42))
-              |POLYCAT-;retract;SVarSet;9|)
-            (QCDR #1#)
-            (|check-union| (QEQCAR #1# 0) (QREFELT |$| 9) #1#))
-          |POLYCAT-;retract;SVarSet;9|)
+(DEFUN |POLYCAT-;eval;SLS;1| (|p| |l| $)
+ (PROG (#0=#:G1444 #1=#:G1438 #2=#:G1445 #3=#:G1446 |lvar| #4=#:G1447 
+        |e| #5=#:G1448)
+  (RETURN 
+   (SEQ
+    (COND
+     ((NULL |l|) |p|)
+     ((QUOTE T)
+      (SEQ
+       (SEQ
         (EXIT
-          (COND 
-            ((SPADCALL 
-               (SPADCALL |q| (QREFELT |$| 56))
-               |p|
-               (QREFELT |$| 24))
-              |q|)
-            ((QUOTE T) 
-              (|error| "Polynomial is not a single variable")))))))) 
-
-(DEFUN |POLYCAT-;retractIfCan;SU;10| (|p| |$|) 
-  (PROG (|q| #1=#:G101926) 
-    (RETURN 
-      (SEQ 
-        (EXIT 
-          (SEQ 
-            (SEQ 
-              (LETT |q| 
-                (SPADCALL |p| (QREFELT |$| 42))
-                |POLYCAT-;retractIfCan;SU;10|)
-              (EXIT 
-                (COND 
-                  ((QEQCAR |q| 0)
-                    (COND 
-                      ((SPADCALL 
-                         (SPADCALL (QCDR |q|) (QREFELT |$| 56))
-                         |p|
-                         (QREFELT |$| 24))
-                        (PROGN 
-                          (LETT #1# |q| |POLYCAT-;retractIfCan;SU;10|)
-                          (GO #1#))))))))
-            (EXIT (CONS 1 "failed"))))
-        #1# 
-        (EXIT #1#))))) 
-
-(DEFUN |POLYCAT-;mkPrim| (|p| |$|) 
-  (SPADCALL 
-    (|spadConstant| |$| 34)
-    (SPADCALL |p| (QREFELT |$| 59))
-    (QREFELT |$| 60))) 
-
-(DEFUN |POLYCAT-;primitiveMonomials;SL;12| (|p| |$|) 
-  (PROG (#1=#:G101931 |q| #2=#:G101932) 
-    (RETURN 
-      (SEQ 
-        (PROGN 
-          (LETT #1# NIL |POLYCAT-;primitiveMonomials;SL;12|)
+         (SEQ
+          (LETT |e| NIL |POLYCAT-;eval;SLS;1|)
+          (LETT #0# |l| |POLYCAT-;eval;SLS;1|)
+          G190
+          (COND
+           ((OR (ATOM #0#)
+                (PROGN (LETT |e| (CAR #0#) |POLYCAT-;eval;SLS;1|) NIL))
+            (GO G191)))
           (SEQ 
-            (LETT |q| NIL |POLYCAT-;primitiveMonomials;SL;12|)
-            (LETT #2# 
-              (SPADCALL |p| (QREFELT |$| 28))
-              |POLYCAT-;primitiveMonomials;SL;12|)
-            G190
+           (EXIT
+            (COND
+             ((QEQCAR
+               (SPADCALL (SPADCALL |e| (QREFELT $ 11)) (QREFELT $ 13)) 1)
+              (PROGN
+               (LETT #1# 
+                (|error| "cannot find a variable to evaluate")
+                |POLYCAT-;eval;SLS;1|)
+               (GO #1#))))))
+          (LETT #0# (CDR #0#) |POLYCAT-;eval;SLS;1|)
+          (GO G190)
+          G191
+          (EXIT NIL)))
+        #1# (EXIT #1#))
+       (LETT |lvar|
+        (PROGN
+         (LETT #2# NIL |POLYCAT-;eval;SLS;1|)
+         (SEQ
+          (LETT |e| NIL |POLYCAT-;eval;SLS;1|)
+          (LETT #3# |l| |POLYCAT-;eval;SLS;1|)
+          G190
+          (COND
+           ((OR (ATOM #3#)
+                (PROGN (LETT |e| (CAR #3#) |POLYCAT-;eval;SLS;1|) NIL))
+            (GO G191)))
+          (SEQ
+           (EXIT
+            (LETT #2#
+             (CONS (SPADCALL (SPADCALL |e| (QREFELT $ 11)) (QREFELT $ 14))
+                   #2#)
+             |POLYCAT-;eval;SLS;1|)))
+          (LETT #3# (CDR #3#) |POLYCAT-;eval;SLS;1|)
+          (GO G190)
+          G191
+          (EXIT (NREVERSE0 #2#))))
+         |POLYCAT-;eval;SLS;1|)
+       (EXIT
+        (SPADCALL |p| |lvar|
+         (PROGN
+          (LETT #4# NIL |POLYCAT-;eval;SLS;1|)
+          (SEQ
+           (LETT |e| NIL |POLYCAT-;eval;SLS;1|)
+           (LETT #5# |l| |POLYCAT-;eval;SLS;1|)
+           G190
            (COND 
-             ((OR 
-                (ATOM #2#)
-                (PROGN 
-                  (LETT |q| (CAR #2#) |POLYCAT-;primitiveMonomials;SL;12|)
-                  NIL))
+            ((OR (ATOM #5#)
+                 (PROGN (LETT |e| (CAR #5#) |POLYCAT-;eval;SLS;1|) NIL))
               (GO G191)))
            (SEQ 
-             (EXIT 
-               (LETT #1# 
-                 (CONS 
-                   (|POLYCAT-;mkPrim| |q| |$|)
-                   #1#) 
-                 |POLYCAT-;primitiveMonomials;SL;12|)))
-           (LETT #2# (CDR #2#) |POLYCAT-;primitiveMonomials;SL;12|)
+            (EXIT
+             (LETT #4# (CONS (SPADCALL |e| (QREFELT $ 15)) #4#)
+              |POLYCAT-;eval;SLS;1|)))
+           (LETT #5# (CDR #5#) |POLYCAT-;eval;SLS;1|)
            (GO G190)
            G191
-           (EXIT (NREVERSE0 #1#)))))))) 
-
-(DEFUN |POLYCAT-;totalDegree;SNni;13| (|p| |$|) 
-  (PROG (#1=#:G101934 |d| |u|) 
-    (RETURN 
-      (SEQ 
-        (COND 
-          ((SPADCALL |p| (QREFELT |$| 62)) 0)
-          ((QUOTE T) 
-            (SEQ 
-              (LETT |u| 
-                (SPADCALL |p| 
-                  (PROG2 
-                    (LETT #1# 
-                      (SPADCALL |p| (QREFELT |$| 42))
-                      |POLYCAT-;totalDegree;SNni;13|)
-                    (QCDR #1#)
-                    (|check-union| (QEQCAR #1# 0) (QREFELT |$| 9) #1#))
-                  (QREFELT |$| 47))
-                |POLYCAT-;totalDegree;SNni;13|)
-              (LETT |d| 0 |POLYCAT-;totalDegree;SNni;13|)
-              (SEQ G190 
-                (COND 
-                  ((NULL 
-                    (COND 
-                      ((SPADCALL |u| (|spadConstant| |$| 63) (QREFELT |$| 64))
-                         (QUOTE NIL))
-                       ((QUOTE T) (QUOTE T)))) (GO G191)))
-                (SEQ 
-                  (LETT |d| 
-                    (MAX |d| 
-                      (|+| 
-                        (SPADCALL |u| (QREFELT |$| 65))
-                        (SPADCALL 
-                          (SPADCALL |u| (QREFELT |$| 66))
-                          (QREFELT |$| 67))))
-                    |POLYCAT-;totalDegree;SNni;13|)
-                  (EXIT 
-                    (LETT |u| 
-                      (SPADCALL |u| (QREFELT |$| 68))
-                      |POLYCAT-;totalDegree;SNni;13|)))
-                NIL
-                (GO G190)
-                G191
-                (EXIT NIL))
-              (EXIT |d|)))))))) 
-
-(DEFUN |POLYCAT-;totalDegree;SLNni;14| (|p| |lv| |$|) 
-  (PROG (#1=#:G101942 |v| |w| |d| |u|) 
-    (RETURN 
-      (SEQ 
-        (COND 
-          ((SPADCALL |p| (QREFELT |$| 62)) 0)
-          ((QUOTE T) 
-            (SEQ 
-              (LETT |u| 
-                (SPADCALL |p| 
-                  (LETT |v| 
-                    (PROG2 
-                      (LETT #1# 
-                        (SPADCALL |p| (QREFELT |$| 42))
-                        |POLYCAT-;totalDegree;SLNni;14|)
-                      (QCDR #1#)
-                      (|check-union| (QEQCAR #1# 0) (QREFELT |$| 9) #1#))
-                    |POLYCAT-;totalDegree;SLNni;14|)
-                  (QREFELT |$| 47))
-                |POLYCAT-;totalDegree;SLNni;14|)
-              (LETT |d| 0 |POLYCAT-;totalDegree;SLNni;14|)
-              (LETT |w| 0 |POLYCAT-;totalDegree;SLNni;14|)
-              (COND 
-                ((SPADCALL |v| |lv| (QREFELT |$| 70))
-                  (LETT |w| 1 |POLYCAT-;totalDegree;SLNni;14|)))
-              (SEQ G190 
-                (COND 
-                  ((NULL 
-                    (COND 
-                      ((SPADCALL |u| (|spadConstant| |$| 63) (QREFELT |$| 64))
-                        (QUOTE NIL))
-                      ((QUOTE T) (QUOTE T))))
-                    (GO G191)))
-                (SEQ 
-                  (LETT |d| 
-                    (MAX |d| 
-                      (|+| 
-                        (|*| |w| (SPADCALL |u| (QREFELT |$| 65)))
-                        (SPADCALL 
-                          (SPADCALL |u| (QREFELT |$| 66))
-                          |lv|
-                          (QREFELT |$| 71))))
-                    |POLYCAT-;totalDegree;SLNni;14|)
-                  (EXIT 
-                    (LETT |u| 
-                      (SPADCALL |u| (QREFELT |$| 68))
-                      |POLYCAT-;totalDegree;SLNni;14|)))
-                NIL
-                (GO G190)
-                G191
-                (EXIT NIL))
-              (EXIT |d|)))))))) 
-
-(DEFUN |POLYCAT-;resultant;2SVarSetS;15| (|p1| |p2| |mvar| |$|) 
-  (SPADCALL 
-    (SPADCALL |p1| |mvar| (QREFELT |$| 47))
-    (SPADCALL |p2| |mvar| (QREFELT |$| 47))
-    (QREFELT |$| 73))) 
-
-(DEFUN |POLYCAT-;discriminant;SVarSetS;16| (|p| |var| |$|) 
-  (SPADCALL (SPADCALL |p| |var| (QREFELT |$| 47)) (QREFELT |$| 75))) 
-
-(DEFUN |POLYCAT-;allMonoms| (|l| |$|) 
-  (PROG (#1=#:G101954 |p| #2=#:G101955) 
-    (RETURN 
-      (SEQ 
-        (SPADCALL 
-          (SPADCALL 
-            (PROGN 
-              (LETT #1# NIL |POLYCAT-;allMonoms|)
-              (SEQ 
-                (LETT |p| NIL |POLYCAT-;allMonoms|)
-                (LETT #2# |l| |POLYCAT-;allMonoms|)
-                G190
-                (COND 
-                  ((OR 
-                      (ATOM #2#) 
-                      (PROGN (LETT |p| (CAR #2#) |POLYCAT-;allMonoms|) NIL))
-                    (GO G191)))
-                (SEQ 
-                  (EXIT 
-                    (LETT #1# 
-                      (CONS (SPADCALL |p| (QREFELT |$| 77)) #1#)
-                      |POLYCAT-;allMonoms|)))
-                (LETT #2# (CDR #2#) |POLYCAT-;allMonoms|)
-                (GO G190)
-                G191
-                (EXIT (NREVERSE0 #1#))))
-            (QREFELT |$| 79))
-          (QREFELT |$| 80)))))) 
-
-(DEFUN |POLYCAT-;P2R| (|p| |b| |n| |$|) 
-  (PROG (|w| |bj| #1=#:G101960 |i| #2=#:G101959) 
-    (RETURN 
+           (EXIT (NREVERSE0 #4#))))
+         (QREFELT $ 18)))))))))) 
+
+(DEFUN |POLYCAT-;monomials;SL;2| (|p| $)
+ (PROG (|ml|)
+  (RETURN
+   (SEQ
+    (LETT |ml| NIL |POLYCAT-;monomials;SL;2|)
+    (SEQ G190
+     (COND
+      ((NULL 
+        (COND
+         ((SPADCALL |p| (|spadConstant| $ 21) (QREFELT $ 24)) (QUOTE NIL))
+         ((QUOTE T) (QUOTE T))))
+       (GO G191)))
+     (SEQ
+      (LETT |ml|
+       (CONS (SPADCALL |p| (QREFELT $ 25)) |ml|)
+       |POLYCAT-;monomials;SL;2|)
+      (EXIT
+       (LETT |p| (SPADCALL |p| (QREFELT $ 26)) |POLYCAT-;monomials;SL;2|)))
+      NIL
+     (GO G190)
+     G191
+     (EXIT NIL))
+    (EXIT (REVERSE |ml|)))))) 
+
+(DEFUN |POLYCAT-;isPlus;SU;3| (|p| $)
+ (PROG (|l|)
+  (RETURN
+   (COND
+    ((NULL 
+       (CDR (LETT |l| (SPADCALL |p| (QREFELT $ 28)) |POLYCAT-;isPlus;SU;3|)))
+      (CONS 1 "failed"))
+    ((QUOTE T) (CONS 0 |l|)))))) 
+
+(DEFUN |POLYCAT-;isTimes;SU;4| (|p| $)
+ (PROG (|lv| #0=#:G1470 |v| #1=#:G1471 |l| |r|)
+  (RETURN
+   (SEQ
+    (COND
+     ((OR (NULL 
+           (LETT |lv| (SPADCALL |p| (QREFELT $ 31)) |POLYCAT-;isTimes;SU;4|))
+          (NULL (SPADCALL |p| (QREFELT $ 32))))
+       (CONS 1 "failed"))
+     ((QUOTE T)
+      (SEQ
+       (LETT |l|
+        (PROGN
+         (LETT #0# NIL |POLYCAT-;isTimes;SU;4|)
+         (SEQ
+          (LETT |v| NIL |POLYCAT-;isTimes;SU;4|)
+          (LETT #1# |lv| |POLYCAT-;isTimes;SU;4|)
+          G190
+          (COND
+           ((OR (ATOM #1#) 
+                (PROGN (LETT |v| (CAR #1#) |POLYCAT-;isTimes;SU;4|) NIL))
+            (GO G191)))
+          (SEQ 
+           (EXIT
+            (LETT #0#
+             (CONS
+              (SPADCALL (|spadConstant| $ 33) |v|
+               (SPADCALL |p| |v| (QREFELT $ 36)) (QREFELT $ 37))
+              #0#)
+              |POLYCAT-;isTimes;SU;4|)))
+          (LETT #1# (CDR #1#) |POLYCAT-;isTimes;SU;4|)
+          (GO G190)
+          G191
+         (EXIT (NREVERSE0 #0#))))
+        |POLYCAT-;isTimes;SU;4|)
+       (LETT |r| (SPADCALL |p| (QREFELT $ 38)) |POLYCAT-;isTimes;SU;4|)
+       (EXIT
+        (COND
+         ((SPADCALL |r| (|spadConstant| $ 34) (QREFELT $ 39))
+           (COND
+            ((NULL (CDR |lv|)) (CONS 1 "failed"))
+            ((QUOTE T) (CONS 0 |l|))))
+         ((QUOTE T)
+           (CONS 0 (CONS (SPADCALL |r| (QREFELT $ 40)) |l|)))))))))))) 
+
+(DEFUN |POLYCAT-;isExpt;SU;5| (|p| $)
+ (PROG (|u| |d|)
+  (RETURN
+   (SEQ
+    (LETT |u| (SPADCALL |p| (QREFELT $ 42)) |POLYCAT-;isExpt;SU;5|)
+    (EXIT 
+     (COND
+      ((OR (QEQCAR |u| 1)
+           (NULL
+            (SPADCALL |p|
+             (SPADCALL (|spadConstant| $ 33)
+              (QCDR |u|)
+              (LETT |d| (SPADCALL |p| (QCDR |u|) (QREFELT $ 36))
+               |POLYCAT-;isExpt;SU;5|)
+              (QREFELT $ 37))
+             (QREFELT $ 24))))
+       (CONS 1 "failed"))
+      ((QUOTE T) (CONS 0 (CONS (QCDR |u|) |d|))))))))) 
+
+(DEFUN |POLYCAT-;coefficient;SVarSetNniS;6| (|p| |v| |n| $)
+ (SPADCALL (SPADCALL |p| |v| (QREFELT $ 47)) |n| (QREFELT $ 49))) 
+
+(DEFUN |POLYCAT-;coefficient;SLLS;7| (|p| |lv| |ln| $)
+ (COND
+  ((NULL |lv|)
+   (COND
+    ((NULL |ln|) |p|)
+    ((QUOTE T) (|error| "mismatched lists in coefficient"))))
+  ((NULL |ln|) (|error| "mismatched lists in coefficient"))
+  ((QUOTE T)
+   (SPADCALL
+    (SPADCALL
+     (SPADCALL |p| (|SPADfirst| |lv|) (QREFELT $ 47))
+     (|SPADfirst| |ln|)
+     (QREFELT $ 49))
+    (CDR |lv|)
+    (CDR |ln|)
+    (QREFELT $ 52))))) 
+
+(DEFUN |POLYCAT-;monomial;SLLS;8| (|p| |lv| |ln| $)
+ (COND
+  ((NULL |lv|) 
+   (COND
+    ((NULL |ln|) |p|)
+    ((QUOTE T) (|error| "mismatched lists in monomial"))))
+  ((NULL |ln|) (|error| "mismatched lists in monomial"))
+  ((QUOTE T)
+   (SPADCALL 
+    (SPADCALL |p| (|SPADfirst| |lv|) (|SPADfirst| |ln|) (QREFELT $ 37))
+    (CDR |lv|)
+    (CDR |ln|)
+    (QREFELT $ 54))))) 
+
+(DEFUN |POLYCAT-;retract;SVarSet;9| (|p| $)
+ (PROG (#0=#:G1496 |q|)
+  (RETURN
+   (SEQ
+    (LETT |q|
+     (PROG2
+      (LETT #0# (SPADCALL |p| (QREFELT $ 42)) |POLYCAT-;retract;SVarSet;9|)
+      (QCDR #0#)
+      (|check-union| (QEQCAR #0# 0) (QREFELT $ 9) #0#))
+     |POLYCAT-;retract;SVarSet;9|)
+    (EXIT
+     (COND
+      ((SPADCALL (SPADCALL |q| (QREFELT $ 56)) |p| (QREFELT $ 24)) |q|)
+      ((QUOTE T) (|error| "Polynomial is not a single variable")))))))) 
+
+(DEFUN |POLYCAT-;retractIfCan;SU;10| (|p| $) 
+ (PROG (|q| #0=#:G1504) 
+  (RETURN 
+   (SEQ 
+    (EXIT
+     (SEQ
+      (SEQ
+       (LETT |q| (SPADCALL |p| (QREFELT $ 42)) |POLYCAT-;retractIfCan;SU;10|)
+       (EXIT
+        (COND
+         ((QEQCAR |q| 0)
+          (COND
+           ((SPADCALL (SPADCALL (QCDR |q|) (QREFELT $ 56)) |p| (QREFELT $ 24))
+             (PROGN
+              (LETT #0# |q| |POLYCAT-;retractIfCan;SU;10|)
+              (GO #0#))))))))
+      (EXIT (CONS 1 "failed"))))
+     #0#
+     (EXIT #0#))))) 
+
+(DEFUN |POLYCAT-;mkPrim| (|p| $)
+ (SPADCALL
+  (|spadConstant| $ 34)
+  (SPADCALL |p| (QREFELT $ 59))
+  (QREFELT $ 60))) 
+
+(DEFUN |POLYCAT-;primitiveMonomials;SL;12| (|p| $)
+ (PROG (#0=#:G1509 |q| #1=#:G1510)
+  (RETURN
+   (SEQ
+    (PROGN
+     (LETT #0# NIL |POLYCAT-;primitiveMonomials;SL;12|)
+     (SEQ
+      (LETT |q| NIL |POLYCAT-;primitiveMonomials;SL;12|)
+      (LETT #1# (SPADCALL |p| (QREFELT $ 28)) |POLYCAT-;primitiveMonomials;SL;12|)
+      G190
+      (COND
+       ((OR (ATOM #1#)
+            (PROGN
+             (LETT |q| (CAR #1#) |POLYCAT-;primitiveMonomials;SL;12|)
+             NIL))
+        (GO G191)))
       (SEQ 
-        (LETT |w| 
-          (SPADCALL |n| (|spadConstant| |$| 22) (QREFELT |$| 82))
-          |POLYCAT-;P2R|)
+       (EXIT
+        (LETT #0# (CONS (|POLYCAT-;mkPrim| |q| $) #0#)
+         |POLYCAT-;primitiveMonomials;SL;12|)))
+      (LETT #1# (CDR #1#) |POLYCAT-;primitiveMonomials;SL;12|)
+      (GO G190)
+      G191
+      (EXIT (NREVERSE0 #0#)))))))) 
+
+(DEFUN |POLYCAT-;totalDegree;SNni;13| (|p| $)
+ (PROG (#0=#:G1512 |d| |u|)
+  (RETURN
+   (SEQ
+    (COND
+     ((SPADCALL |p| (QREFELT $ 62)) 0)
+     ((QUOTE T)
+      (SEQ
+       (LETT |u|
+        (SPADCALL |p|
+         (PROG2
+          (LETT #0#
+           (SPADCALL |p| (QREFELT $ 42))
+           |POLYCAT-;totalDegree;SNni;13|)
+          (QCDR #0#)
+          (|check-union| (QEQCAR #0# 0) (QREFELT $ 9) #0#))
+         (QREFELT $ 47))
+        |POLYCAT-;totalDegree;SNni;13|)
+       (LETT |d| 0 |POLYCAT-;totalDegree;SNni;13|)
+       (SEQ G190 
+        (COND
+         ((NULL
+          (COND
+           ((SPADCALL |u| (|spadConstant| $ 63) (QREFELT $ 64)) (QUOTE NIL))
+           ((QUOTE T) (QUOTE T)))) (GO G191)))
+        (SEQ
+         (LETT |d|
+          (MAX |d| 
+           (+
+            (SPADCALL |u| (QREFELT $ 65))
+            (SPADCALL (SPADCALL |u| (QREFELT $ 66)) (QREFELT $ 67))))
+          |POLYCAT-;totalDegree;SNni;13|)
+         (EXIT
+          (LETT |u|
+           (SPADCALL |u| (QREFELT $ 68)) |POLYCAT-;totalDegree;SNni;13|)))
+        NIL
+        (GO G190)
+        G191
+        (EXIT NIL))
+       (EXIT |d|)))))))) 
+
+(DEFUN |POLYCAT-;totalDegree;SLNni;14| (|p| |lv| $)
+ (PROG (#0=#:G1520 |v| |w| |d| |u|)
+  (RETURN
+   (SEQ
+    (COND
+     ((SPADCALL |p| (QREFELT $ 62)) 0)
+     ((QUOTE T)
+      (SEQ
+       (LETT |u|
+        (SPADCALL |p|
+         (LETT |v|
+          (PROG2
+           (LETT #0# 
+            (SPADCALL |p| (QREFELT $ 42))
+            |POLYCAT-;totalDegree;SLNni;14|)
+           (QCDR #0#)
+           (|check-union| (QEQCAR #0# 0) (QREFELT $ 9) #0#))
+          |POLYCAT-;totalDegree;SLNni;14|)
+         (QREFELT $ 47))
+        |POLYCAT-;totalDegree;SLNni;14|)
+       (LETT |d| 0 |POLYCAT-;totalDegree;SLNni;14|)
+       (LETT |w| 0 |POLYCAT-;totalDegree;SLNni;14|)
+       (COND
+        ((SPADCALL |v| |lv| (QREFELT $ 70))
+          (LETT |w| 1 |POLYCAT-;totalDegree;SLNni;14|)))
+       (SEQ G190
+        (COND
+         ((NULL
+          (COND
+           ((SPADCALL |u| (|spadConstant| $ 63) (QREFELT $ 64)) (QUOTE NIL))
+           ((QUOTE T) (QUOTE T)))) (GO G191)))
+        (SEQ
+         (LETT |d|
+          (MAX |d| 
+           (+ 
+            (* |w| (SPADCALL |u| (QREFELT $ 65)))
+            (SPADCALL (SPADCALL |u| (QREFELT $ 66)) |lv| (QREFELT $ 71))))
+          |POLYCAT-;totalDegree;SLNni;14|)
+         (EXIT
+          (LETT |u|
+           (SPADCALL |u| (QREFELT $ 68))
+           |POLYCAT-;totalDegree;SLNni;14|)))
+         NIL 
+         (GO G190) 
+         G191 
+         (EXIT NIL))
+       (EXIT |d|)))))))) 
+
+(DEFUN |POLYCAT-;resultant;2SVarSetS;15| (|p1| |p2| |mvar| $)
+ (SPADCALL
+  (SPADCALL |p1| |mvar| (QREFELT $ 47))
+  (SPADCALL |p2| |mvar| (QREFELT $ 47))
+  (QREFELT $ 73))) 
+
+(DEFUN |POLYCAT-;discriminant;SVarSetS;16| (|p| |var| $)
+ (SPADCALL (SPADCALL |p| |var| (QREFELT $ 47)) (QREFELT $ 75))) 
+
+(DEFUN |POLYCAT-;allMonoms| (|l| $)
+ (PROG (#0=#:G1532 |p| #1=#:G1533)
+  (RETURN
+   (SEQ
+    (SPADCALL
+     (SPADCALL
+      (PROGN
+       (LETT #0# NIL |POLYCAT-;allMonoms|)
+       (SEQ
+        (LETT |p| NIL |POLYCAT-;allMonoms|)
+        (LETT #1# |l| |POLYCAT-;allMonoms|)
+        G190
+        (COND
+         ((OR (ATOM #1#) (PROGN (LETT |p| (CAR #1#) |POLYCAT-;allMonoms|) NIL))
+          (GO G191)))
         (SEQ 
-          (LETT |bj| NIL |POLYCAT-;P2R|)
-          (LETT #1# |b| |POLYCAT-;P2R|)
-          (LETT |i| (SPADCALL |w| (QREFELT |$| 84)) |POLYCAT-;P2R|)
-          (LETT #2# (QVSIZE |w|) |POLYCAT-;P2R|)
+         (EXIT 
+          (LETT #0#
+           (CONS (SPADCALL |p| (QREFELT $ 77)) #0#)
+           |POLYCAT-;allMonoms|)))
+        (LETT #1# (CDR #1#) |POLYCAT-;allMonoms|)
+        (GO G190)
+        G191
+        (EXIT (NREVERSE0 #0#))))
+      (QREFELT $ 79))
+     (QREFELT $ 80)))))) 
+
+(DEFUN |POLYCAT-;P2R| (|p| |b| |n| $)
+ (PROG (|w| |bj| #0=#:G1538 |i| #1=#:G1537)
+  (RETURN 
+   (SEQ
+    (LETT |w|
+     (SPADCALL |n| (|spadConstant| $ 22) (QREFELT $ 82))
+     |POLYCAT-;P2R|)
+    (SEQ
+     (LETT |bj| NIL |POLYCAT-;P2R|)
+     (LETT #0# |b| |POLYCAT-;P2R|)
+     (LETT |i| (SPADCALL |w| (QREFELT $ 84)) |POLYCAT-;P2R|)
+     (LETT #1# (QVSIZE |w|) |POLYCAT-;P2R|)
+     G190
+     (COND
+      ((OR (> |i| #1#)
+           (ATOM #0#)
+           (PROGN (LETT |bj| (CAR #0#) |POLYCAT-;P2R|) NIL))
+       (GO G191)))
+     (SEQ
+      (EXIT
+       (SPADCALL |w| |i| (SPADCALL |p| |bj| (QREFELT $ 85)) (QREFELT $ 86))))
+     (LETT |i|
+      (PROG1 (+ |i| 1) (LETT #0# (CDR #0#) |POLYCAT-;P2R|)) |POLYCAT-;P2R|)
+     (GO G190)
+     G191
+     (EXIT NIL))
+    (EXIT |w|))))) 
+
+(DEFUN |POLYCAT-;eq2R| (|l| |b| $)
+ (PROG (#0=#:G1542 |bj| #1=#:G1543 #2=#:G1544 |p| #3=#:G1545)
+  (RETURN
+   (SEQ
+    (SPADCALL
+     (PROGN
+      (LETT #0# NIL |POLYCAT-;eq2R|)
+      (SEQ
+       (LETT |bj| NIL |POLYCAT-;eq2R|)
+       (LETT #1# |b| |POLYCAT-;eq2R|)
+       G190
+       (COND
+        ((OR (ATOM #1#) 
+             (PROGN (LETT |bj| (CAR #1#) |POLYCAT-;eq2R|) NIL)) (GO G191)))
+       (SEQ 
+        (EXIT
+         (LETT #0#
+          (CONS
+           (PROGN
+            (LETT #2# NIL |POLYCAT-;eq2R|)
+            (SEQ
+             (LETT |p| NIL |POLYCAT-;eq2R|)
+             (LETT #3# |l| |POLYCAT-;eq2R|)
+             G190
+             (COND
+              ((OR (ATOM #3#) (PROGN (LETT |p| (CAR #3#) |POLYCAT-;eq2R|) NIL))
+               (GO G191)))
+             (SEQ 
+              (EXIT
+               (LETT #2# 
+                (CONS (SPADCALL |p| |bj| (QREFELT $ 85)) #2#)
+                |POLYCAT-;eq2R|)))
+             (LETT #3# (CDR #3#) |POLYCAT-;eq2R|)
+             (GO G190)
+             G191
+             (EXIT (NREVERSE0 #2#))))
+           #0#)
+          |POLYCAT-;eq2R|)))
+       (LETT #1# (CDR #1#) |POLYCAT-;eq2R|)
+       (GO G190)
+       G191
+       (EXIT (NREVERSE0 #0#))))
+     (QREFELT $ 89)))))) 
+
+(DEFUN |POLYCAT-;reducedSystem;MM;20| (|m| $)
+ (PROG (#0=#:G1555 |r| #1=#:G1556 |b| #2=#:G1557 |bj| #3=#:G1558 |d| |mm| |l|)
+  (RETURN
+   (SEQ
+    (LETT |l| (SPADCALL |m| (QREFELT $ 92)) |POLYCAT-;reducedSystem;MM;20|)
+    (LETT |b|
+     (SPADCALL
+      (SPADCALL
+       (PROGN
+        (LETT #0# NIL |POLYCAT-;reducedSystem;MM;20|)
+        (SEQ
+         (LETT |r| NIL |POLYCAT-;reducedSystem;MM;20|)
+         (LETT #1# |l| |POLYCAT-;reducedSystem;MM;20|)
+         G190
+        (COND
+         ((OR (ATOM #1#) 
+              (PROGN (LETT |r| (CAR #1#) |POLYCAT-;reducedSystem;MM;20|) NIL))
+          (GO G191)))
+        (SEQ 
+         (EXIT 
+          (LETT #0# 
+           (CONS (|POLYCAT-;allMonoms| |r| $) #0#)
+           |POLYCAT-;reducedSystem;MM;20|)))
+        (LETT #1# (CDR #1#) |POLYCAT-;reducedSystem;MM;20|)
+        (GO G190)
+        G191
+        (EXIT (NREVERSE0 #0#))))
+       (QREFELT $ 79))
+      (QREFELT $ 80))
+     |POLYCAT-;reducedSystem;MM;20|)
+    (LETT |d|
+     (PROGN
+      (LETT #2# NIL |POLYCAT-;reducedSystem;MM;20|)
+      (SEQ
+       (LETT |bj| NIL |POLYCAT-;reducedSystem;MM;20|)
+       (LETT #3# |b| |POLYCAT-;reducedSystem;MM;20|)
+       G190
+       (COND
+        ((OR (ATOM #3#) 
+             (PROGN (LETT |bj| (CAR #3#) |POLYCAT-;reducedSystem;MM;20|) NIL))
+         (GO G191)))
+       (SEQ 
+        (EXIT 
+         (LETT #2# 
+          (CONS (SPADCALL |bj| (QREFELT $ 59)) #2#)
+          |POLYCAT-;reducedSystem;MM;20|)))
+       (LETT #3# (CDR #3#) |POLYCAT-;reducedSystem;MM;20|)
+       (GO G190)
+       G191
+       (EXIT (NREVERSE0 #2#))))
+      |POLYCAT-;reducedSystem;MM;20|)
+    (LETT |mm|
+     (|POLYCAT-;eq2R| (|SPADfirst| |l|) |d| $) |POLYCAT-;reducedSystem;MM;20|)
+    (LETT |l| (CDR |l|) |POLYCAT-;reducedSystem;MM;20|)
+    (SEQ G190
+     (COND
+      ((NULL (COND ((NULL |l|) (QUOTE NIL)) ((QUOTE T) (QUOTE T)))) (GO G191)))
+     (SEQ
+      (LETT |mm| 
+       (SPADCALL |mm| (|POLYCAT-;eq2R| (|SPADfirst| |l|) |d| $) (QREFELT $ 93))
+       |POLYCAT-;reducedSystem;MM;20|)
+      (EXIT (LETT |l| (CDR |l|) |POLYCAT-;reducedSystem;MM;20|)))
+     NIL
+     (GO G190)
+     G191
+     (EXIT NIL))
+    (EXIT |mm|))))) 
+
+(DEFUN |POLYCAT-;reducedSystem;MVR;21| (|m| |v| $)
+ (PROG (#0=#:G1570 |s| #1=#:G1571 |b| #2=#:G1572 |bj| #3=#:G1573 |d| |n| 
+        |mm| |w| |l| |r|)
+  (RETURN
+   (SEQ
+    (LETT |l| (SPADCALL |m| (QREFELT $ 92)) |POLYCAT-;reducedSystem;MVR;21|)
+    (LETT |r| (SPADCALL |v| (QREFELT $ 97)) |POLYCAT-;reducedSystem;MVR;21|)
+    (LETT |b| 
+     (SPADCALL 
+      (SPADCALL 
+       (|POLYCAT-;allMonoms| |r| $)
+       (SPADCALL 
+        (PROGN 
+         (LETT #0# NIL |POLYCAT-;reducedSystem;MVR;21|)
+         (SEQ
+          (LETT |s| NIL |POLYCAT-;reducedSystem;MVR;21|)
+          (LETT #1# |l| |POLYCAT-;reducedSystem;MVR;21|)
           G190
-          (COND 
-            ((OR 
-                (|>| |i| #2#)
-                (ATOM #1#)
-                (PROGN (LETT |bj| (CAR #1#) |POLYCAT-;P2R|) NIL))
-              (GO G191)))
+          (COND
+           ((OR (ATOM #1#) 
+                (PROGN 
+                 (LETT |s| (CAR #1#) |POLYCAT-;reducedSystem;MVR;21|)
+                  NIL))
+            (GO G191)))
           (SEQ 
-            (EXIT 
-              (SPADCALL |w| |i| 
-                (SPADCALL |p| |bj| (QREFELT |$| 85))
-                (QREFELT |$| 86))))
-          (LETT |i| 
-            (PROG1 
-              (|+| |i| 1)
-              (LETT #1# (CDR #1#) |POLYCAT-;P2R|))
-            |POLYCAT-;P2R|)
+           (EXIT 
+            (LETT #0# 
+             (CONS (|POLYCAT-;allMonoms| |s| $) #0#) 
+             |POLYCAT-;reducedSystem;MVR;21|)))
+          (LETT #1# (CDR #1#) |POLYCAT-;reducedSystem;MVR;21|)
           (GO G190)
           G191
-          (EXIT NIL))
-        (EXIT |w|))))) 
-
-(DEFUN |POLYCAT-;eq2R| (|l| |b| |$|) 
-  (PROG (#1=#:G101964 |bj| #2=#:G101965 #3=#:G101966 |p| #4=#:G101967) 
-    (RETURN 
-      (SEQ 
-        (SPADCALL 
+          (EXIT (NREVERSE0 #0#))))
+        (QREFELT $ 79))
+       (QREFELT $ 98))
+      (QREFELT $ 80))
+     |POLYCAT-;reducedSystem;MVR;21|)
+    (LETT |d|
+     (PROGN
+      (LETT #2# NIL |POLYCAT-;reducedSystem;MVR;21|)
+      (SEQ
+       (LETT |bj| NIL |POLYCAT-;reducedSystem;MVR;21|)
+       (LETT #3# |b| |POLYCAT-;reducedSystem;MVR;21|)
+       G190
+       (COND
+        ((OR (ATOM #3#) 
+             (PROGN (LETT |bj| (CAR #3#) |POLYCAT-;reducedSystem;MVR;21|) NIL))
+         (GO G191)))
+       (SEQ 
+        (EXIT 
+         (LETT #2# 
+          (CONS (SPADCALL |bj| (QREFELT $ 59)) #2#)
+          |POLYCAT-;reducedSystem;MVR;21|)))
+       (LETT #3# (CDR #3#) |POLYCAT-;reducedSystem;MVR;21|)
+       (GO G190)
+       G191
+       (EXIT (NREVERSE0 #2#))))
+      |POLYCAT-;reducedSystem;MVR;21|)
+    (LETT |n| (LENGTH |d|) |POLYCAT-;reducedSystem;MVR;21|)
+    (LETT |mm| 
+     (|POLYCAT-;eq2R| (|SPADfirst| |l|) |d| $)
+     |POLYCAT-;reducedSystem;MVR;21|)
+    (LETT |w| 
+     (|POLYCAT-;P2R| (|SPADfirst| |r|) |d| |n| $)
+     |POLYCAT-;reducedSystem;MVR;21|)
+    (LETT |l| (CDR |l|) |POLYCAT-;reducedSystem;MVR;21|)
+    (LETT |r| (CDR |r|) |POLYCAT-;reducedSystem;MVR;21|)
+    (SEQ G190
+     (COND
+      ((NULL (COND ((NULL |l|) (QUOTE NIL)) ((QUOTE T) (QUOTE T))))
+       (GO G191)))
+     (SEQ
+      (LETT |mm| 
+       (SPADCALL |mm| (|POLYCAT-;eq2R| (|SPADfirst| |l|) |d| $) (QREFELT $ 93))
+       |POLYCAT-;reducedSystem;MVR;21|)
+      (LETT |w| 
+       (SPADCALL |w| 
+        (|POLYCAT-;P2R| (|SPADfirst| |r|) |d| |n| $)
+        (QREFELT $ 99))
+       |POLYCAT-;reducedSystem;MVR;21|)
+      (LETT |l| (CDR |l|) |POLYCAT-;reducedSystem;MVR;21|)
+      (EXIT (LETT |r| (CDR |r|) |POLYCAT-;reducedSystem;MVR;21|)))
+      NIL
+      (GO G190)
+      G191
+      (EXIT NIL))
+    (EXIT (CONS |mm| |w|)))))) 
+
+(DEFUN |POLYCAT-;gcdPolynomial;3Sup;22| (|pp| |qq| $)
+ (SPADCALL |pp| |qq| (QREFELT $ 104))) 
+
+(DEFUN |POLYCAT-;solveLinearPolynomialEquation;LSupU;23| (|lpp| |pp| $)
+ (SPADCALL |lpp| |pp| (QREFELT $ 109))) 
+
+(DEFUN |POLYCAT-;factorPolynomial;SupF;24| (|pp| $)
+ (SPADCALL |pp| (QREFELT $ 114))) 
+
+(DEFUN |POLYCAT-;factorSquareFreePolynomial;SupF;25| (|pp| $)
+ (SPADCALL |pp| (QREFELT $ 117))) 
+
+(DEFUN |POLYCAT-;factor;SF;26| (|p| $) 
+ (PROG (|v| |ansR| #0=#:G1615 |w| #1=#:G1616 |up| |ansSUP| #2=#:G1617 
+        |ww| #3=#:G1618) 
+  (RETURN
+   (SEQ
+    (LETT |v| (SPADCALL |p| (QREFELT $ 42)) |POLYCAT-;factor;SF;26|)
+    (EXIT
+     (COND
+      ((QEQCAR |v| 1)
+       (SEQ
+        (LETT |ansR| 
+         (SPADCALL (SPADCALL |p| (QREFELT $ 38)) (QREFELT $ 120))
+         |POLYCAT-;factor;SF;26|)
+        (EXIT 
+         (SPADCALL 
+          (SPADCALL (SPADCALL |ansR| (QREFELT $ 122)) (QREFELT $ 40))
           (PROGN 
-            (LETT #1# NIL |POLYCAT-;eq2R|)
+           (LETT #0# NIL |POLYCAT-;factor;SF;26|)
+           (SEQ 
+            (LETT |w| NIL |POLYCAT-;factor;SF;26|)
+            (LETT #1#
+             (SPADCALL |ansR| (QREFELT $ 126))
+             |POLYCAT-;factor;SF;26|)
+            G190 
+            (COND
+             ((OR (ATOM #1#) 
+                  (PROGN (LETT |w| (CAR #1#) |POLYCAT-;factor;SF;26|) NIL))
+              (GO G191)))
             (SEQ 
-              (LETT |bj| NIL |POLYCAT-;eq2R|)
-              (LETT #2# |b| |POLYCAT-;eq2R|)
-              G190
-              (COND 
-                ((OR 
-                   (ATOM #2#)
-                   (PROGN (LETT |bj| (CAR #2#) |POLYCAT-;eq2R|) NIL))
-                 (GO G191)))
-              (SEQ 
-                (EXIT 
-                  (LETT #1# 
-                    (CONS 
-                      (PROGN 
-                        (LETT #3# NIL |POLYCAT-;eq2R|)
-                        (SEQ 
-                          (LETT |p| NIL |POLYCAT-;eq2R|)
-                          (LETT #4# |l| |POLYCAT-;eq2R|)
-                          G190
-                          (COND 
-                            ((OR 
-                               (ATOM #4#) 
-                               (PROGN 
-                                 (LETT |p| (CAR #4#) |POLYCAT-;eq2R|)
-                                  NIL))
-                              (GO G191)))
-                          (SEQ 
-                            (EXIT 
-                              (LETT #3# 
-                                (CONS (SPADCALL |p| |bj| (QREFELT |$| 85)) #3#)
-                                |POLYCAT-;eq2R|)))
-                          (LETT #4# (CDR #4#) |POLYCAT-;eq2R|)
-                          (GO G190)
-                          G191
-                          (EXIT (NREVERSE0 #3#))))
-                      #1#)
-                    |POLYCAT-;eq2R|)))
-              (LETT #2# (CDR #2#) |POLYCAT-;eq2R|)
-              (GO G190)
-              G191
-              (EXIT (NREVERSE0 #1#))))
-           (QREFELT |$| 89)))))) 
-
-(DEFUN |POLYCAT-;reducedSystem;MM;20| (|m| |$|) 
-  (PROG (#1=#:G101979 |r| #2=#:G101980 |b| #3=#:G101977 
-         |bj| #4=#:G101978 |d| |mm| |l|) 
-    (RETURN 
-      (SEQ 
-        (LETT |l| 
-          (SPADCALL |m| (QREFELT |$| 92))
-          |POLYCAT-;reducedSystem;MM;20|)
-        (LETT |b| 
+             (EXIT 
+              (LETT #0# 
+               (CONS 
+                (VECTOR (QVELT |w| 0) 
+                  (SPADCALL (QVELT |w| 1) (QREFELT $ 40)) (QVELT |w| 2))
+                #0#)
+               |POLYCAT-;factor;SF;26|)))
+            (LETT #1# (CDR #1#) |POLYCAT-;factor;SF;26|)
+            (GO G190)
+            G191
+            (EXIT (NREVERSE0 #0#))))
+          (QREFELT $ 130)))))
+      ((QUOTE T)
+       (SEQ
+        (LETT |up|
+         (SPADCALL |p| (QCDR |v|) (QREFELT $ 47)) |POLYCAT-;factor;SF;26|)
+        (LETT |ansSUP| (SPADCALL |up| (QREFELT $ 114)) |POLYCAT-;factor;SF;26|)
+        (EXIT
+         (SPADCALL
           (SPADCALL 
-            (SPADCALL 
-              (PROGN 
-                (LETT #1# NIL |POLYCAT-;reducedSystem;MM;20|)
-                (SEQ 
-                  (LETT |r| NIL |POLYCAT-;reducedSystem;MM;20|)
-                  (LETT #2# |l| |POLYCAT-;reducedSystem;MM;20|)
-                  G190
-                  (COND 
-                    ((OR 
-                       (ATOM #2#)
-                       (PROGN 
-                         (LETT |r| (CAR #2#) |POLYCAT-;reducedSystem;MM;20|)
-                         NIL))
-                     (GO G191)))
-                  (SEQ 
-                    (EXIT 
-                      (LETT #1# 
-                        (CONS (|POLYCAT-;allMonoms| |r| |$|) #1#)
-                        |POLYCAT-;reducedSystem;MM;20|)))
-                  (LETT #2# (CDR #2#) |POLYCAT-;reducedSystem;MM;20|)
-                  (GO G190)
-                  G191
-                  (EXIT (NREVERSE0 #1#))))
-              (QREFELT |$| 79))
-            (QREFELT |$| 80))
-          |POLYCAT-;reducedSystem;MM;20|)
-        (LETT |d| 
+           (SPADCALL |ansSUP| (QREFELT $ 131)) (QCDR |v|) (QREFELT $ 132))
           (PROGN 
-            (LETT #3# NIL |POLYCAT-;reducedSystem;MM;20|)
+           (LETT #2# NIL |POLYCAT-;factor;SF;26|)
+           (SEQ 
+            (LETT |ww| NIL |POLYCAT-;factor;SF;26|)
+            (LETT #3# 
+             (SPADCALL |ansSUP| (QREFELT $ 135))
+             |POLYCAT-;factor;SF;26|)
+            G190
+            (COND
+             ((OR (ATOM #3#)
+                  (PROGN (LETT |ww| (CAR #3#) |POLYCAT-;factor;SF;26|) NIL))
+              (GO G191)))
             (SEQ 
-              (LETT |bj| NIL |POLYCAT-;reducedSystem;MM;20|)
-              (LETT #4# |b| |POLYCAT-;reducedSystem;MM;20|)
-              G190
-              (COND 
-                ((OR 
-                   (ATOM #4#)
-                   (PROGN 
-                     (LETT |bj| (CAR #4#) |POLYCAT-;reducedSystem;MM;20|)
-                     NIL))
-                 (GO G191)))
-              (SEQ 
-                (EXIT 
-                  (LETT #3# 
-                    (CONS (SPADCALL |bj| (QREFELT |$| 59)) #3#)
-                    |POLYCAT-;reducedSystem;MM;20|)))
-              (LETT #4# (CDR #4#) |POLYCAT-;reducedSystem;MM;20|)
-              (GO G190)
-              G191
-              (EXIT (NREVERSE0 #3#))))
-          |POLYCAT-;reducedSystem;MM;20|)
-        (LETT |mm| 
-          (|POLYCAT-;eq2R| (|SPADfirst| |l|) |d| |$|)
-          |POLYCAT-;reducedSystem;MM;20|)
-        (LETT |l| (CDR |l|) |POLYCAT-;reducedSystem;MM;20|)
-        (SEQ G190 
-          (COND 
-            ((NULL (COND ((NULL |l|) (QUOTE NIL)) ((QUOTE T) (QUOTE T))))
+             (EXIT 
+              (LETT #2# 
+               (CONS 
+                (VECTOR (QVELT |ww| 0) (SPADCALL (QVELT |ww| 1) (QCDR |v|) 
+                        (QREFELT $ 132)) (QVELT |ww| 2))
+                #2#) 
+               |POLYCAT-;factor;SF;26|)))
+            (LETT #3# (CDR #3#) |POLYCAT-;factor;SF;26|)
+            (GO G190)
+            G191
+            (EXIT (NREVERSE0 #2#))))
+          (QREFELT $ 130))))))))))) 
+
+(DEFUN |POLYCAT-;conditionP;MU;27| (|mat| $)
+ (PROG (|ll| #0=#:G1653 |z| #1=#:G1654 |ch| |l| #2=#:G1655 #3=#:G1656 
+        #4=#:G1625 #5=#:G1623 #6=#:G1624 #7=#:G1657 |vars| |degs| 
+        #8=#:G1658 |d| #9=#:G1659 |nd| #10=#:G1652 #11=#:G1632 |deg1| 
+        |redmons| #12=#:G1660 |v| #13=#:G1662 |u| #14=#:G1661 |llR| 
+        |monslist| |ans| #15=#:G1663 #16=#:G1664 |mons| #17=#:G1665 |m| 
+        #18=#:G1666 |i| #19=#:G1648 #20=#:G1646 #21=#:G1647)
+  (RETURN
+   (SEQ
+    (EXIT
+     (SEQ
+      (LETT |ll|
+       (SPADCALL (SPADCALL |mat| (QREFELT $ 137)) (QREFELT $ 92))
+       |POLYCAT-;conditionP;MU;27|)
+      (LETT |llR|
+       (PROGN
+        (LETT #0# NIL |POLYCAT-;conditionP;MU;27|)
+        (SEQ
+         (LETT |z| NIL |POLYCAT-;conditionP;MU;27|)
+         (LETT #1# (|SPADfirst| |ll|) |POLYCAT-;conditionP;MU;27|)
+         G190
+         (COND
+          ((OR (ATOM #1#) 
+               (PROGN (LETT |z| (CAR #1#) |POLYCAT-;conditionP;MU;27|) NIL))
+           (GO G191)))
+         (SEQ (EXIT (LETT #0# (CONS NIL #0#) |POLYCAT-;conditionP;MU;27|)))
+         (LETT #1# (CDR #1#) |POLYCAT-;conditionP;MU;27|)
+         (GO G190)
+         G191
+         (EXIT (NREVERSE0 #0#))))
+       |POLYCAT-;conditionP;MU;27|)
+      (LETT |monslist| NIL |POLYCAT-;conditionP;MU;27|)
+      (LETT |ch| (SPADCALL (QREFELT $ 138)) |POLYCAT-;conditionP;MU;27|)
+      (SEQ
+       (LETT |l| NIL |POLYCAT-;conditionP;MU;27|)
+       (LETT #2# |ll| |POLYCAT-;conditionP;MU;27|)
+       G190
+       (COND
+        ((OR (ATOM #2#) 
+             (PROGN (LETT |l| (CAR #2#) |POLYCAT-;conditionP;MU;27|) NIL))
+         (GO G191)))
+       (SEQ
+        (LETT |mons|
+         (PROGN
+          (LETT #6# NIL |POLYCAT-;conditionP;MU;27|)
+          (SEQ
+           (LETT |u| NIL |POLYCAT-;conditionP;MU;27|)
+           (LETT #3# |l| |POLYCAT-;conditionP;MU;27|)
+           G190
+           (COND
+            ((OR (ATOM #3#) 
+                 (PROGN (LETT |u| (CAR #3#) |POLYCAT-;conditionP;MU;27|) NIL))
              (GO G191)))
-          (SEQ 
-            (LETT |mm| 
-              (SPADCALL |mm| 
-                (|POLYCAT-;eq2R| (|SPADfirst| |l|) |d| |$|) (QREFELT |$| 93))
-              |POLYCAT-;reducedSystem;MM;20|)
-            (EXIT (LETT |l| (CDR |l|) |POLYCAT-;reducedSystem;MM;20|)))
-          NIL 
-          (GO G190) 
-          G191
-          (EXIT NIL))
-        (EXIT |mm|))))) 
-
-(DEFUN |POLYCAT-;reducedSystem;MVR;21| (|m| |v| |$|) 
-  (PROG (#1=#:G101994 |s| #2=#:G101995 |b| #3=#:G101992 |bj| #4=#:G101993 
-         |d| |n| |mm| |w| |l| |r|) 
-    (RETURN 
-      (SEQ 
-        (LETT |l| (SPADCALL |m| (QREFELT |$| 92)) |POLYCAT-;reducedSystem;MVR;21|)
-        (LETT |r| (SPADCALL |v| (QREFELT |$| 97)) |POLYCAT-;reducedSystem;MVR;21|)
-        (LETT |b| 
-          (SPADCALL 
-            (SPADCALL 
-              (|POLYCAT-;allMonoms| |r| |$|)
-              (SPADCALL 
+           (SEQ
+            (EXIT
+             (PROGN
+              (LETT #4# 
+               (SPADCALL |u| (QREFELT $ 77))
+               |POLYCAT-;conditionP;MU;27|)
+              (COND
+               (#6# 
+                (LETT #5# 
+                 (SPADCALL #5# #4# (QREFELT $ 139))
+                 |POLYCAT-;conditionP;MU;27|))
+               ((QUOTE T)
                 (PROGN 
-                  (LETT #1# NIL |POLYCAT-;reducedSystem;MVR;21|)
-                  (SEQ 
-                    (LETT |s| NIL |POLYCAT-;reducedSystem;MVR;21|)
-                    (LETT #2# |l| |POLYCAT-;reducedSystem;MVR;21|)
-                    G190
-                    (COND 
-                      ((OR 
-                         (ATOM #2#) 
-                         (PROGN 
-                           (LETT |s| (CAR #2#) |POLYCAT-;reducedSystem;MVR;21|)
-                           NIL))
-                       (GO G191)))
-                    (SEQ 
-                      (EXIT 
-                        (LETT #1# 
-                          (CONS (|POLYCAT-;allMonoms| |s| |$|) #1#)
-                          |POLYCAT-;reducedSystem;MVR;21|)))
-                    (LETT #2# (CDR #2#) |POLYCAT-;reducedSystem;MVR;21|)
-                    (GO G190)
-                    G191
-                    (EXIT (NREVERSE0 #1#))))
-                (QREFELT |$| 79))
-              (QREFELT |$| 98))
-            (QREFELT |$| 80))
-          |POLYCAT-;reducedSystem;MVR;21|)
-        (LETT |d| 
-          (PROGN 
-            (LETT #3# NIL |POLYCAT-;reducedSystem;MVR;21|)
-            (SEQ 
-              (LETT |bj| NIL |POLYCAT-;reducedSystem;MVR;21|)
-              (LETT #4# |b| |POLYCAT-;reducedSystem;MVR;21|)
-              G190
-              (COND 
-                ((OR 
-                  (ATOM #4#)
-                  (PROGN 
-                     (LETT |bj| (CAR #4#) |POLYCAT-;reducedSystem;MVR;21|)
-                     NIL)) 
-                 (GO G191)))
-              (SEQ 
-                (EXIT 
-                  (LETT #3# 
-                    (CONS (SPADCALL |bj| (QREFELT |$| 59)) #3#)
-                    |POLYCAT-;reducedSystem;MVR;21|)))
-              (LETT #4# (CDR #4#) |POLYCAT-;reducedSystem;MVR;21|)
-              (GO G190)
-              G191
-              (EXIT (NREVERSE0 #3#))))
-          |POLYCAT-;reducedSystem;MVR;21|)
-        (LETT |n| (LENGTH |d|) |POLYCAT-;reducedSystem;MVR;21|)
-        (LETT |mm| 
-          (|POLYCAT-;eq2R| (|SPADfirst| |l|) |d| |$|)
-          |POLYCAT-;reducedSystem;MVR;21|)
-        (LETT |w| 
-          (|POLYCAT-;P2R| (|SPADfirst| |r|) |d| |n| |$|)
-          |POLYCAT-;reducedSystem;MVR;21|)
-        (LETT |l| (CDR |l|) |POLYCAT-;reducedSystem;MVR;21|)
-        (LETT |r| (CDR |r|) |POLYCAT-;reducedSystem;MVR;21|)
-        (SEQ G190 
-          (COND 
-            ((NULL (COND ((NULL |l|) (QUOTE NIL)) ((QUOTE T) (QUOTE T))))
-              (GO G191)))
-          (SEQ 
-            (LETT |mm| 
-              (SPADCALL |mm| 
-                (|POLYCAT-;eq2R| (|SPADfirst| |l|) |d| |$|)
-                (QREFELT |$| 93))
-              |POLYCAT-;reducedSystem;MVR;21|)
-            (LETT |w| 
-              (SPADCALL |w| 
-                (|POLYCAT-;P2R| (|SPADfirst| |r|) |d| |n| |$|)
-                (QREFELT |$| 99))
-              |POLYCAT-;reducedSystem;MVR;21|)
-            (LETT |l| (CDR |l|) |POLYCAT-;reducedSystem;MVR;21|)
-            (EXIT (LETT |r| (CDR |r|) |POLYCAT-;reducedSystem;MVR;21|)))
-           NIL
+                 (LETT #5# #4# |POLYCAT-;conditionP;MU;27|)
+                 (LETT #6# (QUOTE T) |POLYCAT-;conditionP;MU;27|)))))))
+           (LETT #3# (CDR #3#) |POLYCAT-;conditionP;MU;27|)
            (GO G190)
            G191
            (EXIT NIL))
-        (EXIT (CONS |mm| |w|)))))) 
-
-(DEFUN |POLYCAT-;gcdPolynomial;3Sup;22| (|pp| |qq| |$|) 
-  (SPADCALL |pp| |qq| (QREFELT |$| 104))) 
-
-(DEFUN |POLYCAT-;solveLinearPolynomialEquation;LSupU;23| (|lpp| |pp| |$|) 
-  (SPADCALL |lpp| |pp| (QREFELT |$| 109))) 
-
-(DEFUN |POLYCAT-;factorPolynomial;SupF;24| (|pp| |$|) 
-  (SPADCALL |pp| (QREFELT |$| 114))) 
-
-(DEFUN |POLYCAT-;factorSquareFreePolynomial;SupF;25| (|pp| |$|) 
-  (SPADCALL |pp| (QREFELT |$| 117))) 
-
-(DEFUN |POLYCAT-;factor;SF;26| (|p| |$|) 
-  (PROG (|v| |ansR| #1=#:G102039 |w| #2=#:G102040 |up| |ansSUP| 
-         #3=#:G102037 |ww| #4=#:G102038) 
-    (RETURN 
-      (SEQ 
-        (LETT |v| (SPADCALL |p| (QREFELT |$| 42)) |POLYCAT-;factor;SF;26|)
-        (EXIT 
-          (COND 
-            ((QEQCAR |v| 1) 
-              (SEQ 
-                (LETT |ansR| 
-                  (SPADCALL (SPADCALL |p| (QREFELT |$| 38)) (QREFELT |$| 120))
-                  |POLYCAT-;factor;SF;26|)
-                (EXIT 
-                  (SPADCALL 
-                    (SPADCALL 
-                      (SPADCALL |ansR| (QREFELT |$| 122))
-                      (QREFELT |$| 40)) 
-                    (PROGN 
-                      (LETT #1# NIL |POLYCAT-;factor;SF;26|)
-                      (SEQ 
-                        (LETT |w| NIL |POLYCAT-;factor;SF;26|)
-                        (LETT #2# 
-                          (SPADCALL |ansR| (QREFELT |$| 126))
-                          |POLYCAT-;factor;SF;26|)
-                        G190
-                        (COND 
-                          ((OR
-                            (ATOM #2#)
-                            (PROGN 
-                              (LETT |w| (CAR #2#) |POLYCAT-;factor;SF;26|)
-                              NIL))
-                           (GO G191)))
-                        (SEQ 
-                          (EXIT 
-                            (LETT #1# 
-                              (CONS 
-                                (VECTOR 
-                                  (QVELT |w| 0)
-                                  (SPADCALL (QVELT |w| 1) (QREFELT |$| 40))
-                                  (QVELT |w| 2))
-                                #1#)
-                              |POLYCAT-;factor;SF;26|)))
-                        (LETT #2# (CDR #2#) |POLYCAT-;factor;SF;26|)
-                        (GO G190)
-                        G191
-                        (EXIT (NREVERSE0 #1#))))
-                    (QREFELT |$| 130)))))
-            ((QUOTE T) 
-              (SEQ 
-                (LETT |up| 
-                  (SPADCALL |p| (QCDR |v|) (QREFELT |$| 47))
-                  |POLYCAT-;factor;SF;26|)
-                (LETT |ansSUP| 
-                  (SPADCALL |up| (QREFELT |$| 114))
-                  |POLYCAT-;factor;SF;26|)
-                (EXIT 
-                  (SPADCALL 
-                    (SPADCALL 
-                      (SPADCALL |ansSUP| (QREFELT |$| 131))
-                      (QCDR |v|)
-                      (QREFELT |$| 132))
-                    (PROGN 
-                      (LETT #3# NIL |POLYCAT-;factor;SF;26|)
-                      (SEQ 
-                        (LETT |ww| NIL |POLYCAT-;factor;SF;26|)
-                        (LETT #4# 
-                          (SPADCALL |ansSUP| (QREFELT |$| 135))
-                          |POLYCAT-;factor;SF;26|)
-                        G190
-                        (COND
-                          ((OR 
-                            (ATOM #4#)
-                            (PROGN 
-                              (LETT |ww| (CAR #4#) |POLYCAT-;factor;SF;26|)
-                              NIL))
-                            (GO G191)))
-                        (SEQ 
-                          (EXIT 
-                            (LETT #3# 
-                              (CONS 
-                                (VECTOR 
-                                  (QVELT |ww| 0)
-                                  (SPADCALL 
-                                    (QVELT |ww| 1)
-                                    (QCDR |v|)
-                                    (QREFELT |$| 132))
-                                  (QVELT |ww| 2))
-                                #3#)
-                              |POLYCAT-;factor;SF;26|)))
-                        (LETT #4# (CDR #4#) |POLYCAT-;factor;SF;26|)
-                        (GO G190)
-                        G191
-                        (EXIT (NREVERSE0 #3#))))
-                    (QREFELT |$| 130))))))))))) 
-
-(DEFUN |POLYCAT-;conditionP;MU;27| (|mat| |$|) 
-  (PROG (|ll| #1=#:G102087 |z| #2=#:G102088 |ch| |l| #3=#:G102079 
-         #4=#:G102086 #5=#:G102047 #6=#:G102045 #7=#:G102046 #8=#:G102080
-         |vars| |degs| #9=#:G102084 |d| #10=#:G102085 |nd| #11=#:G102074 
-         #12=#:G102054 |deg1| |redmons| #13=#:G102081 |v| #14=#:G102083 |u|
-         #15=#:G102082 |llR| |monslist| |ans| #16=#:G102075 #17=#:G102076
-         |mons| #18=#:G102077 |m| #19=#:G102078 |i| #20=#:G102070
-         #21=#:G102068 #22=#:G102069) 
-    (RETURN 
-      (SEQ 
-        (EXIT 
-          (SEQ 
-            (LETT |ll| 
-              (SPADCALL (SPADCALL |mat| (QREFELT |$| 137)) (QREFELT |$| 92))
-              |POLYCAT-;conditionP;MU;27|)
-            (LETT |llR| 
-              (PROGN (LETT #1# NIL |POLYCAT-;conditionP;MU;27|) 
-                (SEQ 
-                  (LETT |z| NIL |POLYCAT-;conditionP;MU;27|)
-                  (LETT #2# (|SPADfirst| |ll|) |POLYCAT-;conditionP;MU;27|)
-                  G190
-                  (COND 
-                    ((OR 
-                      (ATOM #2#)
-                      (PROGN 
-                        (LETT |z| (CAR #2#) |POLYCAT-;conditionP;MU;27|)
-                        NIL))
-                     (GO G191)))
-                  (SEQ 
-                    (EXIT 
-                      (LETT #1# (CONS NIL #1#) |POLYCAT-;conditionP;MU;27|)))
-                  (LETT #2# (CDR #2#) |POLYCAT-;conditionP;MU;27|)
-                  (GO G190)
-                  G191
-                 (EXIT (NREVERSE0 #1#))))
-              |POLYCAT-;conditionP;MU;27|)
-            (LETT |monslist| NIL |POLYCAT-;conditionP;MU;27|)
-            (LETT |ch| 
-              (SPADCALL (QREFELT |$| 138))
-              |POLYCAT-;conditionP;MU;27|)
-            (SEQ 
-              (LETT |l| NIL |POLYCAT-;conditionP;MU;27|)
-              (LETT #3# |ll| |POLYCAT-;conditionP;MU;27|)
-              G190
-              (COND 
-                ((OR 
-                   (ATOM #3#)
-                   (PROGN 
-                     (LETT |l| (CAR #3#) |POLYCAT-;conditionP;MU;27|)
-                     NIL))
-                 (GO G191)))
-              (SEQ 
-                (LETT |mons| 
-                  (PROGN 
-                    (LETT #7# NIL |POLYCAT-;conditionP;MU;27|)
-                    (SEQ 
-                      (LETT |u| NIL |POLYCAT-;conditionP;MU;27|)
-                      (LETT #4# |l| |POLYCAT-;conditionP;MU;27|)
-                      G190
-                      (COND 
-                        ((OR 
-                           (ATOM #4#)
-                           (PROGN 
-                             (LETT |u| (CAR #4#) |POLYCAT-;conditionP;MU;27|)
-                             NIL))
-                         (GO G191)))
-                      (SEQ 
-                        (EXIT 
-                          (PROGN 
-                            (LETT #5# 
-                              (SPADCALL |u| (QREFELT |$| 77))
-                              |POLYCAT-;conditionP;MU;27|)
-                            (COND 
-                              (#7# 
-                                (LETT #6# 
-                                  (SPADCALL #6# #5# (QREFELT |$| 139))
-                                  |POLYCAT-;conditionP;MU;27|))
-                              ((QUOTE T) 
-                                (PROGN 
-                                  (LETT #6# #5# |POLYCAT-;conditionP;MU;27|)
-                                  (LETT #7# 
-                                    (QUOTE T)
-                                    |POLYCAT-;conditionP;MU;27|)))))))
-                      (LETT #4# (CDR #4#) |POLYCAT-;conditionP;MU;27|)
-                      (GO G190)
-                      G191
-                      (EXIT NIL))
-                    (COND 
-                      (#7# #6#)
-                      ((QUOTE T) (|IdentityError| (QUOTE |setUnion|)))))
-                  |POLYCAT-;conditionP;MU;27|)
-                (LETT |redmons| NIL |POLYCAT-;conditionP;MU;27|)
-                (SEQ 
-                  (LETT |m| NIL |POLYCAT-;conditionP;MU;27|)
-                  (LETT #8# |mons| |POLYCAT-;conditionP;MU;27|)
-                  G190
-                  (COND 
-                    ((OR 
-                       (ATOM #8#)
-                       (PROGN 
-                         (LETT |m| (CAR #8#) |POLYCAT-;conditionP;MU;27|)
-                         NIL))
-                     (GO G191)))
-                  (SEQ 
-                    (LETT |vars| 
-                      (SPADCALL |m| (QREFELT |$| 31))
-                      |POLYCAT-;conditionP;MU;27|)
-                    (LETT |degs| 
-                      (SPADCALL |m| |vars| (QREFELT |$| 140))
-                      |POLYCAT-;conditionP;MU;27|)
-                    (LETT |deg1| 
-                      (PROGN 
-                        (LETT #9# NIL |POLYCAT-;conditionP;MU;27|)
-                        (SEQ 
-                          (LETT |d| NIL |POLYCAT-;conditionP;MU;27|)
-                          (LETT #10# |degs| |POLYCAT-;conditionP;MU;27|)
-                          G190
-                          (COND 
-                            ((OR 
-                              (ATOM #10#)
-                              (PROGN 
-                                (LETT |d| 
-                                  (CAR #10#)
-                                  |POLYCAT-;conditionP;MU;27|)
-                                 NIL))
-                              (GO G191)))
-                          (SEQ 
-                            (EXIT 
-                              (LETT #9# 
-                                (CONS 
-                                  (SEQ 
-                                    (LETT |nd| 
-                                      (SPADCALL |d| |ch| (QREFELT |$| 142))
-                                      |POLYCAT-;conditionP;MU;27|)
-                                    (EXIT 
-                                      (COND 
-                                        ((QEQCAR |nd| 1)
-                                          (PROGN 
-                                            (LETT #11# 
-                                              (CONS 1 "failed")
-                                              |POLYCAT-;conditionP;MU;27|) 
-                                            (GO #11#)))
-                                        ((QUOTE T) 
-                                          (PROG1 
-                                            (LETT #12# 
-                                              (QCDR |nd|)
-                                              |POLYCAT-;conditionP;MU;27|) 
-                                            (|check-subtype| 
-                                              (|>=| #12# 0)
-                                              (QUOTE (|NonNegativeInteger|))
-                                              #12#))))))
-                                  #9#)
-                                |POLYCAT-;conditionP;MU;27|)))
-                          (LETT #10# (CDR #10#) |POLYCAT-;conditionP;MU;27|)
-                          (GO G190)
-                          G191
-                          (EXIT (NREVERSE0 #9#))))
-                      |POLYCAT-;conditionP;MU;27|)
-                    (LETT |redmons| 
-                      (CONS 
-                        (SPADCALL 
-                          (|spadConstant| |$| 33)
-                          |vars|
-                          |deg1|
-                          (QREFELT |$| 54))
-                        |redmons|)
-                      |POLYCAT-;conditionP;MU;27|)
-                    (EXIT
-                      (LETT |llR| 
-                        (PROGN 
-                          (LETT #13# NIL |POLYCAT-;conditionP;MU;27|)
-                          (SEQ 
-                            (LETT |v| NIL |POLYCAT-;conditionP;MU;27|)
-                            (LETT #14# |llR| |POLYCAT-;conditionP;MU;27|)
-                            (LETT |u| NIL |POLYCAT-;conditionP;MU;27|)
-                            (LETT #15# |l| |POLYCAT-;conditionP;MU;27|)
-                            G190
-                            (COND 
-                              ((OR 
-                                (ATOM #15#)
-                                (PROGN 
-                                  (LETT |u| 
-                                    (CAR #15#)
-                                    |POLYCAT-;conditionP;MU;27|)
-                                   NIL) 
-                                (ATOM #14#)
-                                (PROGN 
-                                  (LETT |v| 
-                                    (CAR #14#)
-                                    |POLYCAT-;conditionP;MU;27|)
-                                   NIL))
-                               (GO G191)))
-                            (SEQ 
-                              (EXIT 
-                                (LETT #13# 
-                                  (CONS 
-                                    (CONS 
-                                      (SPADCALL 
-                                        (SPADCALL 
-                                          |u| 
-                                          |vars| 
-                                          |degs| 
-                                          (QREFELT |$| 52)) 
-                                        (QREFELT |$| 143)) 
-                                      |v|) 
-                                    #13#) 
-                                  |POLYCAT-;conditionP;MU;27|)))
-                            (LETT #15# 
-                              (PROG1 
-                                (CDR #15#) 
-                                (LETT #14# 
-                                  (CDR #14#) 
-                                  |POLYCAT-;conditionP;MU;27|)) 
-                                |POLYCAT-;conditionP;MU;27|)
-                            (GO G190)
-                            G191
-                            (EXIT (NREVERSE0 #13#))))
-                        |POLYCAT-;conditionP;MU;27|)))
-                  (LETT #8# (CDR #8#) |POLYCAT-;conditionP;MU;27|)
-                  (GO G190)
-                  G191
-                  (EXIT NIL))
-                (EXIT 
-                  (LETT |monslist| 
-                    (CONS |redmons| |monslist|)
-                    |POLYCAT-;conditionP;MU;27|)))
-              (LETT #3# (CDR #3#) |POLYCAT-;conditionP;MU;27|)
-              (GO G190)
-              G191
-              (EXIT NIL))
-            (LETT |ans| 
-              (SPADCALL 
-                (SPADCALL 
-                  (SPADCALL |llR| (QREFELT |$| 89))
-                  (QREFELT |$| 144))
-                (QREFELT |$| 146))
-              |POLYCAT-;conditionP;MU;27|)
-            (EXIT 
-              (COND 
-                ((QEQCAR |ans| 1) (CONS 1 "failed"))
-                ((QUOTE T) 
-                  (SEQ 
-                    (LETT |i| 0 |POLYCAT-;conditionP;MU;27|)
-                    (EXIT 
-                      (CONS 
-                        0 
-                        (PRIMVEC2ARR 
-                          (PROGN 
-                            (LETT #16# 
-                              (GETREFV (SIZE |monslist|))
-                              |POLYCAT-;conditionP;MU;27|)
-                            (SEQ 
-                              (LETT #17# 0 |POLYCAT-;conditionP;MU;27|)
-                              (LETT |mons| NIL |POLYCAT-;conditionP;MU;27|)
-                              (LETT #18# 
-                                |monslist| 
-                                |POLYCAT-;conditionP;MU;27|)
-                              G190
-                              (COND 
-                                ((OR 
-                                  (ATOM #18#)
-                                  (PROGN 
-                                    (LETT |mons| 
-                                      (CAR #18#)
-                                      |POLYCAT-;conditionP;MU;27|)
-                                    NIL))
-                                 (GO G191)))
-                              (SEQ 
-                                (EXIT 
-                                  (SETELT 
-                                    #16# 
-                                    #17# 
-                                    (PROGN 
-                                      (LETT #22# 
-                                        NIL 
-                                        |POLYCAT-;conditionP;MU;27|)
-                                      (SEQ 
-                                        (LETT |m| 
-                                          NIL 
-                                          |POLYCAT-;conditionP;MU;27|)
-                                        (LETT #19# 
-                                          |mons| 
-                                          |POLYCAT-;conditionP;MU;27|)
-                                        G190
-                                        (COND 
-                                          ((OR 
-                                            (ATOM #19#)
-                                            (PROGN 
-                                              (LETT |m| 
-                                                (CAR #19#)
-                                                |POLYCAT-;conditionP;MU;27|)
-                                               NIL))
-                                           (GO G191)))
-                                        (SEQ 
-                                          (EXIT 
-                                            (PROGN 
-                                              (LETT #20# 
-                                                (SPADCALL |m| 
-                                                  (SPADCALL 
-                                                    (SPADCALL 
-                                                      (QCDR |ans|) 
-                                                      (LETT |i| 
-                                                        (|+| |i| 1) 
-                                                  |POLYCAT-;conditionP;MU;27|)
-                                                      (QREFELT |$| 147)) 
-                                                    (QREFELT |$| 40)) 
-                                                  (QREFELT |$| 148)) 
-                                                |POLYCAT-;conditionP;MU;27|)
-                                              (COND 
-                                                (#22# 
-                                                  (LETT #21# 
-                                                    (SPADCALL #21# #20# 
-                                                      (QREFELT |$| 149))
-                                                  |POLYCAT-;conditionP;MU;27|))
-                                                ((QUOTE T) 
-                                                  (PROGN 
-                                                    (LETT #21# #20# 
-                                                   |POLYCAT-;conditionP;MU;27|)
-                                                    (LETT #22# (QUOTE T) 
-                                             |POLYCAT-;conditionP;MU;27|)))))))
-                                        (LETT #19# (CDR #19#) 
-                                          |POLYCAT-;conditionP;MU;27|)
-                                        (GO G190)
-                                        G191
-                                        (EXIT NIL))
-                                      (COND 
-                                        (#22# #21#) 
-                                        ((QUOTE T) 
-                                          (|spadConstant| |$| 21)))))))
-                              (LETT #18# 
-                                (PROG1 
-                                  (CDR #18#)
-                                  (LETT #17# 
-                                    (QSADD1 #17#)
-                                    |POLYCAT-;conditionP;MU;27|))
-                                |POLYCAT-;conditionP;MU;27|)
-                              (GO G190)
-                              G191
-                              (EXIT NIL))
-                            #16#))))))))))
-        #11# 
-        (EXIT #11#))))) 
-
-(DEFUN |POLYCAT-;charthRoot;SU;28| (|p| |$|) 
-  (PROG (|vars| |ans| |ch|) 
-    (RETURN 
-      (SEQ 
-        (LETT |vars| 
-          (SPADCALL |p| (QREFELT |$| 31)) |POLYCAT-;charthRoot;SU;28|)
-        (EXIT 
-          (COND 
-            ((NULL |vars|)
-              (SEQ 
-                (LETT |ans| 
-                  (SPADCALL 
-                    (SPADCALL |p| (QREFELT |$| 143))
-                    (QREFELT |$| 151)) 
-                  |POLYCAT-;charthRoot;SU;28|)
-                (EXIT 
-                  (COND 
-                    ((QEQCAR |ans| 1)
-                       (CONS 1 "failed"))
-                    ((QUOTE T) 
-                       (CONS 0 (SPADCALL (QCDR |ans|) (QREFELT |$| 40))))))))
-            ((QUOTE T) 
-              (SEQ 
-                (LETT |ch| 
-                  (SPADCALL (QREFELT |$| 138))
-                  |POLYCAT-;charthRoot;SU;28|)
-                (EXIT (|POLYCAT-;charthRootlv| |p| |vars| |ch| |$|)))))))))) 
-
-(DEFUN |POLYCAT-;charthRootlv| (|p| |vars| |ch| |$|) 
-  (PROG (|v| |dd| |cp| |d| #1=#:G102109 |ans| |ansx| #2=#:G102116) 
-    (RETURN 
-      (SEQ 
-        (EXIT 
-          (COND 
-            ((NULL |vars|) 
+          (COND (#6# #5#) ((QUOTE T) (|IdentityError| (QUOTE |setUnion|)))))
+         |POLYCAT-;conditionP;MU;27|)
+        (LETT |redmons| NIL |POLYCAT-;conditionP;MU;27|)
+        (SEQ
+         (LETT |m| NIL |POLYCAT-;conditionP;MU;27|)
+         (LETT #7# |mons| |POLYCAT-;conditionP;MU;27|)
+         G190
+         (COND
+          ((OR (ATOM #7#) 
+               (PROGN (LETT |m| (CAR #7#) |POLYCAT-;conditionP;MU;27|) NIL)) 
+            (GO G191)))
+         (SEQ 
+          (LETT |vars|
+           (SPADCALL |m| (QREFELT $ 31))
+           |POLYCAT-;conditionP;MU;27|)
+          (LETT |degs|
+           (SPADCALL |m| |vars| (QREFELT $ 140))
+           |POLYCAT-;conditionP;MU;27|)
+          (LETT |deg1|
+           (PROGN
+            (LETT #8# NIL |POLYCAT-;conditionP;MU;27|)
+            (SEQ
+             (LETT |d| NIL |POLYCAT-;conditionP;MU;27|)
+             (LETT #9# |degs| |POLYCAT-;conditionP;MU;27|)
+             G190
+             (COND
+              ((OR (ATOM #9#) 
+                   (PROGN
+                    (LETT |d| (CAR #9#) |POLYCAT-;conditionP;MU;27|)
+                    NIL))
+               (GO G191)))
              (SEQ 
-               (LETT |ans| 
-                 (SPADCALL (SPADCALL |p| (QREFELT |$| 143)) (QREFELT |$| 151))
-                 |POLYCAT-;charthRootlv|)
-               (EXIT 
-                 (COND 
-                   ((QEQCAR |ans| 1) (CONS 1 "failed"))
-                   ((QUOTE T) 
-                     (CONS 0 (SPADCALL (QCDR |ans|) (QREFELT |$| 40))))))))
-            ((QUOTE T) 
-              (SEQ 
-                (LETT |v| (|SPADfirst| |vars|) |POLYCAT-;charthRootlv|)
-                (LETT |vars| (CDR |vars|) |POLYCAT-;charthRootlv|)
-                (LETT |d| 
-                  (SPADCALL |p| |v| (QREFELT |$| 36))
-                  |POLYCAT-;charthRootlv|)
-                (LETT |ans| (|spadConstant| |$| 21) |POLYCAT-;charthRootlv|)
-                (SEQ G190 
-                  (COND ((NULL (|<| 0 |d|)) (GO G191)))
-                  (SEQ 
-                    (LETT |dd| 
-                      (SPADCALL |d| |ch| (QREFELT |$| 142))
-                      |POLYCAT-;charthRootlv|)
-                    (EXIT 
-                      (COND 
-                        ((QEQCAR |dd| 1) 
-                          (PROGN 
-                            (LETT #2# 
-                              (CONS 1 "failed")
-                              |POLYCAT-;charthRootlv|)
-                            (GO #2#)))
-                        ((QUOTE T) 
-                          (SEQ 
-                            (LETT |cp| 
-                              (SPADCALL |p| |v| |d| (QREFELT |$| 154))
-                              |POLYCAT-;charthRootlv|)
-                            (LETT |p| 
-                              (SPADCALL |p| 
-                                (SPADCALL |cp| |v| |d| (QREFELT |$| 37))
-                                (QREFELT |$| 155))
-                              |POLYCAT-;charthRootlv|)
-                            (LETT |ansx| 
-                              (|POLYCAT-;charthRootlv| |cp| |vars| |ch| |$|)
-                              |POLYCAT-;charthRootlv|)
-                            (EXIT 
-                              (COND 
-                                ((QEQCAR |ansx| 1) 
-                                  (PROGN 
-                                    (LETT #2# 
-                                      (CONS 1 "failed")
-                                      |POLYCAT-;charthRootlv|) 
-                                    (GO #2#)))
-                                ((QUOTE T) 
-                                  (SEQ 
-                                    (LETT |d| 
-                                      (SPADCALL |p| |v| (QREFELT |$| 36))
-                                      |POLYCAT-;charthRootlv|)
-                                    (EXIT 
-                                      (LETT |ans| 
-                                        (SPADCALL |ans| 
-                                          (SPADCALL 
-                                            (QCDR |ansx|)
-                                            |v|
-                                            (PROG1 
-                                              (LETT #1# 
-                                                (QCDR |dd|)
-                                                |POLYCAT-;charthRootlv|) 
-                                              (|check-subtype| 
-                                                (|>=| #1# 0)
-                                                (QUOTE (|NonNegativeInteger|))
-                                                 #1#))
-                                            (QREFELT |$| 37))
-                                          (QREFELT |$| 149))
-                                        |POLYCAT-;charthRootlv|)))))))))))
-                  NIL
-                  (GO G190)
-                  G191
-                  (EXIT NIL))
-                (LETT |ansx| 
-                  (|POLYCAT-;charthRootlv| |p| |vars| |ch| |$|)
-                  |POLYCAT-;charthRootlv|)
-                (EXIT 
-                  (COND 
-                    ((QEQCAR |ansx| 1)
-                      (PROGN 
-                        (LETT #2# (CONS 1 "failed") |POLYCAT-;charthRootlv|)
-                        (GO #2#)))
+              (EXIT
+               (LETT #8# 
+                (CONS 
+                 (SEQ
+                  (LETT |nd|
+                   (SPADCALL |d| |ch| (QREFELT $ 142))
+                   |POLYCAT-;conditionP;MU;27|)
+                  (EXIT
+                   (COND
+                    ((QEQCAR |nd| 1)
+                      (PROGN
+                        (LETT #10# 
+                         (CONS 1 "failed") |POLYCAT-;conditionP;MU;27|)
+                        (GO #10#)))
                     ((QUOTE T) 
-                      (PROGN 
-                        (LETT #2# 
-                          (CONS 
-                            0 
-                            (SPADCALL |ans| (QCDR |ansx|) (QREFELT |$| 149)))
-                          |POLYCAT-;charthRootlv|)
-                        (GO #2#)))))))))
-       #2# 
-       (EXIT #2#))))) 
-
-(DEFUN |POLYCAT-;monicDivide;2SVarSetR;30| (|p1| |p2| |mvar| |$|) 
-  (PROG (|result|) 
-    (RETURN 
-      (SEQ 
-        (LETT |result| 
-          (SPADCALL 
-            (SPADCALL |p1| |mvar| (QREFELT |$| 47))
-            (SPADCALL |p2| |mvar| (QREFELT |$| 47))
-            (QREFELT |$| 157)) 
-          |POLYCAT-;monicDivide;2SVarSetR;30|)
-        (EXIT 
-          (CONS 
-            (SPADCALL (QCAR |result|) |mvar| (QREFELT |$| 132))
-            (SPADCALL (QCDR |result|) |mvar| (QREFELT |$| 132)))))))) 
-
-(DEFUN |POLYCAT-;squareFree;SF;31| (|p| |$|) 
-  (SPADCALL |p| (QREFELT |$| 160))) 
-
-(DEFUN |POLYCAT-;squareFree;SF;32| (|p| |$|) 
-  (SPADCALL |p| (QREFELT |$| 163))) 
-
-(DEFUN |POLYCAT-;squareFree;SF;33| (|p| |$|) 
-  (SPADCALL |p| (QREFELT |$| 163))) 
-
-(DEFUN |POLYCAT-;squareFreePart;2S;34| (|p| |$|) 
-  (PROG (|s| |f| #1=#:G102132 #2=#:G102130 #3=#:G102128 #4=#:G102129) 
-    (RETURN 
-      (SEQ 
-        (SPADCALL 
-          (SPADCALL 
-            (LETT |s| 
-              (SPADCALL |p| (QREFELT |$| 164))
-              |POLYCAT-;squareFreePart;2S;34|) 
-            (QREFELT |$| 165)) 
-          (PROGN 
-            (LETT #4# NIL |POLYCAT-;squareFreePart;2S;34|)
-            (SEQ 
-              (LETT |f| NIL |POLYCAT-;squareFreePart;2S;34|)
-              (LETT #1# 
-                (SPADCALL |s| (QREFELT |$| 168))
-                |POLYCAT-;squareFreePart;2S;34|)
+                      (PROG1 
+                       (LETT #11# (QCDR |nd|) |POLYCAT-;conditionP;MU;27|)
+                       (|check-subtype| 
+                        (>= #11# 0) (QUOTE (|NonNegativeInteger|)) #11#))))))
+                 #8#)
+                |POLYCAT-;conditionP;MU;27|)))
+            (LETT #9# (CDR #9#) |POLYCAT-;conditionP;MU;27|)
+            (GO G190)
+            G191
+            (EXIT (NREVERSE0 #8#))))
+           |POLYCAT-;conditionP;MU;27|)
+          (LETT |redmons| 
+           (CONS 
+            (SPADCALL (|spadConstant| $ 33) |vars| |deg1| (QREFELT $ 54))
+            |redmons|)
+           |POLYCAT-;conditionP;MU;27|)
+          (EXIT
+           (LETT |llR|
+            (PROGN
+             (LETT #12# NIL |POLYCAT-;conditionP;MU;27|)
+             (SEQ
+              (LETT |v| NIL |POLYCAT-;conditionP;MU;27|)
+              (LETT #13# |llR| |POLYCAT-;conditionP;MU;27|)
+              (LETT |u| NIL |POLYCAT-;conditionP;MU;27|)
+              (LETT #14# |l| |POLYCAT-;conditionP;MU;27|)
               G190
-              (COND 
-                ((OR 
-                  (ATOM #1#)
-                  (PROGN 
-                    (LETT |f| (CAR #1#) |POLYCAT-;squareFreePart;2S;34|)
-                    NIL))
-                 (GO G191)))
+              (COND
+               ((OR (ATOM #14#)
+                 (PROGN
+                  (LETT |u| (CAR #14#) |POLYCAT-;conditionP;MU;27|)
+                   NIL) 
+                 (ATOM #13#)
+                 (PROGN (LETT |v| (CAR #13#) |POLYCAT-;conditionP;MU;27|) NIL))
+                (GO G191)))
               (SEQ 
-                (EXIT 
-                  (PROGN 
-                    (LETT #2# (QCAR |f|) |POLYCAT-;squareFreePart;2S;34|)
-                    (COND 
-                      (#4# 
-                        (LETT #3# 
-                          (SPADCALL #3# #2# (QREFELT |$| 148))
-                          |POLYCAT-;squareFreePart;2S;34|))
-                      ((QUOTE T) 
-                        (PROGN 
-                          (LETT #3# #2# |POLYCAT-;squareFreePart;2S;34|)
-                          (LETT #4# 
-                            (QUOTE T) 
-                            |POLYCAT-;squareFreePart;2S;34|)))))))
-              (LETT #1# (CDR #1#) |POLYCAT-;squareFreePart;2S;34|)
+               (EXIT 
+                (LETT #12#
+                 (CONS
+                  (CONS
+                   (SPADCALL
+                    (SPADCALL |u| |vars| |degs| (QREFELT $ 52))
+                    (QREFELT $ 143))
+                   |v|)
+                  #12#)
+                 |POLYCAT-;conditionP;MU;27|)))
+              (LETT #14#
+               (PROG1
+                (CDR #14#)
+                (LETT #13# (CDR #13#) |POLYCAT-;conditionP;MU;27|))
+               |POLYCAT-;conditionP;MU;27|)
               (GO G190)
               G191
-              (EXIT NIL))
-            (COND 
-              (#4# #3#) 
-              ((QUOTE T) (|spadConstant| |$| 33))))
-          (QREFELT |$| 148)))))) 
-
-(DEFUN |POLYCAT-;content;SVarSetS;35| (|p| |v| |$|) 
-  (SPADCALL (SPADCALL |p| |v| (QREFELT |$| 47)) (QREFELT |$| 170))) 
-
-(DEFUN |POLYCAT-;primitivePart;2S;36| (|p| |$|) 
-  (PROG (#1=#:G102135) 
-    (RETURN 
-      (QVELT 
-        (SPADCALL 
-          (PROG2 
-            (LETT #1# 
-              (SPADCALL |p| (SPADCALL |p| (QREFELT |$| 172)) (QREFELT |$| 173))
-              |POLYCAT-;primitivePart;2S;36|)
-            (QCDR #1#)
-            (|check-union| (QEQCAR #1# 0) (QREFELT |$| 6) #1#))
-          (QREFELT |$| 175))
-        1)))) 
-
-(DEFUN |POLYCAT-;primitivePart;SVarSetS;37| (|p| |v| |$|) 
-  (PROG (#1=#:G102141) 
-    (RETURN 
-      (QVELT 
-        (SPADCALL 
-          (PROG2 
-            (LETT #1# 
-              (SPADCALL |p| 
-                (SPADCALL |p| |v| (QREFELT |$| 177))
-                (QREFELT |$| 178)) 
-              |POLYCAT-;primitivePart;SVarSetS;37|) 
-            (QCDR #1#) 
-            (|check-union| (QEQCAR #1# 0) (QREFELT |$| 6) #1#)) 
-          (QREFELT |$| 175)) 1)))) 
-
-(DEFUN |POLYCAT-;<;2SB;38| (|p| |q| |$|) 
-  (PROG (|dp| |dq|) 
-    (RETURN 
-      (SEQ 
-        (LETT |dp| (SPADCALL |p| (QREFELT |$| 59)) |POLYCAT-;<;2SB;38|)
-        (LETT |dq| (SPADCALL |q| (QREFELT |$| 59)) |POLYCAT-;<;2SB;38|)
-        (EXIT 
-          (COND 
-            ((SPADCALL |dp| |dq| (QREFELT |$| 180))
-              (SPADCALL 
-                (|spadConstant| |$| 22)
-                (SPADCALL |q| (QREFELT |$| 38))
-                (QREFELT |$| 181)))
-            ((SPADCALL |dq| |dp| (QREFELT |$| 180))
-              (SPADCALL 
-                (SPADCALL |p| (QREFELT |$| 38))
-                (|spadConstant| |$| 22)
-                (QREFELT |$| 181)))
-            ((QUOTE T) 
-              (SPADCALL 
-                (SPADCALL 
-                  (SPADCALL |p| |q| (QREFELT |$| 155))
-                  (QREFELT |$| 38))
-                (|spadConstant| |$| 22)
-                (QREFELT |$| 181))))))))) 
-
-(DEFUN |POLYCAT-;patternMatch;SP2Pmr;39| (|p| |pat| |l| |$|) 
-  (SPADCALL |p| |pat| |l| (QREFELT |$| 186))) 
-
-(DEFUN |POLYCAT-;patternMatch;SP2Pmr;40| (|p| |pat| |l| |$|) 
-  (SPADCALL |p| |pat| |l| (QREFELT |$| 192))) 
-
-(DEFUN |POLYCAT-;convert;SP;41| (|x| |$|) 
-  (SPADCALL (ELT |$| 195) (ELT |$| 196) |x| (QREFELT |$| 200))) 
-
-(DEFUN |POLYCAT-;convert;SP;42| (|x| |$|) 
-  (SPADCALL (ELT |$| 202) (ELT |$| 203) |x| (QREFELT |$| 207))) 
-
-(DEFUN |POLYCAT-;convert;SIf;43| (|p| |$|) 
-  (SPADCALL (ELT |$| 210) (ELT |$| 211) |p| (QREFELT |$| 215))) 
-
-(DEFUN |PolynomialCategory&| (|#1| |#2| |#3| |#4|) 
-  (PROG (|DV$1| |DV$2| |DV$3| |DV$4| |dv$| |$| |pv$|) 
-    (RETURN 
-      (PROGN 
-        (LETT |DV$1| (|devaluate| |#1|) . #1=(|PolynomialCategory&|))
-        (LETT |DV$2| (|devaluate| |#2|) . #1#)
-        (LETT |DV$3| (|devaluate| |#3|) . #1#)
-        (LETT |DV$4| (|devaluate| |#4|) . #1#)
-        (LETT |dv$| 
-          (LIST 
-            (QUOTE |PolynomialCategory&|) |DV$1| |DV$2| |DV$3| |DV$4|) . #1#)
-        (LETT |$| (GETREFV 225) . #1#)
-        (QSETREFV |$| 0 |dv$|)
-        (QSETREFV |$| 3 
-          (LETT |pv$| 
-            (|buildPredVector| 0 0 
-              (LIST 
-                (|HasCategory| |#2| 
-                  (QUOTE (|PolynomialFactorizationExplicit|)))
-                (|HasAttribute| |#2| (QUOTE |canonicalUnitNormal|))
-                (|HasCategory| |#2| (QUOTE (|GcdDomain|)))
-                (|HasCategory| |#2| (QUOTE (|CommutativeRing|)))
-                (|HasCategory| |#4| (QUOTE (|PatternMatchable| (|Float|))))
-                (|HasCategory| |#2| (QUOTE (|PatternMatchable| (|Float|))))
-                (|HasCategory| |#4| (QUOTE (|PatternMatchable| (|Integer|))))
-                (|HasCategory| |#2| (QUOTE (|PatternMatchable| (|Integer|))))
-                (|HasCategory| |#4| 
-                  (QUOTE (|ConvertibleTo| (|Pattern| (|Float|)))))
-                (|HasCategory| |#2| 
-                  (QUOTE (|ConvertibleTo| (|Pattern| (|Float|)))))
-                (|HasCategory| |#4| 
-                  (QUOTE (|ConvertibleTo| (|Pattern| (|Integer|)))))
-                (|HasCategory| |#2| 
-                  (QUOTE (|ConvertibleTo| (|Pattern| (|Integer|)))))
-                (|HasCategory| |#4| (QUOTE (|ConvertibleTo| (|InputForm|))))
-                (|HasCategory| |#2| (QUOTE (|ConvertibleTo| (|InputForm|))))
-                (|HasCategory| |#2| (QUOTE (|OrderedSet|))))) . #1#))
-        (|stuffDomainSlots| |$|)
-        (QSETREFV |$| 6 |#1|)
-        (QSETREFV |$| 7 |#2|)
-        (QSETREFV |$| 8 |#3|)
-        (QSETREFV |$| 9 |#4|)
-        (COND 
-          ((|testBitVector| |pv$| 4)
-            (PROGN 
-              (QSETREFV |$| 74 
-                (CONS 
-                  (|dispatchFunction| |POLYCAT-;resultant;2SVarSetS;15|)
-                  |$|))
-              (QSETREFV |$| 76 
-                (CONS 
-                  (|dispatchFunction| |POLYCAT-;discriminant;SVarSetS;16|)
-                  |$|)))))
-        (COND 
-          ((|HasCategory| |#2| (QUOTE (|IntegralDomain|)))
-            (PROGN 
-              (QSETREFV |$| 95 
-                (CONS (|dispatchFunction| |POLYCAT-;reducedSystem;MM;20|) |$|))
-              (QSETREFV |$| 102 
-                (CONS 
-                  (|dispatchFunction| |POLYCAT-;reducedSystem;MVR;21|)
-                  |$|)))))
-        (COND 
-          ((|testBitVector| |pv$| 1)
-            (PROGN 
-              (QSETREFV |$| 105 
-                (CONS 
-                  (|dispatchFunction| |POLYCAT-;gcdPolynomial;3Sup;22|)
-                  |$|))
-              (QSETREFV |$| 112 
-                (CONS 
-                  (|dispatchFunction| 
-                     |POLYCAT-;solveLinearPolynomialEquation;LSupU;23|)
-                   |$|))
-              (QSETREFV |$| 116 
-                (CONS 
-                  (|dispatchFunction| |POLYCAT-;factorPolynomial;SupF;24|)
-                  |$|))
-              (QSETREFV |$| 118 
-                (CONS 
-                  (|dispatchFunction| 
-                    |POLYCAT-;factorSquareFreePolynomial;SupF;25|)
-                  |$|))
-              (QSETREFV |$| 136 
-                (CONS 
-                  (|dispatchFunction| |POLYCAT-;factor;SF;26|) |$|))
-              (COND 
-                ((|HasCategory| |#2| (QUOTE (|CharacteristicNonZero|)))
+              (EXIT (NREVERSE0 #12#))))
+            |POLYCAT-;conditionP;MU;27|)))
+         (LETT #7# (CDR #7#) |POLYCAT-;conditionP;MU;27|)
+         (GO G190)
+         G191
+         (EXIT NIL))
+        (EXIT
+         (LETT |monslist| 
+          (CONS |redmons| |monslist|)
+          |POLYCAT-;conditionP;MU;27|)))
+       (LETT #2# (CDR #2#) |POLYCAT-;conditionP;MU;27|)
+       (GO G190)
+       G191
+       (EXIT NIL))
+      (LETT |ans|
+       (SPADCALL (SPADCALL (SPADCALL |llR| (QREFELT $ 89)) (QREFELT $ 144))
+                 (QREFELT $ 146))
+       |POLYCAT-;conditionP;MU;27|)
+      (EXIT
+       (COND 
+        ((QEQCAR |ans| 1) (CONS 1 "failed"))
+        ((QUOTE T)
+         (SEQ
+          (LETT |i| 0 |POLYCAT-;conditionP;MU;27|)
+          (EXIT
+           (CONS 0
+            (PRIMVEC2ARR
+             (PROGN
+              (LETT #15# (GETREFV (SIZE |monslist|)) 
+               |POLYCAT-;conditionP;MU;27|)
+              (SEQ
+               (LETT #16# 0 |POLYCAT-;conditionP;MU;27|)
+               (LETT |mons| NIL |POLYCAT-;conditionP;MU;27|)
+               (LETT #17# |monslist| |POLYCAT-;conditionP;MU;27|)
+               G190
+               (COND 
+                ((OR (ATOM #17#) 
+                     (PROGN 
+                      (LETT |mons| (CAR #17#) |POLYCAT-;conditionP;MU;27|)
+                      NIL))
+                 (GO G191)))
+               (SEQ 
+                (EXIT
+                 (SETELT #15# #16# 
+                  (PROGN
+                   (LETT #21# NIL |POLYCAT-;conditionP;MU;27|)
+                   (SEQ
+                    (LETT |m| NIL |POLYCAT-;conditionP;MU;27|)
+                    (LETT #18# |mons| |POLYCAT-;conditionP;MU;27|)
+                    G190
+                    (COND
+                     ((OR (ATOM #18#)
+                       (PROGN 
+                        (LETT |m| (CAR #18#) |POLYCAT-;conditionP;MU;27|)
+                         NIL))
+                      (GO G191)))
+                    (SEQ
+                     (EXIT
+                      (PROGN
+                       (LETT #19#
+                        (SPADCALL |m| 
+                         (SPADCALL 
+                          (SPADCALL 
+                           (QCDR |ans|)
+                           (LETT |i| (+ |i| 1) |POLYCAT-;conditionP;MU;27|)
+                           (QREFELT $ 147))
+                          (QREFELT $ 40))
+                         (QREFELT $ 148))
+                        |POLYCAT-;conditionP;MU;27|)
+                       (COND
+                        (#21#
+                         (LETT #20# 
+                          (SPADCALL #20# #19# (QREFELT $ 149))
+                          |POLYCAT-;conditionP;MU;27|))
+                        ((QUOTE T)
+                          (PROGN
+                           (LETT #20# #19# |POLYCAT-;conditionP;MU;27|)
+                           (LETT #21# 
+                            (QUOTE T)
+                            |POLYCAT-;conditionP;MU;27|)))))))
+                    (LETT #18# (CDR #18#) |POLYCAT-;conditionP;MU;27|)
+                    (GO G190)
+                    G191
+                    (EXIT NIL))
+                   (COND (#21# #20#) ((QUOTE T) (|spadConstant| $ 21)))))))
+               (LETT #17# 
+                (PROG1 
+                 (CDR #17#)
+                 (LETT #16# (QSADD1 #16#) |POLYCAT-;conditionP;MU;27|))
+                |POLYCAT-;conditionP;MU;27|)
+               (GO G190)
+               G191
+               (EXIT NIL))
+              #15#))))))))))
+   #10#
+   (EXIT #10#))))) 
+
+(DEFUN |POLYCAT-;charthRoot;SU;28| (|p| $)
+ (PROG (|vars| |ans| |ch|)
+  (RETURN
+   (SEQ
+    (LETT |vars| (SPADCALL |p| (QREFELT $ 31)) |POLYCAT-;charthRoot;SU;28|)
+    (EXIT
+     (COND
+      ((NULL |vars|)
+        (SEQ
+         (LETT |ans|
+          (SPADCALL (SPADCALL |p| (QREFELT $ 143)) (QREFELT $ 151))
+          |POLYCAT-;charthRoot;SU;28|)
+         (EXIT
+          (COND
+           ((QEQCAR |ans| 1) (CONS 1 "failed"))
+           ((QUOTE T) (CONS 0 (SPADCALL (QCDR |ans|) (QREFELT $ 40))))))))
+      ((QUOTE T)
+       (SEQ
+        (LETT |ch| (SPADCALL (QREFELT $ 138)) |POLYCAT-;charthRoot;SU;28|)
+        (EXIT (|POLYCAT-;charthRootlv| |p| |vars| |ch| $)))))))))) 
+
+(DEFUN |POLYCAT-;charthRootlv| (|p| |vars| |ch| $)
+ (PROG (|v| |dd| |cp| |d| #0=#:G1687 |ans| |ansx| #1=#:G1694)
+  (RETURN
+   (SEQ
+    (EXIT 
+     (COND
+      ((NULL |vars|)
+       (SEQ
+        (LETT |ans| 
+         (SPADCALL (SPADCALL |p| (QREFELT $ 143)) (QREFELT $ 151))
+         |POLYCAT-;charthRootlv|)
+        (EXIT
+         (COND
+          ((QEQCAR |ans| 1) (CONS 1 "failed"))
+          ((QUOTE T) (CONS 0 (SPADCALL (QCDR |ans|) (QREFELT $ 40))))))))
+      ((QUOTE T)
+       (SEQ
+        (LETT |v| (|SPADfirst| |vars|) |POLYCAT-;charthRootlv|)
+        (LETT |vars| (CDR |vars|) |POLYCAT-;charthRootlv|)
+        (LETT |d| (SPADCALL |p| |v| (QREFELT $ 36)) |POLYCAT-;charthRootlv|)
+        (LETT |ans| (|spadConstant| $ 21) |POLYCAT-;charthRootlv|)
+        (SEQ G190
+         (COND ((NULL (< 0 |d|)) (GO G191)))
+         (SEQ
+          (LETT |dd|
+           (SPADCALL |d| |ch| (QREFELT $ 142))
+           |POLYCAT-;charthRootlv|)
+          (EXIT
+           (COND
+            ((QEQCAR |dd| 1)
+              (PROGN
+               (LETT #1# (CONS 1 "failed") |POLYCAT-;charthRootlv|)
+               (GO #1#)))
+            ((QUOTE T)
+             (SEQ
+              (LETT |cp|
+               (SPADCALL |p| |v| |d| (QREFELT $ 154))
+               |POLYCAT-;charthRootlv|)
+              (LETT |p|
+               (SPADCALL |p|
+                (SPADCALL |cp| |v| |d| (QREFELT $ 37))
+                (QREFELT $ 155))
+               |POLYCAT-;charthRootlv|)
+              (LETT |ansx|
+               (|POLYCAT-;charthRootlv| |cp| |vars| |ch| $)
+               |POLYCAT-;charthRootlv|)
+              (EXIT
+               (COND
+                ((QEQCAR |ansx| 1)
                   (PROGN 
-                    (QSETREFV |$| 150 
-                      (CONS 
-                        (|dispatchFunction| |POLYCAT-;conditionP;MU;27|)
-                        |$|))))))))
-        (COND 
-          ((|HasCategory| |#2| (QUOTE (|CharacteristicNonZero|)))
-            (PROGN 
-              (QSETREFV |$| 152 
-                (CONS 
-                  (|dispatchFunction| |POLYCAT-;charthRoot;SU;28|)
-                  |$|)))))
-        (COND 
-          ((|testBitVector| |pv$| 3)
-            (PROGN 
-              (COND 
-                ((|HasCategory| |#2| (QUOTE (|EuclideanDomain|)))
-                  (COND 
-                    ((|HasCategory| |#2| (QUOTE (|CharacteristicZero|)))
-                      (QSETREFV |$| 161 
-                        (CONS 
-                          (|dispatchFunction| |POLYCAT-;squareFree;SF;31|)
-                          |$|)))
-                    ((QUOTE T) 
-                      (QSETREFV |$| 161 
-                        (CONS 
-                          (|dispatchFunction| |POLYCAT-;squareFree;SF;32|)
-                          |$|)))))
+                   (LETT #1# (CONS 1 "failed") |POLYCAT-;charthRootlv|)
+                   (GO #1#)))
                 ((QUOTE T) 
-                  (QSETREFV |$| 161 
-                    (CONS 
-                      (|dispatchFunction| |POLYCAT-;squareFree;SF;33|) |$|))))
-                (QSETREFV |$| 169 
-                  (CONS 
-                    (|dispatchFunction| |POLYCAT-;squareFreePart;2S;34|) |$|))
-             (QSETREFV |$| 171 
-               (CONS (|dispatchFunction| |POLYCAT-;content;SVarSetS;35|) |$|))
-           (QSETREFV |$| 176 
-             (CONS (|dispatchFunction| |POLYCAT-;primitivePart;2S;36|) |$|))
-         (QSETREFV |$| 179 
-           (CONS 
-            (|dispatchFunction| |POLYCAT-;primitivePart;SVarSetS;37|) |$|)))))
-        (COND 
-          ((|testBitVector| |pv$| 15)
-            (PROGN 
-              (QSETREFV |$| 182 
-                (CONS (|dispatchFunction| |POLYCAT-;<;2SB;38|) |$|))
-              (COND 
-                ((|testBitVector| |pv$| 8) 
-                  (COND 
-                    ((|testBitVector| |pv$| 7)
-                      (QSETREFV |$| 188 
-                        (CONS 
-                          (|dispatchFunction| 
-                            |POLYCAT-;patternMatch;SP2Pmr;39|) 
-                          |$|))))))
-              (COND 
-                ((|testBitVector| |pv$| 6)
-                  (COND 
-                    ((|testBitVector| |pv$| 5)
-                      (QSETREFV |$| 194 
-                        (CONS 
-                          (|dispatchFunction| 
-                            |POLYCAT-;patternMatch;SP2Pmr;40|)
-                          |$|)))))))))
-        (COND 
-          ((|testBitVector| |pv$| 12) 
-            (COND 
-              ((|testBitVector| |pv$| 11) 
-                (QSETREFV |$| 201 
-                  (CONS (|dispatchFunction| |POLYCAT-;convert;SP;41|) |$|))))))
-        (COND 
-          ((|testBitVector| |pv$| 10) 
-            (COND 
-              ((|testBitVector| |pv$| 9) 
-                (QSETREFV |$| 208 
-                  (CONS (|dispatchFunction| |POLYCAT-;convert;SP;42|) |$|))))))
-        (COND 
-          ((|testBitVector| |pv$| 14) 
-            (COND 
-              ((|testBitVector| |pv$| 13) 
-                (QSETREFV |$| 216 
-                  (CONS 
-                    (|dispatchFunction| |POLYCAT-;convert;SIf;43|)
-                    |$|))))))
-        |$|)))) 
-
-(MAKEPROP 
-  (QUOTE |PolynomialCategory&|) 
-  (QUOTE |infovec|)
-  (LIST 
-    (QUOTE 
-      #(NIL NIL NIL NIL NIL NIL 
-        (|local| |#1|)
-        (|local| |#2|)
-        (|local| |#3|)
-        (|local| |#4|)
-        (|Equation| 6)
-        (0 . |lhs|)
-        (|Union| 9 (QUOTE "failed"))
-        (5 . |retractIfCan|)
-        (10 . |retract|)
-        (15 . |rhs|)
-        (|List| 9)
-        (|List| |$|)
-        (20 . |eval|)
-        (|List| 220)
-        |POLYCAT-;eval;SLS;1| 
-        (27 . |Zero|)
-        (31 . |Zero|)
-        (|Boolean|)
-        (35 . |=|)
-        (41 . |leadingMonomial|)
-        (46 . |reductum|)
-        |POLYCAT-;monomials;SL;2| 
-        (51 . |monomials|)
-        (|Union| 17 (QUOTE "failed"))
-        |POLYCAT-;isPlus;SU;3| 
-        (56 . |variables|)
-        (61 . |monomial?|)
-        (66 . |One|)
-        (70 . |One|)
-        (|NonNegativeInteger|)
-        (74 . |degree|)
-        (80 . |monomial|)
-        (87 . |leadingCoefficient|)
-        (92 . |one?|)
-        (97 . |coerce|)
-        |POLYCAT-;isTimes;SU;4| 
-        (102 . |mainVariable|)
-        (|Record| (|:| |var| 9) (|:| |exponent| 35))
-        (|Union| 43 (QUOTE "failed"))
-        |POLYCAT-;isExpt;SU;5| 
-        (|SparseUnivariatePolynomial| |$|)
-        (107 . |univariate|)
-        (|SparseUnivariatePolynomial| 6)
-        (113 . |coefficient|)
-        |POLYCAT-;coefficient;SVarSetNniS;6| 
-        (|List| 35)
-        (119 . |coefficient|)
-        |POLYCAT-;coefficient;SLLS;7| 
-        (126 . |monomial|)
-        |POLYCAT-;monomial;SLLS;8| 
-        (133 . |coerce|)
-        |POLYCAT-;retract;SVarSet;9|
-        |POLYCAT-;retractIfCan;SU;10|
-        (138 . |degree|)
-        (143 . |monomial|)
-        |POLYCAT-;primitiveMonomials;SL;12|
-        (149 . |ground?|)
-        (154 . |Zero|)
-        (158 . |=|)
-        (164 . |degree|)
-        (169 . |leadingCoefficient|)
-        (174 . |totalDegree|)
-        (179 . |reductum|)
-        |POLYCAT-;totalDegree;SNni;13| 
-        (184 . |member?|)
-        (190 . |totalDegree|)
-        |POLYCAT-;totalDegree;SLNni;14| 
-        (196 . |resultant|)
-        (202 . |resultant|)
-        (209 . |discriminant|)
-        (214 . |discriminant|)
-        (220 . |primitiveMonomials|)
-        (|List| 6)
-        (225 . |concat|)
-        (230 . |removeDuplicates!|)
-        (|Vector| 7)
-        (235 . |new|)
-        (|Integer|)
-        (241 . |minIndex|)
-        (246 . |coefficient|)
-        (252 . |qsetelt!|)
-        (|List| 219)
-        (|Matrix| 7)
-        (259 . |matrix|)
-        (|List| 78)
-        (|Matrix| 6)
-        (264 . |listOfLists|)
-        (269 . |vertConcat|)
-        (|Matrix| |$|)
-        (275 . |reducedSystem|)
-        (|Vector| 6)
-        (280 . |entries|)
-        (285 . |concat|)
-        (291 . |concat|)
-        (|Record| (|:| |mat| 88) (|:| |vec| 81))
-        (|Vector| |$|)
-        (297 . |reducedSystem|)
-        (|GeneralPolynomialGcdPackage| 8 9 7 6)
-        (303 . |gcdPolynomial|)
-        (309 . |gcdPolynomial|)
-        (|Union| 107 (QUOTE "failed"))
-        (|List| 48)
-        (|PolynomialFactorizationByRecursion| 7 8 9 6)
-        (315 . |solveLinearPolynomialEquationByRecursion|)
-        (|Union| 111 (QUOTE "failed"))
-        (|List| 46)
-        (321 . |solveLinearPolynomialEquation|)
-        (|Factored| 48)
-        (327 . |factorByRecursion|)
-        (|Factored| 46)
-        (332 . |factorPolynomial|)
-        (337 . |factorSquareFreeByRecursion|)
-        (342 . |factorSquareFreePolynomial|)
-        (|Factored| |$|)
-        (347 . |factor|)
-        (|Factored| 7)
-        (352 . |unit|)
-        (|Union| (QUOTE "nil") (QUOTE "sqfr") (QUOTE "irred") (QUOTE "prime"))
-        (|Record| (|:| |flg| 123) (|:| |fctr| 7) (|:| |xpnt| 83))
-        (|List| 124)
-        (357 . |factorList|)
-        (|Record| (|:| |flg| 123) (|:| |fctr| 6) (|:| |xpnt| 83))
-        (|List| 127)
-        (|Factored| 6)
-        (362 . |makeFR|)
-        (368 . |unit|)
-        (373 . |multivariate|)
-        (|Record| (|:| |flg| 123) (|:| |fctr| 48) (|:| |xpnt| 83))
-        (|List| 133)
-        (379 . |factorList|)
-        (384 . |factor|)
-        (389 . |transpose|)
-        (394 . |characteristic|)
-        (398 . |setUnion|)
-        (404 . |degree|)
-        (|Union| |$| (QUOTE "failed"))
-        (410 . |exquo|)
-        (416 . |ground|)
-        (421 . |transpose|)
-        (|Union| 101 (QUOTE "failed"))
-        (426 . |conditionP|)
-        (431 . |elt|)
-        (437 . |*|)
-        (443 . |+|)
-        (449 . |conditionP|)
-        (454 . |charthRoot|)
-        (459 . |charthRoot|)
-        (464 . |Zero|)
-        (468 . |coefficient|)
-        (475 . |-|)
-        (|Record| (|:| |quotient| |$|) (|:| |remainder| |$|))
-        (481 . |monicDivide|)
-        |POLYCAT-;monicDivide;2SVarSetR;30| 
-        (|MultivariateSquareFree| 8 9 7 6)
-        (487 . |squareFree|)
-        (492 . |squareFree|)
-        (|PolynomialSquareFree| 9 8 7 6)
-        (497 . |squareFree|)
-        (502 . |squareFree|)
-        (507 . |unit|)
-        (|Record| (|:| |factor| 6) (|:| |exponent| 83))
-        (|List| 166)
-        (512 . |factors|)
-        (517 . |squareFreePart|)
-        (522 . |content|)
-        (527 . |content|)
-        (533 . |content|)
-        (538 . |exquo|)
-        (|Record| (|:| |unit| |$|) (|:| |canonical| |$|) (|:| |associate| |$|))
-        (544 . |unitNormal|)
-        (549 . |primitivePart|)
-        (554 . |content|)
-        (560 . |exquo|)
-        (566 . |primitivePart|)
-        (572 . |<|)
-        (578 . |<|)
-        (584 . |<|)
-        (|PatternMatchResult| 83 6)
-        (|Pattern| 83)
-        (|PatternMatchPolynomialCategory| 83 8 9 7 6)
-        (590 . |patternMatch|)
-        (|PatternMatchResult| 83 |$|)
-        (597 . |patternMatch|)
-        (|PatternMatchResult| (|Float|) 6)
-        (|Pattern| (|Float|))
-        (|PatternMatchPolynomialCategory| (|Float|) 8 9 7 6)
-        (604 . |patternMatch|)
-        (|PatternMatchResult| (|Float|) |$|)
-        (611 . |patternMatch|)
-        (618 . |convert|)
-        (623 . |convert|)
-        (|Mapping| 184 9)
-        (|Mapping| 184 7)
-        (|PolynomialCategoryLifting| 8 9 7 6 184)
-        (628 . |map|)
-        (635 . |convert|)
-        (640 . |convert|)
-        (645 . |convert|)
-        (|Mapping| 190 9)
-        (|Mapping| 190 7)
-        (|PolynomialCategoryLifting| 8 9 7 6 190)
-        (650 . |map|)
-        (657 . |convert|)
-        (|InputForm|)
-        (662 . |convert|)
-        (667 . |convert|)
-        (|Mapping| 209 9)
-        (|Mapping| 209 7)
-        (|PolynomialCategoryLifting| 8 9 7 6 209)
-        (672 . |map|)
-        (679 . |convert|)
-        (|Record| (|:| |mat| 218) (|:| |vec| (|Vector| 83)))
-        (|Matrix| 83)
-        (|List| 7)
-        (|Equation| |$|)
-        (|Union| 83 (QUOTE "failed"))
-        (|Union| 223 (QUOTE "failed"))
-        (|Fraction| 83)
-        (|Union| 7 (QUOTE "failed")))) 
-    (QUOTE 
-      #(|totalDegree| 684 |squareFreePart| 695 |squareFree| 700 
-        |solveLinearPolynomialEquation| 705 |retractIfCan| 711 |retract| 716 
-        |resultant| 721 |reducedSystem| 728 |primitivePart| 739 
-        |primitiveMonomials| 750 |patternMatch| 755 |monomials| 769 
-        |monomial| 774 |monicDivide| 781 |isTimes| 788 |isPlus| 793 
-        |isExpt| 798 |gcdPolynomial| 803 |factorSquareFreePolynomial| 809 
-        |factorPolynomial| 814 |factor| 819 |eval| 824 |discriminant| 830 
-        |convert| 836 |content| 851 |conditionP| 857 |coefficient| 862 
-        |charthRoot| 876 |<| 881)) 
-     (QUOTE NIL) 
-     (CONS 
-       (|makeByteWordVec2| 1 (QUOTE NIL))
-       (CONS 
-         (QUOTE #()) 
+                 (SEQ
+                  (LETT |d|
+                   (SPADCALL |p| |v| (QREFELT $ 36))
+                   |POLYCAT-;charthRootlv|)
+                  (EXIT
+                   (LETT |ans|
+                    (SPADCALL |ans|
+                     (SPADCALL (QCDR |ansx|) |v| 
+                      (PROG1 
+                       (LETT #0# (QCDR |dd|) |POLYCAT-;charthRootlv|)
+                       (|check-subtype| (>= #0# 0) 
+                        (QUOTE (|NonNegativeInteger|)) #0#))
+                      (QREFELT $ 37))
+                     (QREFELT $ 149))
+                    |POLYCAT-;charthRootlv|)))))))))))
+         NIL 
+         (GO G190) 
+         G191 
+         (EXIT NIL))
+        (LETT |ansx|
+         (|POLYCAT-;charthRootlv| |p| |vars| |ch| $)
+         |POLYCAT-;charthRootlv|)
+        (EXIT
+         (COND
+          ((QEQCAR |ansx| 1)
+           (PROGN
+            (LETT #1# (CONS 1 "failed") |POLYCAT-;charthRootlv|)
+            (GO #1#)))
+          ((QUOTE T)
+           (PROGN
+            (LETT #1#
+             (CONS 0 (SPADCALL |ans| (QCDR |ansx|) (QREFELT $ 149)))
+             |POLYCAT-;charthRootlv|)
+            (GO #1#)))))))))
+    #1# 
+    (EXIT #1#))))) 
+
+(DEFUN |POLYCAT-;monicDivide;2SVarSetR;30| (|p1| |p2| |mvar| $) 
+ (PROG (|result|) 
+  (RETURN
+   (SEQ
+    (LETT |result|
+     (SPADCALL
+      (SPADCALL |p1| |mvar| (QREFELT $ 47))
+      (SPADCALL |p2| |mvar| (QREFELT $ 47))
+      (QREFELT $ 157))
+     |POLYCAT-;monicDivide;2SVarSetR;30|)
+    (EXIT
+     (CONS
+      (SPADCALL (QCAR |result|) |mvar| (QREFELT $ 132))
+      (SPADCALL (QCDR |result|) |mvar| (QREFELT $ 132)))))))) 
+
+(DEFUN |POLYCAT-;squareFree;SF;31| (|p| $)
+ (SPADCALL |p| (QREFELT $ 160))) 
+
+(DEFUN |POLYCAT-;squareFree;SF;32| (|p| $)
+ (SPADCALL |p| (QREFELT $ 163))) 
+
+(DEFUN |POLYCAT-;squareFree;SF;33| (|p| $)
+ (SPADCALL |p| (QREFELT $ 163))) 
+
+(DEFUN |POLYCAT-;squareFreePart;2S;34| (|p| $)
+ (PROG (|s| |f| #0=#:G1710 #1=#:G1708 #2=#:G1706 #3=#:G1707)
+  (RETURN
+   (SEQ
+    (SPADCALL
+     (SPADCALL 
+      (LETT |s| (SPADCALL |p| (QREFELT $ 164)) |POLYCAT-;squareFreePart;2S;34|)
+      (QREFELT $ 165))
+     (PROGN
+      (LETT #3# NIL |POLYCAT-;squareFreePart;2S;34|)
+      (SEQ
+       (LETT |f| NIL |POLYCAT-;squareFreePart;2S;34|)
+       (LETT #0# (SPADCALL |s| (QREFELT $ 168)) |POLYCAT-;squareFreePart;2S;34|)
+       G190
+       (COND
+        ((OR (ATOM #0#) 
+             (PROGN (LETT |f| (CAR #0#) |POLYCAT-;squareFreePart;2S;34|) NIL))
+         (GO G191)))
+       (SEQ 
+        (EXIT
+         (PROGN
+          (LETT #1# (QCAR |f|) |POLYCAT-;squareFreePart;2S;34|)
+          (COND
+           (#3#
+            (LETT #2#
+             (SPADCALL #2# #1# (QREFELT $ 148))
+             |POLYCAT-;squareFreePart;2S;34|))
+           ((QUOTE T)
+            (PROGN
+             (LETT #2# #1# |POLYCAT-;squareFreePart;2S;34|)
+             (LETT #3# (QUOTE T) |POLYCAT-;squareFreePart;2S;34|)))))))
+       (LETT #0# (CDR #0#) |POLYCAT-;squareFreePart;2S;34|)
+       (GO G190)
+       G191
+       (EXIT NIL))
+      (COND (#3# #2#) ((QUOTE T) (|spadConstant| $ 33))))
+     (QREFELT $ 148)))))) 
+
+(DEFUN |POLYCAT-;content;SVarSetS;35| (|p| |v| $)
+ (SPADCALL (SPADCALL |p| |v| (QREFELT $ 47)) (QREFELT $ 170))) 
+
+(DEFUN |POLYCAT-;primitivePart;2S;36| (|p| $)
+ (PROG (#0=#:G1713)
+  (RETURN
+   (COND
+    ((SPADCALL |p| (QREFELT $ 172)) |p|)
+    ((QUOTE T)
+     (QVELT
+      (SPADCALL
+       (PROG2
+        (LETT #0# 
+         (SPADCALL |p| (SPADCALL |p| (QREFELT $ 173)) (QREFELT $ 174))
+         |POLYCAT-;primitivePart;2S;36|)
+        (QCDR #0#)
+        (|check-union| (QEQCAR #0# 0) (QREFELT $ 6) #0#))
+       (QREFELT $ 176))
+      1)))))) 
+
+(DEFUN |POLYCAT-;primitivePart;SVarSetS;37| (|p| |v| $)
+ (PROG (#0=#:G1720)
+  (RETURN 
+   (COND 
+    ((SPADCALL |p| (QREFELT $ 172)) |p|)
+    ((QUOTE T) 
+     (QVELT 
+      (SPADCALL
+       (PROG2
+        (LETT #0#
+         (SPADCALL |p| (SPADCALL |p| |v| (QREFELT $ 178)) (QREFELT $ 179))
+         |POLYCAT-;primitivePart;SVarSetS;37|)
+        (QCDR #0#)
+        (|check-union| (QEQCAR #0# 0) (QREFELT $ 6) #0#))
+       (QREFELT $ 176))
+      1)))))) 
+
+(DEFUN |POLYCAT-;<;2SB;38| (|p| |q| $)
+ (PROG (|dp| |dq|)
+  (RETURN
+   (SEQ
+    (LETT |dp| (SPADCALL |p| (QREFELT $ 59)) |POLYCAT-;<;2SB;38|)
+    (LETT |dq| (SPADCALL |q| (QREFELT $ 59)) |POLYCAT-;<;2SB;38|)
+    (EXIT
+     (COND
+      ((SPADCALL |dp| |dq| (QREFELT $ 181))
+        (SPADCALL
+         (|spadConstant| $ 22)
+         (SPADCALL |q| (QREFELT $ 38))
+         (QREFELT $ 182)))
+      ((SPADCALL |dq| |dp| (QREFELT $ 181))
+        (SPADCALL
+         (SPADCALL |p| (QREFELT $ 38))
+         (|spadConstant| $ 22)
+         (QREFELT $ 182)))
+      ((QUOTE T)
+       (SPADCALL
+        (SPADCALL (SPADCALL |p| |q| (QREFELT $ 155)) (QREFELT $ 38))
+        (|spadConstant| $ 22)
+        (QREFELT $ 182))))))))) 
+
+(DEFUN |POLYCAT-;patternMatch;SP2Pmr;39| (|p| |pat| |l| $)
+ (SPADCALL |p| |pat| |l| (QREFELT $ 187))) 
+
+(DEFUN |POLYCAT-;patternMatch;SP2Pmr;40| (|p| |pat| |l| $)
+ (SPADCALL |p| |pat| |l| (QREFELT $ 193))) 
+
+(DEFUN |POLYCAT-;convert;SP;41| (|x| $)
+ (SPADCALL (ELT $ 196) (ELT $ 197) |x| (QREFELT $ 201))) 
+
+(DEFUN |POLYCAT-;convert;SP;42| (|x| $) 
+ (SPADCALL (ELT $ 203) (ELT $ 204) |x| (QREFELT $ 208))) 
+
+(DEFUN |POLYCAT-;convert;SIf;43| (|p| $)
+ (SPADCALL (ELT $ 211) (ELT $ 212) |p| (QREFELT $ 216))) 
+
+(DEFUN |PolynomialCategory&| (|#1| |#2| |#3| |#4|)
+ (PROG (DV$1 DV$2 DV$3 DV$4 |dv$| $ |pv$|)
+  (RETURN
+   (PROGN
+    (LETT DV$1 (|devaluate| |#1|) . #0=(|PolynomialCategory&|))
+    (LETT DV$2 (|devaluate| |#2|) . #0#)
+    (LETT DV$3 (|devaluate| |#3|) . #0#)
+    (LETT DV$4 (|devaluate| |#4|) . #0#)
+    (LETT |dv$| (LIST (QUOTE |PolynomialCategory&|) DV$1 DV$2 DV$3 DV$4) . #0#)
+    (LETT $ (GETREFV 226) . #0#)
+    (QSETREFV $ 0 |dv$|)
+    (QSETREFV $ 3
+     (LETT |pv$| 
+      (|buildPredVector| 0 0 
+       (LIST 
+        (|HasCategory| |#2| (QUOTE (|PolynomialFactorizationExplicit|)))
+        (|HasAttribute| |#2| (QUOTE |canonicalUnitNormal|))
+        (|HasCategory| |#2| (QUOTE (|GcdDomain|)))
+        (|HasCategory| |#2| (QUOTE (|CommutativeRing|)))
+        (|HasCategory| |#4| (QUOTE (|PatternMatchable| (|Float|))))
+        (|HasCategory| |#2| (QUOTE (|PatternMatchable| (|Float|))))
+        (|HasCategory| |#4| (QUOTE (|PatternMatchable| (|Integer|))))
+        (|HasCategory| |#2| (QUOTE (|PatternMatchable| (|Integer|))))
+        (|HasCategory| |#4| (QUOTE (|ConvertibleTo| (|Pattern| (|Float|)))))
+        (|HasCategory| |#2| (QUOTE (|ConvertibleTo| (|Pattern| (|Float|)))))
+        (|HasCategory| |#4| (QUOTE (|ConvertibleTo| (|Pattern| (|Integer|)))))
+        (|HasCategory| |#2| (QUOTE (|ConvertibleTo| (|Pattern| (|Integer|)))))
+        (|HasCategory| |#4| (QUOTE (|ConvertibleTo| (|InputForm|))))
+        (|HasCategory| |#2| (QUOTE (|ConvertibleTo| (|InputForm|))))
+        (|HasCategory| |#2| (QUOTE (|OrderedSet|)))))
+     . #0#))
+    (|stuffDomainSlots| $)
+    (QSETREFV $ 6 |#1|)
+    (QSETREFV $ 7 |#2|)
+    (QSETREFV $ 8 |#3|)
+    (QSETREFV $ 9 |#4|)
+    (COND 
+     ((|testBitVector| |pv$| 4)
+      (PROGN 
+       (QSETREFV $ 74 
+        (CONS (|dispatchFunction| |POLYCAT-;resultant;2SVarSetS;15|) $))
+       (QSETREFV $ 76 
+        (CONS (|dispatchFunction| |POLYCAT-;discriminant;SVarSetS;16|) $)))))
+    (COND 
+     ((|HasCategory| |#2| (QUOTE (|IntegralDomain|)))
+      (PROGN
+       (QSETREFV $ 95 
+        (CONS (|dispatchFunction| |POLYCAT-;reducedSystem;MM;20|) $))
+       (QSETREFV $ 102 
+        (CONS (|dispatchFunction| |POLYCAT-;reducedSystem;MVR;21|) $)))))
+    (COND 
+     ((|testBitVector| |pv$| 1)
+      (PROGN 
+       (QSETREFV $ 105
+        (CONS (|dispatchFunction| |POLYCAT-;gcdPolynomial;3Sup;22|) $))
+       (QSETREFV $ 112
+        (CONS 
+         (|dispatchFunction| 
+           |POLYCAT-;solveLinearPolynomialEquation;LSupU;23|) 
+         $))
+       (QSETREFV $ 116 
+        (CONS (|dispatchFunction| |POLYCAT-;factorPolynomial;SupF;24|) $))
+       (QSETREFV $ 118 
+        (CONS 
+         (|dispatchFunction| |POLYCAT-;factorSquareFreePolynomial;SupF;25|)
+         $))
+       (QSETREFV $ 136 (CONS (|dispatchFunction| |POLYCAT-;factor;SF;26|) $))
+       (COND
+        ((|HasCategory| |#2| (QUOTE (|CharacteristicNonZero|)))
+         (PROGN 
+          (QSETREFV $ 150 
+           (CONS (|dispatchFunction| |POLYCAT-;conditionP;MU;27|) $))))))))
+    (COND 
+     ((|HasCategory| |#2| (QUOTE (|CharacteristicNonZero|)))
+      (PROGN 
+       (QSETREFV $ 152 
+        (CONS (|dispatchFunction| |POLYCAT-;charthRoot;SU;28|) $)))))
+    (COND 
+     ((|testBitVector| |pv$| 3)
+      (PROGN 
+       (COND 
+        ((|HasCategory| |#2| (QUOTE (|EuclideanDomain|)))
+         (COND 
+          ((|HasCategory| |#2| (QUOTE (|CharacteristicZero|)))
+           (QSETREFV $ 161 
+            (CONS (|dispatchFunction| |POLYCAT-;squareFree;SF;31|) $)))
+          ((QUOTE T) 
+           (QSETREFV $ 161 
+            (CONS (|dispatchFunction| |POLYCAT-;squareFree;SF;32|) $)))))
+        ((QUOTE T) 
+         (QSETREFV $ 161 
+          (CONS (|dispatchFunction| |POLYCAT-;squareFree;SF;33|) $))))
+      (QSETREFV $ 169  
+       (CONS (|dispatchFunction| |POLYCAT-;squareFreePart;2S;34|) $))
+      (QSETREFV $ 171 
+       (CONS (|dispatchFunction| |POLYCAT-;content;SVarSetS;35|) $))
+      (QSETREFV $ 177 
+       (CONS (|dispatchFunction| |POLYCAT-;primitivePart;2S;36|) $))
+      (QSETREFV $ 180 
+       (CONS (|dispatchFunction| |POLYCAT-;primitivePart;SVarSetS;37|) $)))))
+    (COND 
+     ((|testBitVector| |pv$| 15)
+      (PROGN 
+       (QSETREFV $ 183 (CONS (|dispatchFunction| |POLYCAT-;<;2SB;38|) $))
+       (COND 
+        ((|testBitVector| |pv$| 8)
+         (COND 
+          ((|testBitVector| |pv$| 7)
+           (QSETREFV $ 189 
+            (CONS 
+             (|dispatchFunction| |POLYCAT-;patternMatch;SP2Pmr;39|)
+             $))))))
+       (COND
+        ((|testBitVector| |pv$| 6)
+         (COND 
+         ((|testBitVector| |pv$| 5)
+          (QSETREFV $ 195 
            (CONS 
-             (QUOTE #()) 
-              (|makeByteWordVec2| 216 
-                (QUOTE 
-                  (1 10 6 0 11 1 6 12 0 13 1 6 9 0 14 1 10 6 0 15 3 6 0 0 16
-                   17 18 0 6 0 21 0 7 0 22 2 6 23 0 0 24 1 6 0 0 25 1 6 0 0
-                   26 1 6 17 0 28 1 6 16 0 31 1 6 23 0 32 0 6 0 33 0 7 0 34 2
-                   6 35 0 9 36 3 6 0 0 9 35 37 1 6 7 0 38 1 7 23 0 39 1 6 0 7
-                   40 1 6 12 0 42 2 6 46 0 9 47 2 48 6 0 35 49 3 6 0 0 16 51
-                   52 3 6 0 0 16 51 54 1 6 0 9 56 1 6 8 0 59 2 6 0 7 8 60 1 6
-                   23 0 62 0 48 0 63 2 48 23 0 0 64 1 48 35 0 65 1 48 6 0 66
-                   1 6 35 0 67 1 48 0 0 68 2 16 23 9 0 70 2 6 35 0 16 71 2 48
-                   6 0 0 73 3 0 0 0 0 9 74 1 48 6 0 75 2 0 0 0 9 76 1 6 17 0
-                   77 1 78 0 17 79 1 78 0 0 80 2 81 0 35 7 82 1 81 83 0 84 2
-                   6 7 0 8 85 3 81 7 0 83 7 86 1 88 0 87 89 1 91 90 0 92 2 88
-                   0 0 0 93 1 0 88 94 95 1 96 78 0 97 2 78 0 0 0 98 2 81 0 0
-                   0 99 2 0 100 94 101 102 2 103 48 48 48 104 2 0 46 46 46
-                   105 2 108 106 107 48 109 2 0 110 111 46 112 1 108 113 48
-                   114 1 0 115 46 116 1 108 113 48 117 1 0 115 46 118 1 7 119
-                   0 120 1 121 7 0 122 1 121 125 0 126 2 129 0 6 128 130 1 113
-                   48 0 131 2 6 0 46 9 132 1 113 134 0 135 1 0 119 0 136 1 91
-                   0 0 137 0 6 35 138 2 78 0 0 0 139 2 6 51 0 16 140 2 83 141
-                   0 0 142 1 6 7 0 143 1 88 0 0 144 1 7 145 94 146 2 81 7 0
-                   83 147 2 6 0 0 0 148 2 6 0 0 0 149 1 0 145 94 150 1 7 141
-                   0 151 1 0 141 0 152 0 8 0 153 3 6 0 0 9 35 154 2 6 0 0 0
-                   155 2 48 156 0 0 157 1 159 129 6 160 1 0 119 0 161 1 162
-                   129 6 163 1 6 119 0 164 1 129 6 0 165 1 129 167 0 168 1 0
-                   0 0 169 1 48 6 0 170 2 0 0 0 9 171 1 6 7 0 172 2 6 141 0 7
-                   173 1 6 174 0 175 1 0 0 0 176 2 6 0 0 9 177 2 6 141 0 0
-                   178 2 0 0 0 9 179 2 8 23 0 0 180 2 7 23 0 0 181 2 0 23 0 0
-                   182 3 185 183 6 184 183 186 3 0 187 0 184 187 188 3 191 189
-                   6 190 189 192 3 0 193 0 190 193 194 1 9 184 0 195 1 7 184
-                   0 196 3 199 184 197 198 6 200 1 0 184 0 201 1 9 190 0 202
-                   1 7 190 0 203 3 206 190 204 205 6 207 1 0 190 0 208 1 9
-                   209 0 210 1 7 209 0 211 3 214 209 212 213 6 215 1 0 209 0
-                   216 2 0 35 0 16 72 1 0 35 0 69 1 0 0 0 169 1 0 119 0 161 2
-                   0 110 111 46 112 1 0 12 0 58 1 0 9 0 57 3 0 0 0 0 9 74 1 0
-                   88 94 95 2 0 100 94 101 102 2 0 0 0 9 179 1 0 0 0 176 1 0
-                   17 0 61 3 0 187 0 184 187 188 3 0 193 0 190 193 194 1 0 17
-                   0 27 3 0 0 0 16 51 55 3 0 156 0 0 9 158 1 0 29 0 41 1 0 29
-                   0 30 1 0 44 0 45 2 0 46 46 46 105 1 0 115 46 118 1 0 115
-                   46 116 1 0 119 0 136 2 0 0 0 19 20 2 0 0 0 9 76 1 0 209 0
-                   216 1 0 184 0 201 1 0 190 0 208 2 0 0 0 9 171 1 0 145 94
-                   150 3 0 0 0 16 51 53 3 0 0 0 9 35 50 1 0 141 0 152 2 0
-                   23 0 0 182))))))
-         (QUOTE |lookupComplete|))) 
+            (|dispatchFunction| |POLYCAT-;patternMatch;SP2Pmr;40|)
+            $)))))))))
+    (COND 
+     ((|testBitVector| |pv$| 12)
+      (COND 
+       ((|testBitVector| |pv$| 11)
+        (QSETREFV $ 202 
+         (CONS (|dispatchFunction| |POLYCAT-;convert;SP;41|) $))))))
+    (COND 
+     ((|testBitVector| |pv$| 10)
+      (COND 
+       ((|testBitVector| |pv$| 9)
+        (QSETREFV $ 209 
+         (CONS (|dispatchFunction| |POLYCAT-;convert;SP;42|) $))))))
+    (COND
+     ((|testBitVector| |pv$| 14)
+      (COND 
+       ((|testBitVector| |pv$| 13)
+         (QSETREFV $ 217
+          (CONS (|dispatchFunction| |POLYCAT-;convert;SIf;43|) $))))))
+    $)))) 
+
+(MAKEPROP
+ (QUOTE |PolynomialCategory&|)
+ (QUOTE |infovec|)
+ (LIST (QUOTE
+  #(NIL NIL NIL NIL NIL NIL (|local| |#1|) (|local| |#2|) (|local| |#3|)
+    (|local| |#4|) (|Equation| 6) (0 . |lhs|) (|Union| 9 (QUOTE "failed"))
+    (5 . |retractIfCan|) (10 . |retract|) (15 . |rhs|) (|List| 9) (|List| $)
+    (20 . |eval|) (|List| 221) |POLYCAT-;eval;SLS;1| (27 . |Zero|)
+    (31 . |Zero|) (|Boolean|) (35 . =) (41 . |leadingMonomial|)
+    (46 . |reductum|) |POLYCAT-;monomials;SL;2| (51 . |monomials|)
+    (|Union| 17 (QUOTE "failed")) |POLYCAT-;isPlus;SU;3| (56 . |variables|)
+    (61 . |monomial?|) (66 . |One|) (70 . |One|) (|NonNegativeInteger|)
+    (74 . |degree|) (80 . |monomial|) (87 . |leadingCoefficient|) (92 . =)
+    (98 . |coerce|) |POLYCAT-;isTimes;SU;4| (103 . |mainVariable|)
+    (|Record| (|:| |var| 9) (|:| |exponent| 35))
+    (|Union| 43 (QUOTE "failed")) |POLYCAT-;isExpt;SU;5|
+    (|SparseUnivariatePolynomial| $) (108 . |univariate|)
+    (|SparseUnivariatePolynomial| 6) (114 . |coefficient|)
+    |POLYCAT-;coefficient;SVarSetNniS;6| (|List| 35) (120 . |coefficient|)
+    |POLYCAT-;coefficient;SLLS;7| (127 . |monomial|)
+    |POLYCAT-;monomial;SLLS;8| (134 . |coerce|)
+    |POLYCAT-;retract;SVarSet;9| |POLYCAT-;retractIfCan;SU;10|
+    (139 . |degree|) (144 . |monomial|) |POLYCAT-;primitiveMonomials;SL;12| 
+    (150 . |ground?|) (155 . |Zero|) (159 . =) (165 . |degree|) 
+    (170 . |leadingCoefficient|) (175 . |totalDegree|) (180 . |reductum|)
+    |POLYCAT-;totalDegree;SNni;13| (185 . |member?|) (191 . |totalDegree|) 
+    |POLYCAT-;totalDegree;SLNni;14| (197 . |resultant|) (203 . |resultant|)
+    (210 . |discriminant|) (215 . |discriminant|) (221 . |primitiveMonomials|)
+    (|List| 6) (226 . |concat|) (231 . |removeDuplicates!|) (|Vector| 7)
+    (236 . |new|) (|Integer|) (242 . |minIndex|) (247 . |coefficient|)
+    (253 . |qsetelt!|) (|List| 220) (|Matrix| 7) (260 . |matrix|)
+    (|List| 78) (|Matrix| 6) (265 . |listOfLists|) (270 . |vertConcat|)
+    (|Matrix| $) (276 . |reducedSystem|) (|Vector| 6) (281 . |entries|)
+    (286 . |concat|) (292 . |concat|) 
+    (|Record| (|:| |mat| 88) (|:| |vec| 81)) (|Vector| $)
+    (298 . |reducedSystem|) (|GeneralPolynomialGcdPackage| 8 9 7 6)
+    (304 . |gcdPolynomial|) (310 . |gcdPolynomial|)
+    (|Union| 107 (QUOTE "failed")) (|List| 48)
+    (|PolynomialFactorizationByRecursion| 7 8 9 6) 
+    (316 . |solveLinearPolynomialEquationByRecursion|)
+    (|Union| 111 (QUOTE "failed")) (|List| 46)
+    (322 . |solveLinearPolynomialEquation|) (|Factored| 48)
+    (328 . |factorByRecursion|) (|Factored| 46) (333 . |factorPolynomial|)
+    (338 . |factorSquareFreeByRecursion|)
+    (343 . |factorSquareFreePolynomial|) (|Factored| $) (348 . |factor|)
+    (|Factored| 7) (353 . |unit|) 
+    (|Union| (QUOTE "nil") (QUOTE "sqfr") (QUOTE "irred") (QUOTE "prime"))
+    (|Record| (|:| |flg| 123) (|:| |fctr| 7) (|:| |xpnt| 83))
+    (|List| 124) (358 . |factorList|)
+    (|Record| (|:| |flg| 123) (|:| |fctr| 6) (|:| |xpnt| 83))
+    (|List| 127) (|Factored| 6) (363 . |makeFR|) (369 . |unit|)
+    (374 . |multivariate|) 
+    (|Record| (|:| |flg| 123) (|:| |fctr| 48) (|:| |xpnt| 83))
+    (|List| 133) (380 . |factorList|) (385 . |factor|) (390 . |transpose|)
+    (395 . |characteristic|) (399 . |setUnion|) (405 . |degree|)
+    (|Union| $ (QUOTE "failed")) (411 . |exquo|) (417 . |ground|)
+    (422 . |transpose|) (|Union| 101 (QUOTE "failed")) (427 . |conditionP|)
+    (432 . |elt|) (438 . *) (444 . +) (450 . |conditionP|)
+    (455 . |charthRoot|) (460 . |charthRoot|) (465 . |Zero|)
+    (469 . |coefficient|) (476 . -) 
+    (|Record| (|:| |quotient| $) (|:| |remainder| $))
+    (482 . |monicDivide|) |POLYCAT-;monicDivide;2SVarSetR;30|
+    (|MultivariateSquareFree| 8 9 7 6) (488 . |squareFree|)
+    (493 . |squareFree|) (|PolynomialSquareFree| 9 8 7 6)
+    (498 . |squareFree|) (503 . |squareFree|) (508 . |unit|)
+    (|Record| (|:| |factor| 6) (|:| |exponent| 83)) (|List| 166)
+    (513 . |factors|) (518 . |squareFreePart|) (523 . |content|)
+    (528 . |content|) (534 . |zero?|) (539 . |content|) (544 . |exquo|)
+    (|Record| (|:| |unit| $) (|:| |canonical| $) (|:| |associate| $))
+    (550 . |unitNormal|) (555 . |primitivePart|) (560 . |content|)
+    (566 . |exquo|) (572 . |primitivePart|) (578 . <) (584 . <) (590 . <)
+    (|PatternMatchResult| 83 6) (|Pattern| 83)
+    (|PatternMatchPolynomialCategory| 83 8 9 7 6) (596 . |patternMatch|)
+    (|PatternMatchResult| 83 $) (603 . |patternMatch|)
+    (|PatternMatchResult| (|Float|) 6) (|Pattern| (|Float|))
+    (|PatternMatchPolynomialCategory| (|Float|) 8 9 7 6) 
+    (610 . |patternMatch|) (|PatternMatchResult| (|Float|) $)
+    (617 . |patternMatch|) (624 . |convert|) (629 . |convert|)
+    (|Mapping| 185 9) (|Mapping| 185 7)
+    (|PolynomialCategoryLifting| 8 9 7 6 185) (634 . |map|)
+    (641 . |convert|) (646 . |convert|) (651 . |convert|) (|Mapping| 191 9)
+    (|Mapping| 191 7) (|PolynomialCategoryLifting| 8 9 7 6 191)
+    (656 . |map|) (663 . |convert|) (|InputForm|) (668 . |convert|)
+    (673 . |convert|) (|Mapping| 210 9) (|Mapping| 210 7)
+    (|PolynomialCategoryLifting| 8 9 7 6 210) (678 . |map|)
+    (685 . |convert|) (|Record| (|:| |mat| 219) (|:| |vec| (|Vector| 83)))
+    (|Matrix| 83) (|List| 7) (|Equation| $) (|Union| 83 (QUOTE "failed"))
+    (|Union| 224 (QUOTE "failed")) (|Fraction| 83)
+    (|Union| 7 (QUOTE "failed"))))
+  (QUOTE #(|totalDegree| 690 |squareFreePart| 701 |squareFree| 706 
+   |solveLinearPolynomialEquation| 711 |retractIfCan| 717 |retract| 722 
+   |resultant| 727 |reducedSystem| 734 |primitivePart| 745 
+   |primitiveMonomials| 756 |patternMatch| 761 |monomials| 775 
+   |monomial| 780 |monicDivide| 787 |isTimes| 794 |isPlus| 799 
+   |isExpt| 804 |gcdPolynomial| 809 |factorSquareFreePolynomial| 815 
+   |factorPolynomial| 820 |factor| 825 |eval| 830 |discriminant| 836 
+   |convert| 842 |content| 857 |conditionP| 863 |coefficient| 868 
+   |charthRoot| 882 < 887))
+  (QUOTE NIL)
+  (CONS (|makeByteWordVec2| 1 (QUOTE NIL))
+   (CONS (QUOTE #())
+    (CONS (QUOTE #())
+     (|makeByteWordVec2| 217 (QUOTE
+      (1 10 6 0 11 1 6 12 0 13 1 6 9 0 14 1 10 6 0 15 3 6 0 0 16 17 18 0 6 0
+       21 0 7 0 22 2 6 23 0 0 24 1 6 0 0 25 1 6 0 0 26 1 6 17 0 28 1 6 16 0
+       31 1 6 23 0 32 0 6 0 33 0 7 0 34 2 6 35 0 9 36 3 6 0 0 9 35 37 1 6 7
+       0 38 2 7 23 0 0 39 1 6 0 7 40 1 6 12 0 42 2 6 46 0 9 47 2 48 6 0 35
+       49 3 6 0 0 16 51 52 3 6 0 0 16 51 54 1 6 0 9 56 1 6 8 0 59 2 6 0 7 8
+       60 1 6 23 0 62 0 48 0 63 2 48 23 0 0 64 1 48 35 0 65 1 48 6 0 66 1 6
+       35 0 67 1 48 0 0 68 2 16 23 9 0 70 2 6 35 0 16 71 2 48 6 0 0 73 3 0
+       0 0 0 9 74 1 48 6 0 75 2 0 0 0 9 76 1 6 17 0 77 1 78 0 17 79 1 78 0
+       0 80 2 81 0 35 7 82 1 81 83 0 84 2 6 7 0 8 85 3 81 7 0 83 7 86 1 88
+       0 87 89 1 91 90 0 92 2 88 0 0 0 93 1 0 88 94 95 1 96 78 0 97 2 78 0
+       0 0 98 2 81 0 0 0 99 2 0 100 94 101 102 2 103 48 48 48 104 2 0 46 46
+       46 105 2 108 106 107 48 109 2 0 110 111 46 112 1 108 113 48 114 1 0
+       115 46 116 1 108 113 48 117 1 0 115 46 118 1 7 119 0 120 1 121 7 0
+       122 1 121 125 0 126 2 129 0 6 128 130 1 113 48 0 131 2 6 0 46 9 132
+       1 113 134 0 135 1 0 119 0 136 1 91 0 0 137 0 6 35 138 2 78 0 0 0 139
+       2 6 51 0 16 140 2 83 141 0 0 142 1 6 7 0 143 1 88 0 0 144 1 7 145 94
+       146 2 81 7 0 83 147 2 6 0 0 0 148 2 6 0 0 0 149 1 0 145 94 150 1 7
+       141 0 151 1 0 141 0 152 0 8 0 153 3 6 0 0 9 35 154 2 6 0 0 0 155 2
+       48 156 0 0 157 1 159 129 6 160 1 0 119 0 161 1 162 129 6 163 1 6 119
+       0 164 1 129 6 0 165 1 129 167 0 168 1 0 0 0 169 1 48 6 0 170 2 0 0 0
+       9 171 1 6 23 0 172 1 6 7 0 173 2 6 141 0 7 174 1 6 175 0 176 1 0 0 0
+       177 2 6 0 0 9 178 2 6 141 0 0 179 2 0 0 0 9 180 2 8 23 0 0 181 2 7 23
+       0 0 182 2 0 23 0 0 183 3 186 184 6 185 184 187 3 0 188 0 185 188 189
+       3 192 190 6 191 190 193 3 0 194 0 191 194 195 1 9 185 0 196 1 7 185
+       0 197 3 200 185 198 199 6 201 1 0 185 0 202 1 9 191 0 203 1 7 191 0
+       204 3 207 191 205 206 6 208 1 0 191 0 209 1 9 210 0 211 1 7 210 0
+       212 3 215 210 213 214 6 216 1 0 210 0 217 2 0 35 0 16 72 1 0 35 0 69
+       1 0 0 0 169 1 0 119 0 161 2 0 110 111 46 112 1 0 12 0 58 1 0 9 0 57
+       3 0 0 0 0 9 74 1 0 88 94 95 2 0 100 94 101 102 2 0 0 0 9 180 1 0 0 0
+       177 1 0 17 0 61 3 0 188 0 185 188 189 3 0 194 0 191 194 195 1 0 17 0
+       27 3 0 0 0 16 51 55 3 0 156 0 0 9 158 1 0 29 0 41 1 0 29 0 30 1 0 44
+       0 45 2 0 46 46 46 105 1 0 115 46 118 1 0 115 46 116 1 0 119 0 136 2
+       0 0 0 19 20 2 0 0 0 9 76 1 0 210 0 217 1 0 185 0 202 1 0 191 0 209 2
+       0 0 0 9 171 1 0 145 94 150 3 0 0 0 16 51 53 3 0 0 0 9 35 50 1 0 141
+       0 152 2 0 23 0 0 183))))))
+  (QUOTE |lookupComplete|))) 
 
 @
 \section{package POLYLIFT PolynomialCategoryLifting}
diff --git a/src/input/Makefile.pamphlet b/src/input/Makefile.pamphlet
index 92c1dc5..b286aa6 100644
--- a/src/input/Makefile.pamphlet
+++ b/src/input/Makefile.pamphlet
@@ -287,7 +287,7 @@ REGRES= algaggr.regress algbrbf.regress  algfacob.regress alist.regress  \
     arrows.regress    assign.regress   atansqrt.regress \
     asec.regress      bags.regress      bbtree.regress \
     binary.regress    bop.regress      bstree.regress   bouquet.regress \
-    bug100.regress    bug10069.regress \
+    bug100.regress    bug103.regress   bug10069.regress \
     bugs.regress      bug10312.regress bug6357.regress  bug9057.regress \
     calcprob.regress  \
     calculus2.regress calculus.regress cardinal.regress card.regress \
@@ -502,7 +502,7 @@ FILES= ${OUT}/algaggr.input  ${OUT}/algbrbf.input    ${OUT}/algfacob.input \
        ${OUT}/bags.input     ${OUT}/bbtree.input     ${OUT}/bern.input \
        ${OUT}/bernpoly.input ${OUT}/binary.input     ${OUT}/bop.input \
        ${OUT}/bouquet.input  ${OUT}/bstree.input     ${OUT}/bug6357.input \
-       ${OUT}/bug9057.input  ${OUT}/bug100.input \
+       ${OUT}/bug9057.input  ${OUT}/bug100.input     ${OUT}/bug103.input \
        ${OUT}/bug10069.input ${OUT}/bug10312.input \
        ${OUT}/calcprob.input ${OUT}/calculus.input \
        ${OUT}/cardinal.input ${OUT}/card.input       ${OUT}/carten.input \
@@ -678,7 +678,7 @@ DOCFILES= \
   ${DOC}/bernpoly.input.dvi    ${DOC}/binary.input.dvi     \
   ${DOC}/bop.input.dvi         ${DOC}/bouquet.input.dvi    \
   ${DOC}/bstree.input.dvi      ${DOC}/bug10069.input.dvi   \
-  ${DOC}/bug100.input.dvi \
+  ${DOC}/bug100.input.dvi      ${DOC}/bug103.input.dvi \
   ${DOC}/bug10312.input.dvi    ${DOC}/bug6357.input.dvi    \
   ${DOC}/bug9057.input.dvi     ${DOC}/bugs.input.dvi       \
   ${DOC}/c02aff.input.dvi      ${DOC}/c02agf.input.dvi     \
diff --git a/src/input/bug103.input.pamphlet b/src/input/bug103.input.pamphlet
new file mode 100644
index 0000000..59e6838
--- /dev/null
+++ b/src/input/bug103.input.pamphlet
@@ -0,0 +1,82 @@
+\documentclass{article}
+\usepackage{axiom}
+\begin{document}
+\title{\$SPAD/src/input bug103.input}
+\author{Timothy Daly}
+\maketitle
+\begin{abstract}
+\end{abstract}
+\eject
+\tableofcontents
+\eject
+@
+The call
+\begin{verbatim}
+  solve(z=z,z)
+\end{verbatim}
+fails with:
+ \begin{verbatim}
+   >> Error detected within library code:
+   (1 . failed) cannot be coerced to mode (Polynomial (Integer))
+\end{verbatim}
+
+The bug fix, proposed by William, changes {\tt exquo} in EuclideanDomain
+to add the {\tt zero? x} test.
+\begin{verbatim}
+      x exquo y ==
+         zero? x => 0
+         zero? y => "failed"
+         qr:=divide(x,y)
+         zero?(qr.remainder) => qr.quotient
+         "failed"
+\end{verbatim}
+This change was made but does not affect the behavior of the bug.
+
+This fix, proposed by Martin, changes {\tt primitePart} in 
+{\tt PolynomialCategory} to add the {\tt zero?} test.
+\begin{verbatim}
+      primitivePart p ==
+        zero? p => p
+        unitNormal((p exquo content p) ::%).canonical
+      primitivePart(p,v) ==
+        zero? p => p
+        unitNormal((p exquo content(p,v)) ::%).canonical
+\end{verbatim}
+succeeds with:
+ \begin{verbatim}
+  [0= 0]
+                Type: List Equation Fraction Polynomial Integer
+\end{verbatim}
+<<*>>=
+)spool bug103.output
+)set message test on
+)set message auto off
+)clear all
+ 
+--S 1 of 1
+solve(z=z,z)
+--R 
+--R
+--R   (1)  [0= 0]
+--R                              Type: List Equation Fraction Polynomial Integer
+--E 1
+@
+If we substitute z for %I we get:
+\begin{verbatim}
+           z
+         ++    a     b
+         |   (z  + 1) dz
+        ++
+
+\end{verbatim}
+which is the original input integral.
+<<*>>=
+)spool 
+)lisp (bye)
+ 
+@
+\eject
+\begin{thebibliography}{99}
+\bibitem{1} nothing
+\end{thebibliography}
+\end{document}


\start
Date: Fri, 21 Sep 2007 23:45:45 -0400
From: Tim Daly
To: Alfredo Portes
Subject: re: hyperdoc on windows

>> At the moment, due to the great work by Arthur Ralfs, I'm making
>> progress on the browser-based version. I now have some of the
>> hyperdoc pages converted and am working on using Arthur's code
>> to evaluate and return math output directly to the browser.
>> Axiom's output in mathML in firefox is very pretty.
>
>I haven't been able to run Arthur's code in Windows :-(. It will be good
>if you can put your modifications to the interface in a repository (git or svn),
>so others (maybe me :-) can work on top of Arthur's work.

The axiom silver version (git or svn) has most of Arthur's code for
mathML output already. I've attached his pamphlet file so you can try it.

To try it, put it someplace like /home/silver
 o cd /home/silver
 o check out and build the latest silver branch:
  - svn co https://axiom.svn.sourceforge.net/svnroot/axiom axiom
  - cd axiom
  - export AXIOM=`pwd`/mnt/linux
  - export PATH=$AXIOM/bin:$PATH
  - make
 o cd /home/silver/axiom
 o save the axserver.pamphlet file (attached)
 o export PATH=$AXIOM/bin/lib:$PATH
 o notangle -R"Server Lisp" axserver.pamphlet > http.lisp
 o notangle axserver.pamphlet > axserver.spad
 o notangle -R"Axiom xml" axserver.pamphlet > axiom.xml
 o axiom -nox
 o -> )set mes auto off
 o -> )set output mathml on
 o -> )lisp (load "http.lisp")
 o -> )compile axserver
 o -> axServer(8085,mutliServ$AXSERV)
 o start firefox
 o go to URL http://127.0.0.1:8085/home/silver/axiom/axiom.xml
 o type an axiom expression in the input box
 o hit enter

The http.lisp file provides low level routines used in the spad code.
The axiom.xml provides the web page and form.
The axserver.spad provides the axServer function
The latest svn axiom image incorporates the mathML patches


Once I have a demonstration page (I'm working on the path
  Basic Commands -> Calculus -> Differentiate -> (axiom response)
I'll be able to convert the whole of hyperdoc to firefox and we
should have a portable front end.

I'm using AJAX so the Axiom output appears on the same page as the
original browser input line. That way the user can experiment without
leaving the differentiate page.

The plan is to look at a "pamphlet" page that has an input/output
interaction containing history. I hope to have a button that can
generate a "pamphlet" from the working page (a different kind of
notebook idea). Different worksheets can be on different tabs.
I'm debating about putting each tab in its own axiom frame.

If I can figure a way to make the page "live" we might yet get the
"drag-and-drop" a pamphlet idea working in the near future.




It would be good to get this working in Doyen. I think that Arthur's
approach using mathML is much prettier than using the current method.




Since you've gotten GCL to run on windows you might consider what it
would take to get Arthur's mathML code into the wh-sandbox build.  (I
believe you used wh-sandbox). Once that code is incorporated you can
follow the same path to get Arthur's example to work. The key steps 
would be:

 o incorporate Arthur's mathML extension into the algebra build
   (see attached patch 20070811.01.tpd.patch which won't apply
    directly to wh-sandbox but contains all the important changes)
 o get http.lisp from axserver.pamphlet working on GCL/windows
 o get the above example to work

I'm not sure how to port the http.lisp file to windows but Camm might
be able to help and Waldek has been doing a lot of work in that
direction. If Arthur's code above could be made to work then all of
the other effort I'm doing should instantly port to platforms running
Firefox. 




>> Once I get this to work, firefox can be a standard replacement for
>> hyperdoc, the pages will be in html, and you can change colors
>> to whatever you'd like. In addition, you'll be able to write your
>> own pages for class.
>
>I think it will be good to add Martin's code to Arthur's work to browse
>the databases:
>
>http://wiki.axiom-developer.org/SandBoxHyperDocReplacement

I already demonstrated getting database accesses working here:

  http://daly.axiom-developer.org/asq.php

so it will be pretty trivial to do database lookups as part of
the Firefox version of hyperdoc. Was there other functionality
that I missed?


Let me know if you have any questions.

Tim



================================================================
=== axserver.pamphlet
================================================================
\documentclass{article}
\usepackage{axiom}
\begin{document}
\title{\$SPAD/src/algebra axserver.spad}
\author{Arthur C. Ralfs}
\maketitle
\begin{abstract}
The AxiomServer package is designed to provide a web interface
to axiom.
\end{abstract}
\eject
\tableofcontents
\eject
\section{Preface}

\section{Lisp preliminaries}

Extract the lisp to a file named, say, http.lisp with the
command

notangle -RServer\ Lisp axserver.pamphlet > http.lisp

<<Server Lisp>>=
;; file: http.lisp

(defvar |StandardOutput| *standard-output*)

(defvar  |NewLine| '#\NewLine)

;; some regexp stuff

(defun |StringMatch| (s1 s2)
  (si::string-match s1 s2)
  )



(defun |ListMatches| (&rest args)
  (si::list-matches args)
  )

(defun |MatchBeginning| (i)
  (si::match-beginning i)
  )

(defun |MatchEnd| (i)
  (si::match-end i)
  )

;; the socket stuff


(defun |SiSock| (p spadfn)
;;  (format t "SiSocket-1")
  (si::socket p :server
	      (function
	       (lambda (w) (SPADCALL w spadfn) )
	       )
	      :daemon nil)
  )

(defun |SiListen| (s) 
;;  (format t "SiListen-1")
  (si::listen s)
  )
(defun |SiAccept| (s) (si::accept s))
(defun |SiCopyStream| (q s) (si::copy-stream q s))

;; Camm Maguire's modified demo server

(defun foo (s)
  (setq get "" pathvar "")
  (do ((c (read-char s) (read-char s)))
      ((eq c '#\Space))
      (setq get (concat get (string c)))
      )
  (write-line "get: ")
  (write-line get)
  (do ((c (read-char s) (read-char s nil 'the-end)))
      ((eq c '#\Space))
      (setq pathvar (concat pathvar (string c)))
      )
  (write-line "pathvar: ")
  (write-line pathvar)
  (when pathvar
    (if (pathname-name (pathname pathvar))
	(with-open-file (q pathvar) (si::copy-stream q s))
      (dolist (l (directory pathvar)) (format s "~a~%" (namestring l)))
      )
    )
  (close s)
  )
 

(defun bar (p fn) 
  (let ((s (si::socket p :server fn))) 
        (tagbody l 
                (when (si::listen s) 
                        (let ((w (si::accept s))) 
                                (foo w))) 
                (sleep 3) 
                (go l))))

;;(bar 8080 #'foo)

@

\section{Axiom Server}

Extract the AxiomServer package with the command

notangle axserver.pamphlet > axserver.spad

<<package AXSERV AxiomServer>>=

)abbrev package AXSERV AxiomServer
AxiomServer: public == private where

  public == with

    axServer: (Integer, SExpression->Void) -> Void
    multiServ: SExpression -> Void
    fileserver: SExpression -> Void
    axget: SExpression -> Void
    axpost: SExpression -> Void


  private == add

    getFile: (SExpression,String) -> Void
    getCommand: (SExpression,String) -> Void
    lastStep: () -> String
    lastType: () -> String
    formatMessages: String -> String
    formatMessages1: String -> String


    axServer(port:Integer,serverfunc:SExpression->Void):Void ==
      WriteLine("socketServer")$Lisp
      s := SiSock(port,serverfunc)$Lisp
      -- To listen for just one connection and then close the socket
      -- uncomment i := 0.
      i:Integer := 1
      while (i > 0) repeat
        if not null?(SiListen(s)$Lisp)$SExpression then
          w := SiAccept(s)$Lisp
          serverfunc(w)
--	  i := 0

    multiServ(s:SExpression):Void ==
          WriteLine("multiServ")$Lisp
	  headers:String := ""
	  char:String
	  -- read in the http headers
          while (char := STRING(READ_-CHAR_-NO_-HANG(s,NIL$Lisp,'EOF)$Lisp)$Lisp) ^= "EOF" repeat
              headers := concat [headers,char]
	  sayTeX$Lisp headers
          StringMatch("([^ ]*)", headers)$Lisp
          u:UniversalSegment(Integer)
          u := segment(MatchBeginning(1)$Lisp+1,MatchEnd(1)$Lisp)$UniversalSegment(Integer)
          reqtype:String := headers.u
          sayTeX$Lisp  concat ["request type: ",reqtype]
          if  reqtype = "GET" then
              StringMatch("GET ([^ ]*)",headers)$Lisp
              u:UniversalSegment(Integer)
              u := segment(MatchBeginning(1)$Lisp+1,MatchEnd(1)$Lisp)$UniversalSegment(Integer)
              getFile(s,headers.u)
          if reqtype = "POST" then
              StringMatch("command=(.*)$",headers)$Lisp
              u:UniversalSegment(Integer)
              u := segment(MatchBeginning(1)$Lisp+1,MatchEnd(1)$Lisp)$UniversalSegment(Integer)
              getCommand(s,headers.u)

    getFile(s:SExpression,pathvar:String):Void ==
        WriteLine("getFile")$Lisp
        if not null? PATHNAME_-NAME(PATHNAME(pathvar)$Lisp)$Lisp then
        -- display contents of file
            q:=OPEN(pathvar)$Lisp
        else
            q:=MAKE_-STRING_-INPUT_-STREAM("Problem with file path")$Lisp
        file:String := ""
        while (char := STRING(READ_-CHAR_-NO_-HANG(q,NIL$Lisp,'EOF)$Lisp)$Lisp) ^= "EOF" repeat
            file := concat [file,char]
        CLOSE(q)$Lisp
        file := concat ["Content-Length: ",string(#file),STRING(NewLine$Lisp)$Lisp,STRING(NewLine$Lisp)$Lisp,file]
	file := concat ["Connection: close",STRING(NewLine$Lisp)$Lisp,file]
	file := concat ["Content-Type: application/xhtml+xml",STRING(NewLine$Lisp)$Lisp,file]
	file := concat ["HTTP/1.1 200 OK",STRING(NewLine$Lisp)$Lisp,file]
        f:=MAKE_-STRING_-INPUT_-STREAM(file)$Lisp
        SiCopyStream(f,s)$Lisp
        CLOSE(f)$Lisp
	CLOSE(s)$Lisp

    getCommand(s:SExpression,command:String):Void ==
        WriteLine$Lisp concat ["getCommand: ",command]
	SETQ(tmpmathml$Lisp, MAKE_-STRING_-OUTPUT_-STREAM()$Lisp)$Lisp
	SETQ(tmpalgebra$Lisp, MAKE_-STRING_-OUTPUT_-STREAM()$Lisp)$Lisp
	SETQ(savemathml$Lisp, _$texOutputStream$Lisp)$Lisp
	SETQ(savealgebra$Lisp, _$algebraOutputStream$Lisp)$Lisp
	SETQ(_$texOutputStream$Lisp,tmpmathml$Lisp)$Lisp
	SETQ(_$algebraOutputStream$Lisp,tmpalgebra$Lisp)$Lisp
--	parseAndInterpret$Lisp command
--	parseAndEvalStr$Lisp command
-- The previous two commands don't exit nicely when a syntactically incorrect command is
-- given to them.  They somehow need to be wrapped in CATCH statements but I haven't 
-- figured out how to do this.  parseAndEvalToStringEqNum  uses the following CATCH
-- statements to call parseAndEvalStr but when I try these they don't work.  I get a
-- "NIL is not a valid identifier to use in AXIOM" message. Using parseAndEvalToStringEqNum
-- works and doesn't crash on a syntax error.
--        v := CATCH('SPAD__READER, CATCH('top__level, parseAndEvalStr$Lisp command)$Lisp)$Lisp
--        v = 'restart => ['"error"]
        ans := string parseAndEvalToStringEqNum$Lisp command
	SETQ(resultmathml$Lisp,GET_-OUTPUT_-STREAM_-STRING(_$texOutputStream$Lisp)$Lisp)$Lisp
	SETQ(resultalgebra$Lisp,GET_-OUTPUT_-STREAM_-STRING(_$algebraOutputStream$Lisp)$Lisp)$Lisp
	SETQ(_$texOutputStream$Lisp,savemathml$Lisp)$Lisp
	SETQ(_$algebraOutputStream$Lisp,savealgebra$Lisp)$Lisp
	CLOSE(tmpmathml$Lisp)$Lisp
	CLOSE(tmpalgebra$Lisp)$Lisp
	-- Since strings returned from axiom are going to be displayed in html I
	-- should really check for the characters &,<,> and replace them with
	-- &amp;,&lt;,&gt;.  At present I only check for ampersands in formatMessages.
	mathml:String := string(resultmathml$Lisp)
	algebra:String := string(resultalgebra$Lisp)
	algebra := formatMessages(algebra)
	-- At this point mathml contains the mathml for the output but does not
	-- include step number or type information.  We should also save the command.
        -- I get the type and step number from the $internalHistoryTable
	axans:String := concat ["<div><div class=_"command_">Input: ",command,"</div><div class=_"stepnum_">Step number: ",lastStep(),"</div><div class=_"algebra_">",algebra,"</div><div class=_"mathml_">",mathml,"</div><div class=_"type_">Type: ",lastType(),"</div></div>"]
	WriteLine$Lisp concat ["mathml answer: ",mathml]
        WriteLine$Lisp concat ["algebra answer: ",algebra]
        q:=MAKE_-STRING_-INPUT_-STREAM(axans)$Lisp
        SiCopyStream(q,s)$Lisp
        CLOSE(q)$Lisp
	CLOSE(s)$Lisp


    lastType():String ==
--  The last history entry is the first item in the $internalHistoryTable list so 
--  car(_$internalHistoryTable$Lisp) selects it.  Here's an example:
--  (3 (x+y)**3 (% (value (Polynomial (Integer)) WRAPPED 1 y (3 0 . 1) (2 1 x (1 0 . 3)) (1 1 x (2 0 . 3)) (0 1 x (3 0 . 1)))))
--  This corresponds to the input "(x+y)**3" being issued as the third command after
--  starting axiom.  The following line selects the type information.
        string car(cdr(car(cdr(car(cdr(cdr(car(_$internalHistoryTable$Lisp)$Lisp)$Lisp)$Lisp)$Lisp)$Lisp)$Lisp)$Lisp)$Lisp


    lastStep():String ==
        string car(car(_$internalHistoryTable$Lisp)$Lisp)$Lisp
	

    formatMessages(str:String):String ==
        WriteLine("formatMessages")$Lisp
	-- I need to replace any ampersands with &amp; and may also need to
	-- replace < and > with &lt; and &gt;
	strlist:List String
	WriteLine(str)$Lisp
	strlist := split(str,char "&")
	str := ""
	for s in strlist repeat
	    str := concat [str,s,"&amp;"]
	strlen:Integer := #str
	str := str.(1..(#str - 5))
	WriteLine(str)$Lisp
	-- Here I split the string into lines and put each line in a "div".
	strlist := split(str, char string NewlineChar$Lisp)
	str := ""
	WriteLine("formatMessages1")$Lisp
	WriteLine(concat strlist)$Lisp
	for s in strlist repeat
	    WriteLine(s)$Lisp
	    str := concat [str,"<div>",s,"</div>"]
        str
@
        
\section{Axiom javascript}

The javascript is currently included in a "script" element in the
Axiom xml page.

<<axiom javascript>>=

function init() {
}


function makeRequest() {
//    The following instantiation of the XMLHttpRequest object is for
//    browsers other than IE.  IE requires something different.
    http_request = new XMLHttpRequest();	 
    var command = document.getElementById('comm').value;
    http_request.open('POST', '127.0.0.1:8085', true);
    http_request.onreadystatechange = handleResponse;
//    http_request.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded');
//    http_request.send("command="+encodeURIComponent(command));
    http_request.setRequestHeader('Content-Type', 'text/plain');
    http_request.send("command="+command);
}

function handleResponse() {
    if (http_request.readyState == 4) {
	if (http_request.status == 200) {
// stick response in div=mathBox
	    var mathString = http_request.responseText;
            var mathRange = document.createRange();
	    var mathBox = document.createElementNS('http://www.w3.org/1999/xhtml','div');
            mathRange.selectNodeContents(mathBox);
            var mathFragment = mathRange.createContextualFragment(mathString);
            mathBox.appendChild(mathFragment);
// set id on mathBox
//	    var stepNum = mathBox.firstChild.firstChild.data;
//	    mathBox.setAttribute('id', 'step'+stepNum);
//	    mathBox.setAttribute('class', 'mathbox');
// remove old mathbox
            document.getElementById('mathAns').removeChild(document.getElementById('mathAns').firstChild)

// insert everything into the document

	    document.getElementById('mathAns').appendChild(mathBox);

// delete linenum box
//            mathBox.removeChild(mathBox.firstChild);

	} else
	{
	    alert('There was a problem with the request.'+ http_request.statusText);
	}
    }
}

@

\section{Axiom xml}

Extract the Axiom xml interface page with the commmand

notangle -RAxiom\ xml axserver.pamphlet > axiom.xml

or in fact make the file name whatever you like instead of
"axiom.xml".

<<Axiom xml>>=
<?xml version="1.0" encoding="UTF-8"?>
<!--
<<license-xml>>
-->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1 plus MathML 2.0//EN" "http://www.w3.org/Math/DTD/mathml2/xhtml-math11-f.dtd" [
<!ENTITY mathml "http://www.w3.org/1998/Math/MathML">
<!ENTITY InvisibleTimes " ">
]>

<html xmlns="http://www.w3.org/1999/xhtml" xmlns:xlink="http://www.w3.org/1999/xlink">

<head>
<title>Axiom Interface</title>
<script type="text/javascript">
<<axiom javascript>>
</script>

</head>

<body id="body">

  <form id="commreq" action="javascript:makeRequest();">
    <p>
      Enter command: <input type="text" id="comm" name="command" size="80"/>
      <input type="submit" value="submit command"/>
    </p>
  </form>

<div id="mathAns"><div></div></div>



</body>

</html>

@

\section{Running Axiom Server}

Put the extracted files in a suitable directory, like the one you
started Axiom from, and issue the commands:

)set output mathml on

)lisp (load "http.lisp")

)compile axserver

axServer(8085,mutliServ$AXSERV)


Of course you need a mathml enabled build of axiom to do this.
You may also want to issue the command

)set messages autoload off

before starting the Axiom server.


\section{License}
<<license>>=
--Copyright (c) 2007 Arthur C. Ralfs
--All rights reserved.
--
--Redistribution and use in source and binary forms, with or without
--modification, are permitted provided that the following conditions are
--met:
--
--    - Redistributions of source code must retain the above copyright
--      notice, this list of conditions and the following disclaimer.
--
--    - Redistributions in binary form must reproduce the above copyright
--      notice, this list of conditions and the following disclaimer in
--      the documentation and/or other materials provided with the
--      distribution.
--
--    - Neither the name of Arthur C. Ralfs nor the
--      names of its contributors may be used to endorse or promote products
--      derived from this software without specific prior written permission.
--
--THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
--IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
--TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
--PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER
--OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
--EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
--PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
--PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
--LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
--NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
--SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.


@

<<license-xml>>=
  Copyright (c) 2007 Arthur C. Ralfs
  All rights reserved.
  
  Redistribution and use in source and binary forms, with or without
  modification, are permitted provided that the following conditions are
  met:
  
      - Redistributions of source code must retain the above copyright
        notice, this list of conditions and the following disclaimer.
  
      - Redistributions in binary form must reproduce the above copyright
        notice, this list of conditions and the following disclaimer in
        the documentation and/or other materials provided with the
        distribution.
  
      - Neither the name of Arthur C. Ralfs nor the
        names of its contributors may be used to endorse or promote products
        derived from this software without specific prior written permission.
  
  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
  IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
  TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
  PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER
  OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
  EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
  PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
  LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
  SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.


@

<<*>>=
<<license>>
<<package AXSERV AxiomServer>>

@

\eject
\begin{thebibliography}{99}
\bibitem{1} nothing
\end{thebibliography}
\end{document}


=========================================================================
=== 20070811.01.tpd.patch 
=========================================================================
diff --git a/changelog b/changelog
index 7cbe49b..e3d84c9 100644
--- a/changelog
+++ b/changelog
@@ -1,3 +1,13 @@
+20070811 tpd src/input/Makefile add mathml.input
+20070811 tpd src/input/mathml.input write test cases
+20070810 tpd readme add Arthur C. Ralfs
+20070810 tpd src/interp/setq.lisp add Arthur C. Ralfs
+20070810 tpd src/algebra/Makefile add mathml.spad
+20070810 acr src/algebra/exposed.lsp add (|MathMLFormat| . MMLFORM)
+20070810 acr src/interp/i-output.boot added mathml patch
+20070810 acr scr/interp/setvars.boot add mathml patch
+20070810 acr scr/interp/setvart.boot add mathml patch
+20070810 acr Arthur Ralfs
 20070810 tpd src/interp/metameta.lisp removed (unused)
 20070810 tpd src/interp/ccl-depsys.lsp remove metameta
 20070810 tpd src/interp/parsing.lisp remove metameta
diff --git a/readme b/readme
index 112fa70..578fc37 100644
--- a/readme
+++ b/readme
@@ -221,9 +221,10 @@ at the axiom command prompt will prettyprint the list.
 "Michel Petitot         Didier Pinchon         Ayal Pinkus"
 "Jose Alfredo Portes"
 "Claude Quitte"
-"Norman Ramsey          Michael Richardson     Renaud Rioboo"
-"Jean Rivlin            Nicolas Robidoux       Simon Robinson"
-"Raymond Rogers         Michael Rothstein      Martin Rubey"
+"Arthur C. Ralfs        Norman Ramsey          Michael Richardson"
+"Renaud Rioboo          Jean Rivlin            Nicolas Robidoux"
+"Simon Robinson         Raymond Rogers         Michael Rothstein"
+"Martin Rubey"
 "Philip Santas          Alfred Scheerhorn      William Schelter"
 "Gerhard Schneider      Martin Schoenert       Marshall Schor"
 "Frithjof Schulze       Fritz Schwarz          Nick Simicich"
diff --git a/src/algebra/Makefile.pamphlet b/src/algebra/Makefile.pamphlet
index 987ea71..9172e69 100644
--- a/src/algebra/Makefile.pamphlet
+++ b/src/algebra/Makefile.pamphlet
@@ -743,7 +743,8 @@ view3d.spad.pamphlet (VIEW3D)
 
 LAYER17=\
   ${OUT}/CCLASS.o  ${OUT}/FSAGG2.o  ${OUT}/GALFACT.o ${OUT}/IALGFACT.o \
-  ${OUT}/IBACHIN.o ${OUT}/NORMMA.o  ${OUT}/ODERED.o  ${OUT}/OMSAGG.o   \
+  ${OUT}/IBACHIN.o ${OUT}/MMLFORM.o \
+  ${OUT}/NORMMA.o  ${OUT}/ODERED.o  ${OUT}/OMSAGG.o   \
   ${OUT}/PERM.o    ${OUT}/PERMGRP.o ${OUT}/PRIMES.o  ${OUT}/PWFFINTB.o \
   ${OUT}/RDIST.o   ${OUT}/SAE.o     ${OUT}/SAEFACT.o ${OUT}/SAERFFC.o  \
   ${OUT}/SGCF.o    ${OUT}/TBAGG.o   ${OUT}/TBAGG-.o  ${OUT}/VIEW3D.o  \
@@ -1249,7 +1250,8 @@ SPADFILES= \
  ${OUTSRC}/list.spad ${OUTSRC}/lmdict.spad ${OUTSRC}/lodof.spad \
  ${OUTSRC}/lodop.spad ${OUTSRC}/lodo.spad \
  ${OUTSRC}/manip.spad ${OUTSRC}/mappkg.spad ${OUTSRC}/matcat.spad \
- ${OUTSRC}/matfuns.spad ${OUTSRC}/matrix.spad ${OUTSRC}/matstor.spad \
+ ${OUTSRC}/matfuns.spad ${OUTSRC}/mathml.spad \
+ ${OUTSRC}/matrix.spad ${OUTSRC}/matstor.spad \
  ${OUTSRC}/mesh.spad ${OUTSRC}/mfinfact.spad ${OUTSRC}/misc.spad \
  ${OUTSRC}/mkfunc.spad ${OUTSRC}/mkrecord.spad \
  ${OUTSRC}/mlift.spad ${OUTSRC}/moddfact.spad ${OUTSRC}/modgcd.spad \
@@ -1409,7 +1411,8 @@ DOCFILES= \
  ${DOC}/list.spad.dvi ${DOC}/lmdict.spad.dvi ${DOC}/lodof.spad.dvi \
  ${DOC}/lodop.spad.dvi ${DOC}/lodo.spad.dvi \
  ${DOC}/manip.spad.dvi ${DOC}/mappkg.spad.dvi ${DOC}/matcat.spad.dvi \
- ${DOC}/matfuns.spad.dvi ${DOC}/matrix.spad.dvi ${DOC}/matstor.spad.dvi \
+ ${DOC}/matfuns.spad.dvi ${DOC}/mathml.spad.dvi \
+ ${DOC}/matrix.spad.dvi ${DOC}/matstor.spad.dvi \
  ${DOC}/mesh.spad.dvi ${DOC}/mfinfact.spad.dvi ${DOC}/misc.spad.dvi \
  ${DOC}/mkfunc.spad.dvi ${DOC}/mkrecord.spad.dvi ${DOC}/mlift.spad.jhd.dvi \
  ${DOC}/mlift.spad.dvi ${DOC}/moddfact.spad.dvi ${DOC}/modgcd.spad.dvi \
diff --git a/src/algebra/exposed.lsp.pamphlet b/src/algebra/exposed.lsp.pamphlet
index 498b79a..c893d91 100644
--- a/src/algebra/exposed.lsp.pamphlet
+++ b/src/algebra/exposed.lsp.pamphlet
@@ -207,6 +207,7 @@
   (|MappingPackage1| . MAPPKG1)
   (|MappingPackage2| . MAPPKG2)
   (|MappingPackage3| . MAPPKG3)
+  (|MathMLFormat| . MMLFORM)
   (|Matrix| . MATRIX)
   (|MatrixCategoryFunctions2| . MATCAT2)
   (|MatrixCommonDenominator| . MCDEN)
diff --git a/src/algebra/mathml.spad.pamphlet b/src/algebra/mathml.spad.pamphlet
new file mode 100644
index 0000000..c589e78
--- /dev/null
+++ b/src/algebra/mathml.spad.pamphlet
@@ -0,0 +1,1376 @@
+\documentclass{article}
+\usepackage{axiom}
+\begin{document}
+\title{\$SPAD/src/algebra mathml.spad}
+\author{Arthur C. Ralfs}
+\maketitle
+\begin{abstract}
+MathMLFormat is a package to produce presentation mathematical
+markup language from OutputForm.
+\end{abstract}
+\eject
+\tableofcontents
+\eject
+\section{Preface}
+
+Both this code and documentation are still under development and
+I don't pretend they are anywhere close to perfect or even finished.
+However the code does work and I hope it might be useful to somebody
+both for it's ability to output MathML from Axiom and as an example
+of how to write a new output form.
+
+\section{Introduction to Mathematical Markup Language}
+
+MathML exists in two forms: presentation and content.
+At this time (2007-02-11) the package only has a presentation
+package.  A content package is in the
+works however it is more difficult.  Unfortunately Axiom does
+not make its semantics easliy available.  The \spadtype{OutputForm}
+domain mediates between the individual Axiom domains and the
+user visible output but \spadtype{OutputForm} does not provide full
+semantic information.  From my currently incomplete understanding
+of Axiom it appears that remedying this would entail going back
+to the individual domains and rewriting a lot of code.
+However some semantics are conveyed directly by \spadtype{OutputForm} and other
+things can be deduced from \spadtype{OutputForm} or form the original
+user command.
+
+\section{Displaying MathML}
+
+The MathML string produced by ")set output mathml on" can be pasted
+directly into an appropriate xhtml page and then viewed in Firefox
+or some other MathML aware browser. The boiler plate code needed for
+a test page, testmathml.xml, is:
+
+\begin{verbatim}
+<?xml version="1.0" ?>
+
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1 plus MathML 2.0//EN"
+                      "http://www.w3.org/Math/DTD/mathml2/xhtml-math11-f.dtd" [
+<!ENTITY mathml "http://www.w3.org/1998/Math/MathML">
+]>
+
+<html xmlns="http://www.w3.org/1999/xhtml"
+      xmlns:xlink="http://www.w3.org/1999/xlink" >
+
+
+  <head>
+    <title>MathML Test </title>
+  </head>
+
+  <body>
+
+  </body>
+</html>
+\end{verbatim}
+
+
+Paste the MathML string into the body element and it should display
+nicely in Firefox.
+
+\section{Test Cases}
+
+Here's a list of test cases that currently format correctly:
+
+1. (x+y)**2
+
+2. integrate(x**x,x)
+
+3. integral(x**x,x)
+
+4. (5 + sqrt 63 + sqrt 847)**(1/3)
+
+5. set $[$1,2,3$]$
+
+6. multiset $[$x rem 5 for x in primes(2,1000)$]$
+
+7. series(sin(a*x),x=0)
+
+8. matrix $[$ $[$x**i + y**j for i in 1..10$]$ for j in 1..10$]$
+
+9. y := operator 'y
+   a. D(y(x,z),$[$x,x,z,x$]$)
+   b. D(y x,x,2)
+
+10. x := series 'x
+    a. sin(1+x)
+
+11. series(1/log(y),y=1)
+
+12. y:UTS(FLOAT,'z,0) := exp(z)
+
+13. a. c := continuedFraction(314159/100000)
+    b. c := continuedFraction(314159/100000)
+
+The \spadtype{TexFormat} domain has the capability to format an object with
+subscripts, superscripts, presubscripts and presuperscripts however
+I don't know of any Axiom command that produces such an object. In
+fact at present I see the case of "SUPERSUB" being used for putting
+primes in the superscript position to denote ordinary differentiation.
+I also only see the "SUB" case being only used to denote partial
+derivatives.
+
+\section{)set output mathml on}
+
+
+Making mathml appear as output during a normal Axiom session
+by invoking ")set output mathml on" proved to be a bit tedious
+and seems to be undocumented.  I document my experience here
+in case in proves useful to somebody else trying to get a new
+output format from Axiom.
+
+In \spadtype{MathMLFormat} the functions 
+\spadfun{coerce(expr : OutputForm) : String} and
+\spadfun{display(s : String) : Void} provide the desired mathml output.
+Note that this package was constructed by close examination of
+Robert Sutor's \spadtype{TexFormat} domain and much remains from that source.
+To have mathml displayed as output we need to get Axiom to 
+call display(coerce(expr)) at the appropriate place.  Here's what
+I did to get that to happen. Note that my starting point here was
+an attempt by Andrey Grozin to do the same.  To figure things out
+I searched through files for "tex" to see what was done for the
+\spadtype{TexFormat} domain, and used grep to find which files had mention of
+\spadtype{TexFormat}.
+
+\subsection{File src/interp/setvars.boot.pamphlet}
+
+
+  Create an output mathml section by analogy to the tex section.
+Remember to add the code chunk "outputmathmlCode" at the end.
+
+setvars.boot is a bootstrap file which means that it has to be
+precompiled into lisp code and then that code has to be inserted
+back into setvars.boot. To do this extract the boot code by running
+"notangle" on it.  I did this from the "tmp" directory.
+From inside axiom run ")lisp (boottran::boottocl "tmp/setvars.boot")
+which put "setvars.clisp" into "int/interp/setvars.clisp".  Then
+replace the lisp in "setvars.boot.pamphlet" with that in the newly
+generated "setvars.clisp".
+
+The relevant code chunks appearing in "setvars.boot.pamphlet" are:
+\begin{verbatim}
+    outputmathmlCode
+    setOutputMathml
+    describeSetOutputMathml
+\end{verbatim}
+and the relevant variables are:
+\begin{verbatim}
+    setOutputMathml
+    $mathmlOutputStream
+    $mathmlOutputFile
+    $mathmlFormat
+    describeSetOutputMathml
+\end{verbatim}
+
+\subsection{File setvart.boot.pamphlet}
+
+
+Create an output mathml section in "setvart.boot.pamphlet" again
+patterned after the tex section.  I changed the default file 
+extension from ".stex" to ".smml".
+
+To the "section{output}" table I added the line
+\begin{verbatim}
+   mathml		   created output in MathML style	Off:CONSOLE
+\end{verbatim}
+Added the code chunk "outputmathml" to the code chunk "output"
+in "section{output}".
+
+Relevant code chunks:
+\begin{verbatim}
+	 outputmathml
+\end{verbatim}
+Relevant variables:
+\begin{verbatim}
+	 setOutputMathml
+	 $mathmlFormat
+	 $mathmlOutputFile
+\end{verbatim}
+
+Note when copying the tex stuff I changed occurrences of "tex"
+to "mathml", "Tex" to "Mathml" and "TeX" to "MathML".
+
+\subsection{File src/algebra/Makefile.pamphlet}
+
+
+The file "src/algebra/tex.spad.pamphlet" contains
+the domain \spadtype{TexFormat} (TEX) and the package 
+\spadtype{TexFormat1} (TEX1).
+However the sole function of \spadtype{TexFormat1} is to \spadfun{coerce}
+objects from a domain into \spadtype{OutputForm} and then apply 
+\spadtype{TexFormat}
+to them.  It is to save programmers the trouble of doing
+the coercion themselves from inside spad code.  It does
+not appear to be used for the main purpose of delivering
+Axiom output in TeX format.  In order to keep the mathml
+package as simple as possible, and because I didn't see much
+use for this, I didn't copy the \spadtype{TexFormat1} package.  So
+no analog of the TEX1 entries in "Makefile.pamphlet" were
+needed.  One curiosity I don't understand is why TEX1
+appears in layer 4 when it seems to depend on TEX which
+appears in layer 14.
+
+Initially I added "\${OUT}/MMLFORM.o" to layer 14 and
+"mathml.spad.pamphlet" to completed spad files in layer 14.
+When trying to compile the build failed at MMLFORM.  It left
+"MMLFORM.erlib" in "int/algebra" instead of "MMLFORM.NRLIB"
+which confused me at first because mathml.spad compiled
+under a running axiom.  By examining the file "obj/tmp/trace"
+I saw that a new dependency had been introduced, compared
+to TexFormat, with the function eltName depending on the
+domain FSAGG in layer 16.  So the lines had to be moved 
+from layer 14 to layer 17.
+
+Added appropriate lines to "SPADFILES" and "DOCFILES".
+
+\subsection{File src/algebra/exposed.lsp.pamphlet}
+
+Add the line "($\vert{}$MathMLFormat$\vert$ . MMLFORM)"
+
+\subsection{File src/algebra/Lattice.pamphlet}
+
+I don't see that this file is used anywhere but I made
+the appropriate changes anyway by searching for "TEX" and
+mimicing everthing for MMLFORM.
+
+\subsection{File src/doc/axiom.bib.pamphlet}
+
+Added mathml.spad subsection to "src/doc/axiom.bib.pamphlet".
+
+\subsection{File interp/i-output.boot.pamphlet}
+
+
+This is where the \spadfun{coerce} and \spadfun{display} functions 
+from MathMLFormat
+actually get called.  The following was added:
+
+\begin{verbatim}
+mathmlFormat expr ==
+  mml := '(MathMLFormat)
+  mmlrep := '(String)
+  formatFn := getFunctionFromDomain("coerce",mml,[$OutputForm])
+  displayFn := getFunctionFromDomain("display",mml,[mmlrep])
+  SPADCALL(SPADCALL(expr,formatFn),displayFn)
+  TERPRI $mathmlOutputStream
+  FORCE_-OUTPUT $mathmlOutputStream
+  NIL
+\end{verbatim}
+
+Note that compared to the texFormat function there are a couple
+of differences.  Since \spadtype{MathMLFormat} is currently a package rather
+than a domain there is the "mmlrep" variable whereas in texFormat
+the argument of the "display" function is an instance of the 
+domain.  Also the \spadfun{coerce} function here only has one argument,
+namely "\$OutputForm".
+
+Also for the function "output(expr,domain)" add lines for mathml,
+e.g. "if \$mathmlFormat then mathmlFormat expr".
+
+After these changes Axiom compiled with mathml enabled under
+)set output.
+
+\section{package MMLFORM MathMLFormat}
+
+\subsection{Public Declarations}
+
+The declarations
+\begin{verbatim}
+  E      ==> OutputForm
+  I      ==> Integer
+  L      ==> List
+  S      ==> String
+  US     ==> UniversalSegment(Integer)
+\end{verbatim}
+provide abbreviations for domains used heavily in the code.
+The publicly exposed functions are:
+
+    \spadfun{coerce: E -$>$ S}  This function is the main one for converting
+and expression in domain OutputForm into a MathML string.
+
+    \spadfun{coerceS: E -$>$ S}  This function is for use from the command line.
+It converts an OutputForm expression into a MathML string and does
+some formatting so that the output is not one long line.  If you take
+the output from this function, stick it in an emacs buffer in
+nxml-mode and then indent according to mode, you'll get something that's
+nicer to look at than comes from coerce. Note that coerceS returns
+the same value as coerce but invokes a display function as well so that
+the result will be printed twice in different formats.  The need for this
+is that the output from coerce is automatically formatted with line breaks
+by Axiom's output routine that are not in the right place.
+
+    \spadfun{coerceL: E -$>$ S}  Similar to coerceS except that the displayed result
+is the MathML string in one long line.  These functions can be used,
+for instance, to get the MathML for the previous result by typing
+coerceL(%)\$MMLFORM.
+
+    \spadfun{exprex: E -$>$ S}  Converts \spadtype{OutputForm} to 
+\spadtype{String} with
+the structure preserved with braces.  This is useful in developing this
+package. Actually this is not quite accurate.  The function
+\spadfun{precondition} is first applied to the \spadtype{OutputForm}
+expression before \spadfun{exprex}.   Raw \spadtype{OutputForm} and the nature
+of the \spadfun{precondition} function is still obscure to me at the time of
+this writing (2007-02-14), however I probably need to understand it to make
+sure I'm not missing any semantics.  The spad function \spadfun{precondition}
+is just a wrapper for the lisp function outputTran\$Lisp, which I guess is
+compiled from boot.
+
+    \spadfun{display: S -$>$ Void}  This one prints the string returned by coerce as one
+long line, adding "math" tags: $<$math ...$>$ ... $<$/math$>$.  Thus the output
+from this can be stuck directly into an appropriate html/xhtml page and will
+be displayed nicely by a MathML aware browser.
+
+    \spadfun{displayF: S -$>$ Void}  This function doesn't exist 
+yet but it would be nice
+to have a humanly readable formatted output as well.  The basics do exist in
+the coerceS function however the formatting still needs some work to be 
+really good.
+
+<<public declarations>>=
+)abbrev domain MMLFORM MathMLFormat
+++ Author: Arthur C. Ralfs
+++ Date: January 2007
+++ This package is based on the TeXFormat domain by Robert S. Sutor
+++ without which I wouldn't have known where to start.
+++ Basic Operations: coerce, coerceS, coerceL, exprex, display
+++ Description:
+++    \spadtype{MathMLFormat} provides a coercion from \spadtype{OutputForm}
+++    to MathML format.
+
+MathMLFormat(): public == private where
+  E      ==> OutputForm
+  I      ==> Integer
+  L      ==> List
+  S      ==> String
+  US     ==> UniversalSegment(Integer)
+
+  public == SetCategory with
+    coerce:    E -> S
+      ++ coerceS(o) changes o in the standard output format to MathML
+      ++ format.
+    coerceS:   E -> S
+      ++ coerceS(o) changes o in the standard output format to MathML
+      ++ format and displays formatted result.
+    coerceL:   E -> S
+      ++ coerceS(o) changes o in the standard output format to MathML
+      ++ format and displays result as one long string.
+    exprex:    E -> S
+      ++ coverts \spadtype{OutputForm} to \spadtype{String} with the
+      ++ structure preserved with braces.  Actually this is not quite
+      ++ accurate.  The function \spadfun{precondition} is first 
+      ++ applied to the
+      ++ \spadtype{OutputForm} expression before \spadfun{exprex}.  
+      ++ The raw \spadtype{OutputForm} and
+      ++ the nature of the \spadfun{precondition} function is 
+      ++ still obscure to me
+      ++ at the time of this writing (2007-02-14).
+    display:   S -> Void
+      ++ prints the string returned by coerce, adding <math ...> tags.
+
+@
+\subsection{Private Constant Declarations}
+<<private constant declarations>>=
+  private == add
+    import OutputForm
+    import Character
+    import Integer
+    import List OutputForm
+    import List String
+
+    -- local variables declarations and definitions
+
+    expr: E
+    prec,opPrec: I
+    str:  S
+    blank         : S := " \  "
+
+    maxPrec       : I   := 1000000
+    minPrec       : I   := 0
+
+    unaryOps      : L S := ["-","^"]$(L S)
+    unaryPrecs    : L I := [700,260]$(L I)
+
+    -- the precedence of / in the following is relatively low because
+    -- the bar obviates the need for parentheses.
+    binaryOps     : L S := ["+->","|","**","/","<",">","=","OVER"]$(L S)
+    binaryPrecs   : L I := [0,0,900, 700,400,400,400,   700]$(L I)
+
+    naryOps       : L S := ["-","+","*",blank,",",";"," ","ROW","",
+       " \cr ","&","</mtd></mtr><mtr><mtd>"]$(L S)
+    naryPrecs     : L I := [700,700,800,  800,110,110,  0,    0, 0,
+             0,  0,   0]$(L I)
+    naryNGOps     : L S := ["ROW","&"]$(L S)
+
+    plexOps       : L S := ["SIGMA","SIGMA2","PI","PI2","INTSIGN","INDEFINTEGRAL"]$(L S)
+    plexPrecs     : L I := [    700, 800,     700, 800 , 700,      700]$(L I)
+
+    specialOps    : L S := ["MATRIX","BRACKET","BRACE","CONCATB","VCONCAT",  _
+                            "AGGLST","CONCAT","OVERBAR","ROOT","SUB","TAG", _
+                            "SUPERSUB","ZAG","AGGSET","SC","PAREN", _
+                            "SEGMENT","QUOTE","theMap" ]
+
+    -- the next two lists provide translations for some strings for
+    -- which MML provides special macros.
+
+    specialStrings : L S :=
+      ["cos", "cot", "csc", "log", "sec", "sin", "tan",
+        "cosh", "coth", "csch", "sech", "sinh", "tanh",
+          "acos","asin","atan","erf","...","$","infinity"]
+    specialStringsInMML : L S :=
+      ["<mo>cos</mo>","<mo>cot</mo>","<mo>csc</mo>","<mo>log</mo>","<mo>sec</mo>","<mo>sin</mo>","<mo>tan</mo>",
+        "<mo>cosh</mo>","<mo>coth</mo>","<mo>csch</mo>","<mo>sech</mo>","<mo>sinh</mo>","<mo>tanh</mo>",
+          "<mo>arccos</mo>","<mo>arcsin</mo>","<mo>arctan</mo>","<mo>erf</mo>","<mo>&#x2026;</mo>","<mo>$</mo>","<mo>&#x221E;</mo>"]
+
+@
+\subsection{Private Function Declarations}
+
+These are the local functions:
+
+    addBraces:S -$>$ S
+
+    addBrackets:S -$>$ S
+
+    atomize:E -$>$ L E
+
+    displayElt:S -$>$ Void
+      function for recursively displaying mathml nicely formatted
+
+    eltLimit:(S,I,S) -$>$ I
+      demarcates end postion of mathml element with name:S starting at
+      position i:I in mathml string s:S and returns end of end tag as
+      i:I position in mathml string, i.e. find start and end of
+      substring:  $<$name ...$>$...$<$/name$>$
+
+    eltName:(I,S) -$>$ S
+      find name of mathml element starting at position i:I in string s:S
+
+    group:S -$>$ S
+
+    formatBinary:(S,L E, I) -$>$ S
+
+    formatFunction:(S,L E, I) -$>$ S
+
+    formatMatrix:L E -$>$ S
+
+    formatNary:(S,L E, I) -$>$ S
+
+    formatNaryNoGroup:(S,L E, I) -$>$ S
+
+    formatNullary:S -$>$ S
+
+    formatPlex:(S,L E, I) -$>$ S
+
+    formatSpecial:(S,L E, I) -$>$ S
+
+    formatUnary:(S,  E, I) -$>$ S
+
+    formatMml:(E,I) -$>$ S
+
+    newWithNum:I -$>$ \$
+      this is a relic from tex.spad and is not used here so far.  I'll
+      probably remove it.
+
+    parenthesize:S -$>$ S
+
+    precondition:E -$>$ E
+      this function is applied to the OutputForm expression before
+      doing anything else.
+
+    postcondition:S -$>$ S
+      this function is applied after all other OutputForm -$>$ MathML
+      transformations.  In the TexFormat domain the ungroup function
+      first peels off the outermost set of braces however I have 
+      replaced braces with $<$mrow$>$s here and sometimes the outermost set
+      of $<$mrow$>$s is necessary to get proper display in Firefox.  
+      For instance with getting the correct size of brackets on a matrix 
+      the whole expression needs to be enclosed in a mrow element.  
+      It also checks for $+-$ and removes the $+$.
+
+    stringify:E -$>$ S
+
+    tagEnd:(S,I,S) -$>$ I
+      finds closing "$>$" of start or end tag for mathML element for formatting
+      MathML string for human readability.  No analog in TexFormat.
+
+    ungroup:S -$>$ S
+
+<<private function declarations>>=
+    -- local function signatures
+
+    addBraces:      S -> S
+    addBrackets:    S -> S
+    atomize:        E -> L E
+    displayElt:     S -> Void
+      ++ function for recursively displaying mathml nicely formatted
+    eltLimit:       (S,I,S) -> I
+      ++ demarcates end postion of mathml element with name:S starting at
+      ++ position i:I in mathml string s:S and returns end of end tag as
+      ++  i:I position in mathml string, i.e. find start and end of
+      ++  substring:  <name ...>...</name>
+    eltName:        (I,S) -> S
+      ++ find name of mathml element starting at position i:I in string s:S
+    group:          S -> S
+    formatBinary:   (S,L E, I) -> S
+    formatFunction: (S,L E, I) -> S
+    formatIntSign:  (L E, I) -> S
+    formatMatrix:   L E -> S
+    formatNary:     (S,L E, I) -> S
+    formatNaryNoGroup: (S,L E, I) -> S
+    formatNullary:  S -> S
+    formatPlex:     (S,L E, I) -> S
+    formatSpecial:  (S,L E, I) -> S
+    formatSub:      (E, L E, I) -> S
+    formatSuperSub: (E, L E, I) -> S
+    formatSuperSub1: (E, L E, I) -> S
+    formatUnary:    (S,  E, I) -> S
+    formatMml:      (E,I) -> S
+    formatZag:      L E -> S
+    formatZag1:     L E -> S
+    newWithNum:     I -> $
+    parenthesize:   S -> S
+    precondition:   E -> E
+    postcondition:  S -> S
+    stringify:      E -> S
+    tagEnd:         (S,I,S) -> I
+      ++  finds closing ">" of start or end tag for mathML element
+    ungroup:        S -> S
+
+@
+\subsection{Public Function Definitions}
+
+Note that I use the function sayTeX\$Lisp much as I would printf in a
+C program.  I've noticed in grepping the code that there are other "say"
+functions, sayBrightly and sayMessage for instance, but I have no idea
+what the difference is between them at this point.  sayTeX\$Lisp does the
+job so for the time being I'll use that until I learn more.
+
+The functions coerceS and coerceL should probably be changed to display
+functions, {\it i.e.}\/ \spadfun{displayS} and \spadfun{display L}, 
+returning Void.  I really only need the one coerce function.
+
+<<public function definitions>>=
+    -- public function definitions
+
+    coerce(expr : E): S ==
+      s : S := postcondition formatMml(precondition expr, minPrec)
+      s
+
+    coerceS(expr : E): S ==
+      s : S := postcondition formatMml(precondition expr, minPrec)
+      sayTeX$Lisp "<math xmlns=_"http://www.w3.org/1998/Math/MathML_" mathsize=_"big_" display=_"block_">"
+      displayElt(s)
+      sayTeX$Lisp "</math>"
+      s
+
+    coerceL(expr : E): S ==
+      s : S := postcondition formatMml(precondition expr, minPrec)
+      sayTeX$Lisp "<math xmlns=_"http://www.w3.org/1998/Math/MathML_" mathsize=_"big_" display=_"block_">"
+      sayTeX$Lisp s
+      sayTeX$Lisp "</math>"
+      s
+
+    display(mathml : S): Void ==
+      sayTeX$Lisp "<math xmlns=_"http://www.w3.org/1998/Math/MathML_" mathsize=_"big_" display=_"block_">"
+      sayTeX$Lisp mathml
+      sayTeX$Lisp "</math>"
+      void()$Void
+
+      
+
+    exprex(expr : E): S ==
+      -- This breaks down an expression into atoms and returns it as
+      -- a string.  It's for developmental purposes to help understand
+      -- the expressions.
+      a : E
+      expr := precondition expr
+--      sayTeX$Lisp "0: "stringify expr
+      (ATOM(expr)$Lisp@Boolean) or (stringify expr = "NOTHING") => 
+        concat ["{",stringify expr,"}"]      
+      le : L E := (expr pretend L E)
+      op := first le
+      sop : S := exprex op
+      args : L E := rest le
+      nargs : I := #args
+--      sayTeX$Lisp concat ["1: ",stringify first le," : ",string(nargs)$S]
+      s : S := concat ["{",sop]
+      if nargs > 0  then
+        for a in args repeat
+--	  sayTeX$Lisp concat ["2: ",stringify a]
+	  s1 : S := exprex a
+	  s := concat [s,s1]
+      s := concat [s,"}"]
+
+@
+\subsection{Private Function Definitions}
+
+\subsubsection{Display Functions}
+
+    displayElt(mathml:S):Void
+
+    eltName(pos:I,mathml:S):S
+
+    eltLimit(name:S,pos:I,mathml:S):I
+
+    tagEnd(name:S,pos:I,mathml:S):I
+
+<<display functions>>=
+
+    displayElt(mathML:S): Void ==
+      -- Takes a string of syntactically complete mathML
+      -- and formats it for display.
+--      sayTeX$Lisp "****displayElt1****"
+--      sayTeX$Lisp mathML
+      enT:I -- marks end of tag, e.g. "<name>"
+      enE:I -- marks end of element, e.g. "<name> ... </name>"
+      end:I -- marks end of mathML string
+      u:US
+      end := #mathML
+      length:I := 60
+--      sayTeX$Lisp "****displayElt1.1****"
+      name:S := eltName(1,mathML)
+--      sayTeX$Lisp name
+--      sayTeX$Lisp concat("****displayElt1.2****",name)
+      enE := eltLimit(name,2+#name,mathML)
+--      sayTeX$Lisp "****displayElt2****"
+      if enE < length then
+--        sayTeX$Lisp "****displayElt3****"
+        u := segment(1,enE)$US
+	sayTeX$Lisp mathML.u
+      else
+--        sayTeX$Lisp "****displayElt4****"
+        enT := tagEnd(name,1,mathML)
+	u := segment(1,enT)$US
+	sayTeX$Lisp mathML.u
+	u := segment(enT+1,enE-#name-3)$US
+	displayElt(mathML.u)
+	u := segment(enE-#name-2,enE)$US
+	sayTeX$Lisp mathML.u
+      if end > enE then
+--        sayTeX$Lisp "****displayElt5****"
+        u := segment(enE+1,end)$US
+        displayElt(mathML.u)
+
+      void()$Void
+
+    eltName(pos:I,mathML:S): S ==
+      -- Assuming pos is the position of "<" for a start tag of a mathML
+      -- element finds and returns the element's name.
+      i:I := pos+1
+      --sayTeX$Lisp "eltName:mathmML string: "mathML
+      while member?(mathML.i,lowerCase()$CharacterClass)$CharacterClass repeat
+         i := i+1
+      u:US := segment(pos+1,i-1)
+      name:S := mathML.u
+
+    eltLimit(name:S,pos:I,mathML:S): I ==
+      -- Finds the end of a mathML element like "<name ...> ... </name>"
+      -- where pos is the position of the space after name in the start tag
+      -- although it could point to the closing ">".  Returns the position
+      -- of the ">" in the end tag.
+      pI:I := pos
+      startI:I
+      endI:I
+      startS:S := concat ["<",name]
+      endS:S := concat ["</",name,">"]
+      level:I := 1
+      --sayTeX$Lisp "eltLimit: element name: "name
+      while (level > 0) repeat
+        startI := position(startS,mathML,pI)$String
+
+	endI := position(endS,mathML,pI)$String
+
+	if (startI = 0) then
+	  level := level-1
+          --sayTeX$Lisp "****eltLimit 1******"
+	  pI := tagEnd(name,endI,mathML)
+	else
+	  if (startI < endI) then
+	    level := level+1
+	    pI := tagEnd(name,startI,mathML)
+	  else
+	    level := level-1
+	    pI := tagEnd(name,endI,mathML)
+      pI
+
+
+    tagEnd(name:S,pos:I,mathML:S):I ==
+      -- Finds the closing ">" for either a start or end tag of a mathML
+      -- element, so the return value is the position of ">" in mathML.
+      pI:I := pos
+      while  (mathML.pI ^= char ">") repeat
+        pI := pI+1
+      u:US := segment(pos,pI)$US
+      --sayTeX$Lisp "tagEnd: "mathML.u
+      pI
+
+@
+\subsubsection{Formatting Functions}
+
+Still need to format \verb+\zag+ in formatSpecial!
+
+In formatPlex the case op = "INTSIGN" is now passed off to
+formatIntSign which is a change from the TexFormat domain.
+This is done here for presentation mark up to replace the
+ugly bound variable that Axiom delivers.  For content mark up
+this has to be done anyway.  
+
+The formatPlex function also allows for op = "INDEFINTEGRAL".
+However I don't know what Axiom command gives rise to this case.
+The INTSIGN case already allows for both definite and indefinite
+integrals.
+
+In the function formatSpecial various cases are handled including
+SUB and SUPERSUB.  These cases are now caught in formatMml and so
+the code in formatSpecial doesn't get executed.  The only cases
+I know of using these are partial derivatives for SUB and ordinary
+derivatives or SUPERSUB however in TexFormat the capability is there
+to handle multiscripts, i.e. an object with subscripts, superscripts,
+pre-subscripts and pre-superscripts but I am so far unaware of any
+Axiom command that produces such a multiscripted object.
+
+Another question is how to represent derivatives.  At present I have
+differential notation for partials and prime notation for ordinary 
+derivatives, 
+but it would be nice to allow for different derivative notations in 
+different circumstances, maybe some options to )set output mathml on.
+
+Ordinary derivatives are formatted in formatSuperSub and there are
+2 versions, formatSuperSub and formatSuperSub1, which at this point
+have to be switched by swapping names.
+
+<<formatting functions>>=
+
+    atomize(expr : E): L E ==
+      -- This breaks down an expression into a flat list of atomic expressions.
+      -- expr should be preconditioned.
+      le : L E := nil()
+      a : E
+      letmp : L E
+      (ATOM(expr)$Lisp@Boolean) or (stringify expr = "NOTHING") => 
+        le := append(le,list(expr))
+      letmp := expr pretend L E
+      for a in letmp repeat
+        le := append(le,atomize a)
+      le
+      	
+
+    ungroup(str: S): S ==
+      len : I := #str
+      len < 14 => str
+      lrow : S :=  "<mrow>"
+      rrow : S :=  "</mrow>"
+      -- drop leading and trailing mrows
+      u1 : US := segment(1,6)$US
+      u2 : US := segment(len-6,len)$US
+      if (str.u1 =$S lrow) and (str.u2 =$S rrow) then
+        u : US := segment(7,len-7)$US
+        str := str.u
+      str
+
+    postcondition(str: S): S ==
+--      str := ungroup str
+      len : I := #str
+      plusminus : S := "<mo>+</mo><mo>-</mo>"
+      pos : I := position(plusminus,str,1)
+      if pos > 0 then
+        ustart:US := segment(1,pos-1)$US
+	uend:US := segment(pos+20,len)$US
+        str := concat [str.ustart,"<mo>-</mo>",str.uend]
+	if pos < len-18 then
+	  str := postcondition(str)
+      str
+
+
+
+    stringify expr == (object2String$Lisp expr)@S
+
+
+
+    group str ==
+      concat ["<mrow>",str,"</mrow>"]
+
+    addBraces str ==
+      concat ["<mo>{</mo>",str,"<mo>}</mo>"]
+
+    addBrackets str ==
+      concat ["<mo>[</mo>",str,"<mo>]</mo>"]
+
+    parenthesize str ==
+      concat ["<mo>(</mo>",str,"<mo>)</mo>"]
+
+    precondition expr ==
+      outputTran$Lisp expr
+
+    formatSpecial(op : S, args : L E, prec : I) : S ==
+      arg : E
+      prescript : Boolean := false
+      op = "theMap" => "<mtext>theMap(...)</mtext>"
+      op = "AGGLST" =>
+        formatNary(",",args,prec)
+      op = "AGGSET" =>
+        formatNary(";",args,prec)
+      op = "TAG" =>
+        group concat [formatMml(first args,prec),
+                      "<mo>&#x02192;</mo>",
+                        formatMml(second args,prec)]
+			 --RightArrow
+      op = "VCONCAT" =>
+        group concat("<mtable><mtr>",
+                     concat(concat([concat("<mtd>",concat(formatMml(u, minPrec),"</mtd>"))
+                                    for u in args]::L S),
+                            "</mtr></mtable>"))
+      op = "CONCATB" =>
+        formatNary(" ",args,prec)
+      op = "CONCAT" =>
+        formatNary("",args,minPrec)
+      op = "QUOTE" =>
+        group concat("<mo>'</mo>",formatMml(first args, minPrec))
+      op = "BRACKET" =>
+        group addBrackets ungroup formatMml(first args, minPrec)
+      op = "BRACE" =>
+        group addBraces ungroup formatMml(first args, minPrec)
+      op = "PAREN" =>
+        group parenthesize ungroup formatMml(first args, minPrec)
+      op = "OVERBAR" =>
+        null args => ""
+        group concat ["<mover accent='true'><mrow>",formatMml(first args,minPrec),"</mrow><mo stretchy='true'>&#x000AF;</mo></mover>"]
+	 --OverBar
+      op = "ROOT" =>
+        null args => ""
+        tmp : S := group formatMml(first args, minPrec)
+        null rest args => concat ["<msqrt>",tmp,"</msqrt>"]
+        group concat
+	  ["<mroot><mrow>",tmp,"</mrow>",formatMml(first rest args, minPrec),"</mroot>"]
+      op = "SEGMENT" =>
+        tmp : S := concat [formatMml(first args, minPrec),"<mo>..</mo>"]
+        group
+          null rest args =>  tmp
+          concat [tmp,formatMml(first rest args, minPrec)]
+      -- SUB should now be diverted in formatMml although I'll leave
+      -- the code here for now.
+      op = "SUB" =>
+        group concat ["<msub>",formatMml(first args, minPrec),
+          formatSpecial("AGGLST",rest args,minPrec),"</msub>"]
+      -- SUPERSUB should now be diverted in formatMml although I'll leave
+      -- the code here for now.
+      op = "SUPERSUB" =>
+        base:S := formatMml(first args, minPrec)
+	args := rest args
+	if #args = 1 then
+	  "<msub><mrow>"base"</mrow><mrow>"formatMml(first args, minPrec)"</mrow></msub>"
+	else if #args = 2 then
+	-- it would be nice to substitue &#x2032; for , in the case of
+	-- an ordinary derivative, it looks a lot better.
+	  "<msubsup><mrow>"base"</mrow><mrow>"formatMml(first args,minPrec)"</mrow><mrow>"formatMml(first rest args, minPrec)"</mrow></msubsup>"
+	else if #args = 3 then
+	  "<mmultiscripts><mrow>"base"</mrow><mrow>"formatMml(first args,minPrec)"</mrow><mrow>"formatMml(first rest args,minPrec)"</mrow><mprescripts/><mrow>"formatMml(first rest rest args,minPrec)"</mrow><none/></mmultiscripts>"
+	else if #args = 4 then
+	  "<mmultiscripts><mrow>"base"</mrow><mrow>"formatMml(first args,minPrec)"</mrow><mrow>"formatMml(first rest args,minPrec)"</mrow><mprescripts/><mrow>"formatMml(first rest rest args,minPrec)"</mrow><mrow>"formatMml(first rest rest rest args,minPrec)"</mrow></mmultiscripts>"
+	else
+	  "<mtext>Problem with multiscript object</mtext>"
+      op = "SC" =>
+        -- need to handle indentation someday
+        null args => ""
+        tmp := formatNaryNoGroup("</mtd></mtr><mtr><mtd>", args, minPrec)
+        group concat ["<mtable><mtr><mtd>",tmp,"</mtd></mtr></mtable>"]
+      op = "MATRIX" => formatMatrix rest args
+      op = "ZAG" =>
+-- {{+}{3}{{ZAG}{1}{7}}{{ZAG}{1}{15}}{{ZAG}{1}{1}}{{ZAG}{1}{25}}{{ZAG}{1}{1}}{{ZAG}{1}{7}}{{ZAG}{1}{4}}}
+-- to format continued fraction traditionally need to intercept it at the
+-- formatNary of the "+"
+        concat [" \zag{",formatMml(first args, minPrec),"}{",
+          formatMml(first rest args,minPrec),"}"]
+      concat ["<mtext>not done yet for: ",op,"</mtext>"]
+
+    formatSub(expr : E, args : L E, opPrec : I) : S ==
+      -- This one produces differential notation partial derivatives.
+      -- At this time this is only to handle partial derivatives.
+      -- If the SUB case handles anything else I'm not aware of it.
+      -- This an example of the 4th partial of y(x,z) w.r.t. x,x,z,x
+      -- {{{SUB}{y}{{CONCAT}{{CONCAT}{{CONCAT}{{CONCAT}{,}{1}}{{CONCAT}{,}{1}}}{{CONCAT}{,}{2}}}{{CONCAT}{,}{1}}}}{x}{z}}
+      atomE : L E := atomize(expr)      
+      op : S := stringify first atomE
+      op ^= "SUB" => "<mtext>Mistake in formatSub: no SUB</mtext>"
+      stringify first rest rest atomE ^= "CONCAT" => "<mtext>Mistake in formatSub: no CONCAT</mtext>"
+      -- expecting form for atomE like
+      --[{SUB}{func}{CONCAT}...{CONCAT}{,}{n}{CONCAT}{,}{n}...{CONCAT}{,}{n}],
+      --counting the first CONCATs before the comma gives the number of
+      --derivatives
+      ndiffs : I := 0
+      tmpLE : L E := rest rest atomE
+      while stringify first tmpLE = "CONCAT" repeat
+        ndiffs := ndiffs+1
+	tmpLE := rest tmpLE
+      numLS : L S := nil
+      i : I := 1
+      while i < ndiffs repeat
+        numLS := append(numLS,list(stringify first rest tmpLE))
+	tmpLE := rest rest rest tmpLE
+	i := i+1
+      numLS := append(numLS,list(stringify first rest tmpLE))
+      -- numLS contains the numbers of the bound variables as strings
+      -- for the differentiations, thus for the differentiation [x,x,z,x]
+      -- for y(x,z) numLS = ["1","1","2","1"]
+      posLS : L S := nil
+      i := 0
+ --     sayTeX$Lisp "formatSub: nargs = "string(#args)
+      while i < #args repeat
+        posLS := append(posLS,list(string(i+1)))
+	i := i+1
+      -- posLS contains the positions of the bound variables in args
+      -- as a list of strings, e.g. for the above example ["1","2"]
+      tmpS: S := stringify atomE.2
+      if ndiffs = 1 then
+        s : S := "<mfrac><mo>&#x02202;</mo><mi>"tmpS"</mi><mrow>"
+      else        
+        s : S := "<mfrac><mrow><msup><mo>&#x02202;</mo><mn>"string(ndiffs)"</mn></msup><mi>"tmpS"</mi></mrow><mrow>"
+      -- need to find the order of the differentiation w.r.t. the i-th
+      -- variable
+      i := 1
+      j : I
+      k : I
+      tmpS: S
+      while i < #posLS+1 repeat
+	j := 0
+	k := 1
+	while k < #numLS + 1 repeat
+	  if numLS.k = string i then j := j + 1
+	  k := k+1
+        if j > 0 then
+	  tmpS := stringify args.i
+	  if j = 1 then
+	    s := s"<mo>&#x02202;</mo><mi>"tmpS"</mi>"
+	  else
+	    s := s"<mo>&#x02202;</mo><msup><mi>"tmpS"</mi><mn>"string(j)"</mn></msup>"
+        i := i + 1
+      s := s"</mrow></mfrac><mo>(</mo>"
+      i := 1
+      while i < #posLS+1 repeat
+        tmpS := stringify args.i
+	s := s"<mi>"tmpS"</mi>"
+	if i < #posLS then s := s"<mo>,</mo>"
+	i := i+1
+      s := s"<mo>)</mo>"
+
+    formatSub1(expr : E, args : L E, opPrec : I) : S ==
+      -- This one produces partial derivatives notated by ",n" as
+      -- subscripts.
+      -- At this time this is only to handle partial derivatives.
+      -- If the SUB case handles anything else I'm not aware of it.
+      -- This an example of the 4th partial of y(x,z) w.r.t. x,x,z,x
+      -- {{{SUB}{y}{{CONCAT}{{CONCAT}{{CONCAT}{{CONCAT}{,}{1}}
+      -- {{CONCAT}{,}{1}}}{{CONCAT}{,}{2}}}{{CONCAT}{,}{1}}}}{x}{z}},
+      -- here expr is everything in the first set of braces and 
+      -- args is {{x}{z}}
+      atomE : L E := atomize(expr)      
+      op : S := stringify first atomE
+      op ^= "SUB" => "<mtext>Mistake in formatSub: no SUB</mtext>"
+      stringify first rest rest atomE ^= "CONCAT" => "<mtext>Mistake in formatSub: no CONCAT</mtext>"
+      -- expecting form for atomE like
+      --[{SUB}{func}{CONCAT}...{CONCAT}{,}{n}{CONCAT}{,}{n}...{CONCAT}{,}{n}],
+      --counting the first CONCATs before the comma gives the number of
+      --derivatives
+      ndiffs : I := 0
+      tmpLE : L E := rest rest atomE
+      while stringify first tmpLE = "CONCAT" repeat
+        ndiffs := ndiffs+1
+	tmpLE := rest tmpLE
+      numLS : L S := nil
+      i : I := 1
+      while i < ndiffs repeat
+        numLS := append(numLS,list(stringify first rest tmpLE))
+	tmpLE := rest rest rest tmpLE
+	i := i+1
+      numLS := append(numLS,list(stringify first rest tmpLE))
+      -- numLS contains the numbers of the bound variables as strings
+      -- for the differentiations, thus for the differentiation [x,x,z,x]
+      -- for y(x,z) numLS = ["1","1","2","1"]
+      posLS : L S := nil
+      i := 0
+ --     sayTeX$Lisp "formatSub: nargs = "string(#args)
+      while i < #args repeat
+        posLS := append(posLS,list(string(i+1)))
+	i := i+1
+      -- posLS contains the positions of the bound variables in args
+      -- as a list of strings, e.g. for the above example ["1","2"]
+      funcS: S := stringify atomE.2
+      s : S := "<msub><mi>"funcS"</mi><mrow>"
+      i := 1
+      while i < #numLS+1 repeat
+        s := s"<mo>,</mo><mn>"numLS.i"</mn>"
+	i := i + 1
+      s := s"</mrow></msub><mo>(</mo>"
+      i := 1
+      while i < #posLS+1 repeat
+        tmpS := stringify args.i
+	s := s"<mi>"tmpS"</mi>"
+	if i < #posLS then s := s"<mo>,</mo>"
+	i := i+1
+      s := s"<mo>)</mo>"
+
+    formatSuperSub1(expr : E, args : L E, opPrec : I) : S ==
+      -- this produces differential notation ordinary derivatives.
+      -- first have to divine the semantics, add cases as needed
+      atomE : L E := atomize(expr)      
+      op : S := stringify first atomE
+      op ^= "SUPERSUB" => "<mtext>Mistake in formatSuperSub: no SUPERSUB</mtext>"
+      #args ^= 1 => "<mtext>Mistake in SuperSub: #args <> 1</mtext>"
+      var : E := first args
+      -- should be looking at something like {{SUPERSUB}{var}{ }{,,...,}} for
+      -- example here's the second derivative of y w.r.t. x
+      -- {{{SUPERSUB}{y}{ }{,,}}{x}}, expr is the first {} and args is the
+      -- {x}
+      funcS : S := stringify first rest atomE
+      bvarS : S := stringify first args
+      -- count the number of commas
+      commaS : S := stringify first rest rest rest atomE
+      commaTest : S := ","
+      i : I := 0
+      while position(commaTest,commaS,1) > 0 repeat
+        i := i+1
+	commaTest := commaTest","
+      s : S := "<msup><mi>"funcS"</mi><mrow>"
+      j : I := 0
+      while j < i repeat
+        s := s"<mo>&#x02032;</mo>"
+	j := j + 1
+      s := s"</mrow></msup><mo>&#x02061;</mo><mo>(</mo><mi>"bvarS"</mi><mo>)</mo>"
+
+    formatSuperSub(expr : E, args : L E, opPrec : I) : S ==
+      -- This one produces ordinary derivatives with prime notation.
+      -- first have to divine the semantics, add cases as needed
+      atomE : L E := atomize(expr)      
+      op : S := stringify first atomE
+      op ^= "SUPERSUB" => "<mtext>Mistake in formatSuperSub: no SUPERSUB</mtext>"
+      #args ^= 1 => "<mtext>Mistake in SuperSub: #args <> 1</mtext>"
+      var : E := first args
+      -- should be looking at something like {{SUPERSUB}{var}{ }{,,...,}} for
+      -- example here's the second derivative of y w.r.t. x
+      -- {{{SUPERSUB}{y}{ }{,,}}{x}}, expr is the first {} and args is the
+      -- {x}
+      funcS : S := stringify first rest atomE
+      bvarS : S := stringify first args
+      -- count the number of commas
+      commaS : S := stringify first rest rest rest atomE
+      commaTest : S := ","
+      ndiffs : I := 0
+      while position(commaTest,commaS,1) > 0 repeat
+        ndiffs := ndiffs+1
+	commaTest := commaTest","
+      s : S := "<mfrac><mrow><msup><mo>&#x02146;</mo><mn>"string(ndiffs)"</mn></msup><mi>"funcS"</mi></mrow><mrow><mo>&#x02146;</mo><msup><mi>"bvarS"</mi><mn>"string(ndiffs)"</mn></msup></mrow></mfrac><mo>&#x02061;</mo><mo>(</mo><mi>"bvarS"</mi><mo>)</mo>"
+
+    formatPlex(op : S, args : L E, prec : I) : S ==
+      hold : S
+      p : I := position(op,plexOps)
+      p < 1 => error "unknown plex op"
+      op = "INTSIGN" => formatIntSign(args,minPrec)
+      opPrec := plexPrecs.p
+      n : I := #args
+      (n ^= 2) and (n ^= 3) => error "wrong number of arguments for plex"
+      s : S :=
+        op = "SIGMA"   => "<mo>&#x02211;</mo>"
+	-- Sum
+        op = "SIGMA2"   => "<mo>&#x02211;</mo>"
+	-- Sum
+        op = "PI"      => "<mo>&#x0220F;</mo>"
+	-- Product
+        op = "PI2"     => "<mo>&#x0220F;</mo>"
+	-- Product
+--        op = "INTSIGN" => "<mo>&#x0222B;</mo>"
+	-- Integral, int
+        op = "INDEFINTEGRAL" => "<mo>&#x0222B;</mo>"
+	-- Integral, int
+        "????"
+      hold := formatMml(first args,minPrec)
+      args := rest args
+      if op ^= "INDEFINTEGRAL" then
+        if hold ^= "" then
+          s := concat ["<munderover>",s,group hold]
+	else
+	  s := concat ["<munderover>",s,group " "]
+        if not null rest args then
+          hold := formatMml(first args,minPrec)
+	  if hold ^= "" then
+            s := concat [s,group hold,"</munderover>"]
+	  else
+	    s := concat [s,group " ","</munderover>"]
+          args := rest args
+        s := concat [s,formatMml(first args,minPrec)]
+      else
+        hold := group concat [hold,formatMml(first args,minPrec)]
+        s := concat [s,hold]
+--      if opPrec < prec then s := parenthesize s
+-- getting ugly parentheses on fractions
+      group s
+
+    formatIntSign(args : L E, opPrec : I) : S ==
+      -- the original OutputForm expression looks something like this:
+      -- {{INTSIGN}{NOTHING or lower limit?}
+      -- {bvar or upper limit?}{{*}{integrand}{{CONCAT}{d}{axiom var}}}}
+      -- the args list passed here consists of the rest of this list, i.e.
+      -- starting at the NOTHING or ...
+      (stringify first args) = "NOTHING" =>
+        -- the bound variable is the second one in the argument list
+	bvar : E := first rest args
+	bvarS : S := stringify bvar
+	tmpS : S
+	i : I := 0
+	u1 : US
+	u2 : US
+	-- this next one atomizes the integrand plus differential
+	atomE : L E := atomize(first rest rest args)
+	-- pick out the bound variable used by axiom
+	varRS : S := stringify last(atomE)
+	tmpLE : L E := ((first rest rest args) pretend L E)
+        integrand : S := formatMml(first rest tmpLE,minPrec)
+	-- replace the bound variable, i.e. axiom uses someting of the form
+	-- %A for the bound variable and puts the original variable used
+	-- in the input command as a superscript on the integral sign.
+	-- I'm assuming that the axiom variable is 2 characters.
+	while (i := position(varRS,integrand,i+1)) > 0 repeat
+	  u1 := segment(1,i-1)$US
+	  u2 := segment(i+2,#integrand)$US
+	  integrand := concat [integrand.u1,bvarS,integrand.u2]
+	concat ["<mrow><mo>&#x0222B;</mo>" integrand "<mo>&#x02146;</mo><mi>" bvarS "</mi></mrow>"]
+
+      lowlim : S := stringify first args
+      highlim : S := stringify first rest args
+      bvar : E := last atomize(first rest rest args)
+      bvarS : S := stringify bvar
+      tmpLE : L E := ((first rest rest args) pretend L E)
+      integrand : S := formatMml(first rest tmpLE,minPrec)
+      concat ["<mrow><munderover><mo>&#x0222B;</mo><mi>" lowlim "</mi><mi>" highlim "</mi></munderover>" integrand "<mo>&#x02146;</mo><mi>" bvarS "</mi></mrow>"] 
+
+
+    formatMatrix(args : L E) : S ==
+      -- format for args is [[ROW ...],[ROW ...],[ROW ...]]
+      -- generate string for formatting columns (centered)
+      group addBrackets concat
+        ["<mtable><mtr><mtd>",formatNaryNoGroup("</mtd></mtr><mtr><mtd>",args,minPrec),
+          "</mtd></mtr></mtable>"]
+
+    formatFunction(op : S, args : L E, prec : I) : S ==
+      group concat ["<mo>",op,"</mo>",parenthesize formatNary(",",args,minPrec)]
+
+    formatNullary(op : S) ==
+      op = "NOTHING" => ""
+      group concat ["<mo>",op,"</mo><mo>(</mo><mo>)</mo>"]
+
+    formatUnary(op : S, arg : E, prec : I) ==
+      p : I := position(op,unaryOps)
+      p < 1 => error "unknown unary op"
+      opPrec := unaryPrecs.p
+      s : S := concat ["<mo>",op,"</mo>",formatMml(arg,opPrec)]
+      opPrec < prec => group parenthesize s
+      op = "-" => s
+      group s
+
+    formatBinary(op : S, args : L E, prec : I) : S ==
+      p : I := position(op,binaryOps)
+      p < 1 => error "unknown binary op"
+      opPrec := binaryPrecs.p
+      s1 : S := formatMml(first args, opPrec)
+      s2 : S := formatMml(first rest args, opPrec)
+      op :=
+        op = "|"     =>  s := concat ["<mrow>",s1,"</mrow><mo>",op,"</mo><mrow>",s2,"</mrow>"]
+        op = "**"    =>  s := concat ["<msup><mrow>",s1,"</mrow><mrow>",s2,"</mrow></msup>"]
+        op = "/"     =>  s := concat ["<mfrac><mrow>",s1,"</mrow><mrow>",s2,"</mrow></mfrac>"]
+        op = "OVER"  =>  s := concat ["<mfrac><mrow>",s1,"</mrow><mrow>",s2,"</mrow></mfrac>"]
+        op = "+->"   =>  s := concat ["<mrow>",s1,"</mrow><mo>",op,"</mo><mrow>",s2,"</mrow>"]
+        s := concat ["<mrow>",s1,"</mrow><mo>",op,"</mo><mrow>",s2,"</mrow>"]
+      group
+        op = "OVER" => s
+--        opPrec < prec => parenthesize s
+-- ugly parentheses?
+        s
+
+    formatNary(op : S, args : L E, prec : I) : S ==
+      group formatNaryNoGroup(op, args, prec)
+
+    formatNaryNoGroup(op : S, args : L E, prec : I) : S ==
+      null args => ""
+      p : I := position(op,naryOps)
+      p < 1 => error "unknown nary op"
+      -- need to test for "ZAG" case and divert it here, here's an
+      -- example including "op", the args list would be the rest of this
+      -- {{+}{3}{{ZAG}{1}{7}}{{ZAG}{1}{15}}{{ZAG}{1}{1}}{{ZAG}{1}{25}}
+      -- {{ZAG}{1}{1}}{{ZAG}{1}{7}}{{ZAG}{1}{4}}}
+      -- The first arg, the "3" in this case, could be a "ZAG" or something
+      -- else, but the second arg looks like it has to be "ZAG", so maybe
+      -- test for #args > 1 and args.2 is "ZAG".
+      -- This test should work so long as axiom doesn't try to evaluate
+      -- the second half of the "and" when the first half is false.
+      (#args > 1) and (position("ZAG",stringify first rest args,1) > 0) =>
+	   tmpS : S := stringify first args
+	   position("ZAG",tmpS,1) > 0 => formatZag(args)
+--	   position("ZAG",tmpS,1) > 0 => formatZag1(args)
+	   concat [formatMml(first args,minPrec) "<mo>+</mo>" formatZag(rest args)]
+      op :=
+        op = ","     => "<mo>,</mo>" --originally , \:
+        op = ";"     => "<mo>;</mo>" --originally ; \: should figure these out
+        op = "*"     => "<mo>&#x02062;</mo>"
+	-- InvisibleTimes
+        op = " "     => "<mspace width='0.5em'/>"
+        op = "ROW"   => "</mtd><mtd>"
+	op = "+"     => "<mo>+</mo>"
+	op = "-"     => "<mo>-</mo>"
+        op
+      l : L S := nil
+      opPrec := naryPrecs.p
+      for a in args repeat
+        l := concat(op,concat(formatMml(a,opPrec),l)$L(S))$L(S)
+      s : S := concat reverse rest l
+      opPrec < prec => parenthesize s
+      s
+
+    formatZag(args : L E) : S ==
+    -- {{ZAG}{1}{7}}
+      tmpZag : L E := first args pretend L E
+      #args > 1 => "<mfrac>"formatMml(first rest tmpZag,minPrec)"<mrow><mn>"formatMml(first rest rest tmpZag,minPrec)"</mn><mo>+</mo>"formatZag(rest args)"</mrow></mfrac>"
+      "<mfrac>"formatMml(first rest tmpZag,minPrec)formatMml(first rest rest tmpZag,minPrec)"</mfrac>"
+      
+    formatZag1(args : L E) : S ==
+    -- make alternative ZAG format without diminishing fonts, maybe
+    -- use a table
+    -- {{ZAG}{1}{7}}
+      tmpZag : L E := first args pretend L E
+      #args > 1 => "<mfrac>"formatMml(first rest tmpZag,minPrec)"<mrow><mn>"formatMml(first rest rest tmpZag,minPrec)"</mn><mo>+</mo>"formatZag(rest args)"</mrow></mfrac>"
+      "<mfrac>"formatMml(first rest tmpZag,minPrec)formatMml(first rest rest tmpZag,minPrec)"</mfrac>"
+
+    formatMml(expr : E,prec : I) ==
+      i,len : Integer
+      intSplitLen : Integer := 20
+      ATOM(expr)$Lisp@Boolean =>
+        str := stringify expr
+        len := #str
+	-- this bit seems to deal with integers
+        FIXP$Lisp expr =>
+          i := expr pretend Integer
+          if (i < 0) or (i > 9)
+            then
+              group
+                 nstr : String := ""
+                 -- insert some blanks into the string, if too long
+                 while ((len := #str) > intSplitLen) repeat
+                   nstr := concat [nstr," ",
+                     elt(str,segment(1,intSplitLen)$US)]
+                   str := elt(str,segment(intSplitLen+1)$US)
+                 empty? nstr => concat ["<mn>",str,"</mn>"]
+                 nstr :=
+                   empty? str => nstr
+                   concat [nstr," ",str]
+                 concat ["<mn>",elt(nstr,segment(2)$US),"</mn>"]
+            else str := concat ["<mn>",str,"</mn>"]
+        str = "%pi" => "<mi>&#x003C0;</mi>"
+	-- pi
+        str = "%e"  => "<mi>&#x02147;</mi>"
+	-- ExponentialE
+        str = "%i"  => "<mi>&#x02148;</mi>"
+	-- ImaginaryI
+	-- what sort of atom starts with %%? need an example
+        len > 1 and str.1 = char "%" and str.2 = char "%" =>
+          u : US := segment(3,len)$US
+          concat(concat("<mi>",str.u),"</mi>")
+        len > 0 and str.1 = char "%" => concat(concat("<mi>",str),"</mi>")
+        len > 1 and digit? str.1 => concat ["<mn>",str,"</mn>"] -- should handle floats
+	-- presumably this is a literal string
+        len > 0 and str.1 = char "_"" =>
+          concat(concat("<mtext>",str),"</mtext>")
+        len = 1 and str.1 = char " " => " "
+        (i := position(str,specialStrings)) > 0 =>
+          specialStringsInMML.i
+        (i := position(char " ",str)) > 0 =>
+          -- We want to preserve spacing, so use a roman font.
+	  -- What's this for?  Leave the \rm in for now so I can see
+	  -- where it arises.  Removed 2007-02-14
+          concat(concat("<mtext>",str),"</mtext>")
+	-- if we get to here does that mean it's a variable?
+        concat ["<mi>",str,"</mi>"]
+      l : L E := (expr pretend L E)
+      null l => blank
+      op : S := stringify first l
+      args : L E := rest l
+      nargs : I := #args
+
+      -- special cases
+      member?(op, specialOps) => formatSpecial(op,args,prec)
+      member?(op, plexOps)    => formatPlex(op,args,prec)
+
+      -- nullary case
+      0 = nargs => formatNullary op
+
+      -- unary case
+      (1 = nargs) and member?(op, unaryOps) =>
+        formatUnary(op, first args, prec)
+
+      -- binary case
+      (2 = nargs) and member?(op, binaryOps) =>
+        formatBinary(op, args, prec)
+
+      -- nary case
+      member?(op,naryNGOps) => formatNaryNoGroup(op,args, prec)
+      member?(op,naryOps) => formatNary(op,args, prec)
+      -- need to test here in case first l is SUPERSUB case and then
+      -- pass first l and args to formatSuperSub.
+      position("SUPERSUB",op,1) > 0 =>
+        formatSuperSub(first l,args,minPrec)
+      -- now test for SUB
+      position("SUB",op,1) > 0 =>
+        formatSub(first l,args,minPrec)
+
+      op := formatMml(first l,minPrec)
+      formatFunction(op,args,prec)
+
+@
+\section{Mathematical Markup Language Form}
+<<package MMLFORM MathMLForm>>=
+<<public declarations>>
+<<private constant declarations>>
+<<private function declarations>>
+<<public function definitions>>
+<<display functions>>
+<<formatting functions>>
+
+@
+\section{License}
+<<license>>=
+--Copyright (c) 1991-2002, The Numerical ALgorithms Group Ltd.
+--All rights reserved.
+--
+--Redistribution and use in source and binary forms, with or without
+--modification, are permitted provided that the following conditions are
+--met:
+--
+--    - Redistributions of source code must retain the above copyright
+--      notice, this list of conditions and the following disclaimer.
+--
+--    - Redistributions in binary form must reproduce the above copyright
+--      notice, this list of conditions and the following disclaimer in
+--      the documentation and/or other materials provided with the
+--      distribution.
+--
+--    - Neither the name of The Numerical ALgorithms Group Ltd. nor the
+--      names of its contributors may be used to endorse or promote products
+--      derived from this software without specific prior written permission.
+--
+--THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
+--IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
+--TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
+--PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER
+--OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+--EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+--PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+--PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+--LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+--NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+--SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+@
+<<*>>=
+<<license>>
+<<package MMLFORM MathMLForm>>
+@
+\eject
+\begin{thebibliography}{99}
+\bibitem{1} nothing
+\end{thebibliography}
+\end{document}
diff --git a/src/input/Makefile.pamphlet b/src/input/Makefile.pamphlet
index 474b899..621d8ed 100644
--- a/src/input/Makefile.pamphlet
+++ b/src/input/Makefile.pamphlet
@@ -329,7 +329,8 @@ REGRES= algaggr.regress algbrbf.regress  algfacob.regress alist.regress  \
     lodo2.regress     lodo3.regress    lodof.regress    lodo.regress \
     lpoly.regress     lupfact.regress  lword.regress    macbug.regress \
     macros.regress    magma.regress    mapleok.regress  mappkg1.regress \
-    matbug.regress    matrix1.regress  matrix22.regress matrix.regress \
+    matbug.regress    mathml.regress   \
+    matrix1.regress  matrix22.regress matrix.regress \
     mfinfact.regress  mkfunc.regress   mpoly.regress    mset2.regress \
     mset.regress      multfact.regress multiple.regress ndftip.regress \
     negfloats.regress nepip.regress    newlodo.regress  newton.regress \
@@ -551,6 +552,7 @@ FILES= ${OUT}/algaggr.input  ${OUT}/algbrbf.input    ${OUT}/algfacob.input \
        ${OUT}/lupfact.input  ${OUT}/lword.input      ${OUT}/macbug.input \
        ${OUT}/macros.input   ${OUT}/marcbench.input  ${OUT}/magma.input \
        ${OUT}/mapleok.input  ${OUT}/mappkg1.input    ${OUT}/matbug.input \
+       ${OUT}/mathml.input \
        ${OUT}/matrix22.input ${OUT}/matrix.input     ${OUT}/matrix1.input \
        ${OUT}/mfinfact.input ${OUT}/mkfunc.input     ${OUT}/mountain.input \
        ${OUT}/mpoly.input    ${OUT}/mset.input       ${OUT}/mset2.input \
@@ -816,6 +818,7 @@ DOCFILES= \
   ${DOC}/macros.input.dvi      ${DOC}/magma.input.dvi      \
   ${DOC}/mapleok.input.dvi     ${DOC}/mappkg1.input.dvi    \
   ${DOC}/marcbench.input.dvi   ${DOC}/matbug.input.dvi     \
+  ${DOC}/mathml.input.dvi      \
   ${DOC}/matops.as.dvi         ${DOC}/matrix1.input.dvi    \
   ${DOC}/matrix22.input.dvi    ${DOC}/matrix.input.dvi     \
   ${DOC}/matrox.input.dvi      ${DOC}/mfinfact.input.dvi   \
diff --git a/src/input/mathml.input.pamphlet b/src/input/mathml.input.pamphlet
new file mode 100644
index 0000000..461f32c
--- /dev/null
+++ b/src/input/mathml.input.pamphlet
@@ -0,0 +1,349 @@
+\documentclass{article}
+\usepackage{axiom}
+\begin{document}
+\title{\$SPAD/src/input mathml.input}
+\author{Arthur Ralfs}
+\maketitle
+\begin{abstract}
+\end{abstract}
+\eject
+\tableofcontents
+\eject
+<<*>>=
+)spool mathml.output
+)set message test on
+)set message auto off
+)clear all
+ 
+--S 1 of 21
+(x+y)**2
+--R 
+--R
+--R         2           2
+--R   (1)  y  + 2x y + x
+--R                                                     Type: Polynomial Integer
+--E 1
+
+--S 2 of 21
+coerce(%)$MMLFORM
+--R 
+--R
+--R   (2)
+--R  "<mrow><mrow><msup><mrow><mi>y</mi></mrow><mrow><mn>2</mn></mrow></msup></mro
+--R  w><mo>+</mo><mrow><mn>2</mn><mo>&#x02062;</mo><mi>x</mi><mo>&#x02062;</mo><mi
+--R  >y</mi></mrow><mo>+</mo><mrow><msup><mrow><mi>x</mi></mrow><mrow><mn>2</mn></
+--R  mrow></msup></mrow></mrow>"
+--R                                                                 Type: String
+--E 2
+
+--S 3 of 21
+(x+y)**2
+--R 
+--R
+--R         2           2
+--R   (3)  y  + 2x y + x
+--R                                                     Type: Polynomial Integer
+--E 3
+
+--S 4 of 21
+display(coerce(%)$MMLFORM)$MMLFORM
+--R 
+--R<math xmlns="http://www.w3.org/1998/Math/MathML" mathsize="big" display="block">
+--R<mrow><mrow><msup><mrow><mi>y</mi></mrow><mrow><mn>2</mn></mrow></msup></mrow><mo>+</mo><mrow><mn>2</mn><mo>&#x02062;</mo><mi>x</mi><mo>&#x02062;</mo><mi>y</mi></mrow><mo>+</mo><mrow><msup><mrow><mi>x</mi></mrow><mrow><mn>2</mn></mrow></msup></mrow></mrow>
+--R</math>
+--R                                                                   Type: Void
+--E 4
+
+)set output mathml on
+
+--S 5 of 21
+(x+y)**2
+--R
+--R         2           2
+--R   (5)  y  + 2x y + x
+--R<math xmlns="http://www.w3.org/1998/Math/MathML" mathsize="big" display="block">
+--R<mrow><mrow><msup><mrow><mi>y</mi></mrow><mrow><mn>2</mn></mrow></msup></mrow><mo>+</mo><mrow><mn>2</mn><mo>&#x02062;</mo><mi>x</mi><mo>&#x02062;</mo><mi>y</mi></mrow><mo>+</mo><mrow><msup><mrow><mi>x</mi></mrow><mrow><mn>2</mn></mrow></msup></mrow></mrow>
+--R</math>
+--R
+--R                                                     Type: Polynomial Integer
+--E 5
+
+--S 6 of 21
+integrate(x**x,x)
+--R
+--R           x
+--R         ++    %I
+--R   (6)   |   %I  d%I
+--R        ++
+--R<math xmlns="http://www.w3.org/1998/Math/MathML" mathsize="big" display="block">
+--R<mrow><mo>&#x0222B;</mo><mrow><msup><mrow><mi>x</mi></mrow><mrow><mi>x</mi></mrow></msup></mrow><mo>&#x02146;</mo><mi>x</mi></mrow>
+--R</math>
+--R
+--R                                          Type: Union(Expression Integer,...)
+--E 6
+
+--S 7 of 21
+integral(x**x,x)
+--R
+--R           x
+--R         ++    %I
+--R   (7)   |   %I  d%I
+--R        ++
+--R<math xmlns="http://www.w3.org/1998/Math/MathML" mathsize="big" display="block">
+--R<mrow><mo>&#x0222B;</mo><mrow><msup><mrow><mi>x</mi></mrow><mrow><mi>x</mi></mrow></msup></mrow><mo>&#x02146;</mo><mi>x</mi></mrow>
+--R</math>
+--R
+--R                                                     Type: Expression Integer
+--E 7
+
+--S 8 of 21
+(5+sqrt 63 + sqrt 847)**(1/3)
+--R
+--R         +----------+
+--R        3|   +-+
+--R   (8)  \|14\|7  + 5
+--R<math xmlns="http://www.w3.org/1998/Math/MathML" mathsize="big" display="block">
+--R<mrow><mroot><mrow><mrow><mrow><mrow><mrow><mn>14</mn></mrow><mo>&#x02062;</mo><msqrt><mrow><mn>7</mn></mrow></msqrt></mrow><mo>+</mo><mn>5</mn></mrow></mrow></mrow><mn>3</mn></mroot></mrow>
+--R</math>
+--R
+--R                                                        Type: AlgebraicNumber
+--E 8
+
+--S 9 of 21
+set [1,2,3]
+--R
+--R   (9)  {1,2,3}
+--R<math xmlns="http://www.w3.org/1998/Math/MathML" mathsize="big" display="block">
+--R<mrow><mo>{</mo><mn>1</mn><mo>,</mo><mn>2</mn><mo>,</mo><mn>3</mn><mo>}</mo></mrow>
+--R</math>
+--R
+--R                                                    Type: Set PositiveInteger
+--E 9
+
+--S 10 of 21
+multiset [x rem 5 for x in primes(2,1000)]
+--R
+--R   (10)  {0,40: 1,47: 2,42: 3,38: 4}
+--R<math xmlns="http://www.w3.org/1998/Math/MathML" mathsize="big" display="block">
+--R<mrow><mo>{</mo><mn>0</mn><mo>,</mo><mrow><mrow><mn>40</mn></mrow><mtext>: </mtext><mn>1</mn></mrow><mo>,</mo><mrow><mrow><mn>47</mn></mrow><mtext>: </mtext><mn>2</mn></mrow><mo>,</mo><mrow><mrow><mn>42</mn></mrow><mtext>: </mtext><mn>3</mn></mrow><mo>,</mo><mrow><mrow><mn>38</mn></mrow><mtext>: </mtext><mn>4</mn></mrow><mo>}</mo></mrow>
+--R</math>
+--R
+--R                                                       Type: Multiset Integer
+--E 10
+
+--S 11 of 21
+series(sin(a*x),x=0)
+--R
+--R                3        5        7          9            11
+--R               a   3    a   5    a    7     a     9      a      11      12
+--R   (11)  a x - -- x  + --- x  - ---- x  + ------ x  - -------- x   + O(x  )
+--R                6      120      5040      362880      39916800
+--R<math xmlns="http://www.w3.org/1998/Math/MathML" mathsize="big" display="block">
+--R<mrow><mrow><mi>a</mi><mo>&#x02062;</mo><mi>x</mi></mrow><mo>-</mo><mrow><mrow><mfrac><mrow><mrow><msup><mrow><mi>a</mi></mrow><mrow><mn>3</mn></mrow></msup></mrow></mrow><mrow><mn>6</mn></mrow></mfrac></mrow><mo>&#x02062;</mo><mrow><msup><mrow><mi>x</mi></mrow><mrow><mn>3</mn></mrow></msup></mrow></mrow><mo>+</mo><mrow><mrow><mfrac><mrow><mrow><msup><mrow><mi>a</mi></mrow><mrow><mn>5</mn></mrow></msup></mrow></mrow><mrow><mrow><mn>120</mn></mrow></mrow></mfrac></mrow><mo>&#x02062;</mo><mrow><msup><mrow><mi>x</mi></mrow><mrow><mn>5</mn></mrow></msup></mrow></mrow><mo>-</mo><mrow><mrow><mfrac><mrow><mrow><msup><mrow><mi>a</mi></mrow><mrow><mn>7</mn></mrow></msup></mrow></mrow><mrow><mrow><mn>5040</mn></mrow></mrow></mfrac></mrow><mo>&#x02062;</mo><mrow><msup><mrow><mi>x</mi></mrow><mrow><mn>7</mn></mrow></msup></mrow></mrow><mo>+</mo><mrow><mrow><mfrac><mrow><mrow><msup><mrow><mi>a</mi></mrow><mrow><mn>9</mn></mrow></msup></mrow></mrow><mrow><mrow><mn>362880</mn></mrow></!
 mrow></mfrac></mrow><mo>&#x02062;</mo><mrow><msup><mrow><mi>x</mi></mrow><mrow><mn>9</mn></mrow></msup></mrow></mrow><mo>-</mo><mrow><mrow><mfrac><mrow><mrow><msup><mrow><mi>a</mi></mrow><mrow><mrow><mn>11</mn></mrow></mrow></msup></mrow></mrow><mrow><mrow><mn>39916800</mn></mrow></mrow></mfrac></mrow><mo>&#x02062;</mo><mrow><msup><mrow><mi>x</mi></mrow><mrow><mrow><mn>11</mn></mrow></mrow></msup></mrow></mrow><mo>+</mo><mrow><mo><mi>O</mi></mo><mo>(</mo><mrow><mrow><msup><mrow><mi>x</mi></mrow><mrow><mrow><mn>12</mn></mrow></mrow></msup></mrow></mrow><mo>)</mo></mrow></mrow>
+--R</math>
+--R
+--R                        Type: UnivariatePuiseuxSeries(Expression Integer,x,0)
+--E 11
+
+--S 12 of 21
+matrix [[xi+yj for i in 1..10] for j in 1..10]
+--R
+--R   (12)
+--R   [
+--R     [yj + xi, yj + xi, yj + xi, yj + xi, yj + xi, yj + xi, yj + xi, yj + xi,
+--R      yj + xi, yj + xi]
+--R     ,
+--R
+--R     [yj + xi, yj + xi, yj + xi, yj + xi, yj + xi, yj + xi, yj + xi, yj + xi,
+--R      yj + xi, yj + xi]
+--R     ,
+--R
+--R     [yj + xi, yj + xi, yj + xi, yj + xi, yj + xi, yj + xi, yj + xi, yj + xi,
+--R      yj + xi, yj + xi]
+--R     ,
+--R
+--R     [yj + xi, yj + xi, yj + xi, yj + xi, yj + xi, yj + xi, yj + xi, yj + xi,
+--R      yj + xi, yj + xi]
+--R     ,
+--R
+--R     [yj + xi, yj + xi, yj + xi, yj + xi, yj + xi, yj + xi, yj + xi, yj + xi,
+--R      yj + xi, yj + xi]
+--R     ,
+--R
+--R     [yj + xi, yj + xi, yj + xi, yj + xi, yj + xi, yj + xi, yj + xi, yj + xi,
+--R      yj + xi, yj + xi]
+--R     ,
+--R
+--R     [yj + xi, yj + xi, yj + xi, yj + xi, yj + xi, yj + xi, yj + xi, yj + xi,
+--R      yj + xi, yj + xi]
+--R     ,
+--R
+--R     [yj + xi, yj + xi, yj + xi, yj + xi, yj + xi, yj + xi, yj + xi, yj + xi,
+--R      yj + xi, yj + xi]
+--R     ,
+--R
+--R     [yj + xi, yj + xi, yj + xi, yj + xi, yj + xi, yj + xi, yj + xi, yj + xi,
+--R      yj + xi, yj + xi]
+--R     ,
+--R
+--R     [yj + xi, yj + xi, yj + xi, yj + xi, yj + xi, yj + xi, yj + xi, yj + xi,
+--R      yj + xi, yj + xi]
+--R     ]
+--R<math xmlns="http://www.w3.org/1998/Math/MathML" mathsize="big" display="block">
+--R<mrow><mo>[</mo><mtable><mtr><mtd><mrow><mi>yj</mi><mo>+</mo><mi>xi</mi></mrow></mtd><mtd><mrow><mi>yj</mi><mo>+</mo><mi>xi</mi></mrow></mtd><mtd><mrow><mi>yj</mi><mo>+</mo><mi>xi</mi></mrow></mtd><mtd><mrow><mi>yj</mi><mo>+</mo><mi>xi</mi></mrow></mtd><mtd><mrow><mi>yj</mi><mo>+</mo><mi>xi</mi></mrow></mtd><mtd><mrow><mi>yj</mi><mo>+</mo><mi>xi</mi></mrow></mtd><mtd><mrow><mi>yj</mi><mo>+</mo><mi>xi</mi></mrow></mtd><mtd><mrow><mi>yj</mi><mo>+</mo><mi>xi</mi></mrow></mtd><mtd><mrow><mi>yj</mi><mo>+</mo><mi>xi</mi></mrow></mtd><mtd><mrow><mi>yj</mi><mo>+</mo><mi>xi</mi></mrow></mtd></mtr><mtr><mtd><mrow><mi>yj</mi><mo>+</mo><mi>xi</mi></mrow></mtd><mtd><mrow><mi>yj</mi><mo>+</mo><mi>xi</mi></mrow></mtd><mtd><mrow><mi>yj</mi><mo>+</mo><mi>xi</mi></mrow></mtd><mtd><mrow><mi>yj</mi><mo>+</mo><mi>xi</mi></mrow></mtd><mtd><mrow><mi>yj</mi><mo>+</mo><mi>xi</mi></mrow></mtd><mtd><mrow><mi>yj</mi><mo>+</mo><mi>xi</mi></mrow></mtd><mtd><mrow><mi>yj</mi><mo>+</mo><mi>xi</mi></mrow!
 ></mtd><mtd><mrow><mi>yj</mi><mo>+</mo><mi>xi</mi></mrow></mtd><mtd><mrow><mi>yj</mi><mo>+</mo><mi>xi</mi></mrow></mtd><mtd><mrow><mi>yj</mi><mo>+</mo><mi>xi</mi></mrow></mtd></mtr><mtr><mtd><mrow><mi>yj</mi><mo>+</mo><mi>xi</mi></mrow></mtd><mtd><mrow><mi>yj</mi><mo>+</mo><mi>xi</mi></mrow></mtd><mtd><mrow><mi>yj</mi><mo>+</mo><mi>xi</mi></mrow></mtd><mtd><mrow><mi>yj</mi><mo>+</mo><mi>xi</mi></mrow></mtd><mtd><mrow><mi>yj</mi><mo>+</mo><mi>xi</mi></mrow></mtd><mtd><mrow><mi>yj</mi><mo>+</mo><mi>xi</mi></mrow></mtd><mtd><mrow><mi>yj</mi><mo>+</mo><mi>xi</mi></mrow></mtd><mtd><mrow><mi>yj</mi><mo>+</mo><mi>xi</mi></mrow></mtd><mtd><mrow><mi>yj</mi><mo>+</mo><mi>xi</mi></mrow></mtd><mtd><mrow><mi>yj</mi><mo>+</mo><mi>xi</mi></mrow></mtd></mtr><mtr><mtd><mrow><mi>yj</mi><mo>+</mo><mi>xi</mi></mrow></mtd><mtd><mrow><mi>yj</mi><mo>+</mo><mi>xi</mi></mrow></mtd><mtd><mrow><mi>yj</mi><mo>+</mo><mi>xi</mi></mrow></mtd><mtd><mrow><mi>yj</mi><mo>+</mo><mi>xi</mi></mrow></mtd><mtd><m!
 row><mi>yj</mi><mo>+</mo><mi>xi</mi></mrow></mtd><mtd><mrow><m!
i>yj</mi><mo>+</mo><mi>xi</mi></mrow></mtd><mtd><mrow><mi>yj</mi><mo>+</mo><mi>xi</mi></mrow></mtd><mtd><mrow><mi>yj</mi><mo>+</mo><mi>xi</mi></mrow></mtd><mtd><mrow><mi>yj</mi><mo>+</mo><mi>xi</mi></mrow></mtd><mtd><mrow><mi>yj</mi><mo>+</mo><mi>xi</mi></mrow></mtd></mtr><mtr><mtd><mrow><mi>yj</mi><mo>+</mo><mi>xi</mi></mrow></mtd><mtd><mrow><mi>yj</mi><mo>+</mo><mi>xi</mi></mrow></mtd><mtd><mrow><mi>yj</mi><mo>+</mo><mi>xi</mi></mrow></mtd><mtd><mrow><mi>yj</mi><mo>+</mo><mi>xi</mi></mrow></mtd><mtd><mrow><mi>yj</mi><mo>+</mo><mi>xi</mi></mrow></mtd><mtd><mrow><mi>yj</mi><mo>+</mo><mi>xi</mi></mrow></mtd><mtd><mrow><mi>yj</mi><mo>+</mo><mi>xi</mi></mrow></mtd><mtd><mrow><mi>yj</mi><mo>+</mo><mi>xi</mi></mrow></mtd><mtd><mrow><mi>yj</mi><mo>+</mo><mi>xi</mi></mrow></mtd><mtd><mrow><mi>yj</mi><mo>+</mo><mi>xi</mi></mrow></mtd></mtr><mtr><mtd><mrow><mi>yj</mi><mo>+</mo><mi>xi</mi></mrow></mtd><mtd><mrow><mi>yj</mi><mo>+</mo><mi>xi</mi></mrow></mtd><mtd><mrow><mi>yj</mi><mo>+<!
 /mo><mi>xi</mi></mrow></mtd><mtd><mrow><mi>yj</mi><mo>+</mo><mi>xi</mi></mrow></mtd><mtd><mrow><mi>yj</mi><mo>+</mo><mi>xi</mi></mrow></mtd><mtd><mrow><mi>yj</mi><mo>+</mo><mi>xi</mi></mrow></mtd><mtd><mrow><mi>yj</mi><mo>+</mo><mi>xi</mi></mrow></mtd><mtd><mrow><mi>yj</mi><mo>+</mo><mi>xi</mi></mrow></mtd><mtd><mrow><mi>yj</mi><mo>+</mo><mi>xi</mi></mrow></mtd><mtd><mrow><mi>yj</mi><mo>+</mo><mi>xi</mi></mrow></mtd></mtr><mtr><mtd><mrow><mi>yj</mi><mo>+</mo><mi>xi</mi></mrow></mtd><mtd><mrow><mi>yj</mi><mo>+</mo><mi>xi</mi></mrow></mtd><mtd><mrow><mi>yj</mi><mo>+</mo><mi>xi</mi></mrow></mtd><mtd><mrow><mi>yj</mi><mo>+</mo><mi>xi</mi></mrow></mtd><mtd><mrow><mi>yj</mi><mo>+</mo><mi>xi</mi></mrow></mtd><mtd><mrow><mi>yj</mi><mo>+</mo><mi>xi</mi></mrow></mtd><mtd><mrow><mi>yj</mi><mo>+</mo><mi>xi</mi></mrow></mtd><mtd><mrow><mi>yj</mi><mo>+</mo><mi>xi</mi></mrow></mtd><mtd><mrow><mi>yj</mi><mo>+</mo><mi>xi</mi></mrow></mtd><mtd><mrow><mi>yj</mi><mo>+</mo><mi>xi</mi></mrow></m!
 td></mtr><mtr><mtd><mrow><mi>yj</mi><mo>+</mo><mi>xi</mi></mro!
w></mtd><mtd><mrow><mi>yj</mi><mo>+</mo><mi>xi</mi></mrow></mtd><mtd><mrow><mi>yj</mi><mo>+</mo><mi>xi</mi></mrow></mtd><mtd><mrow><mi>yj</mi><mo>+</mo><mi>xi</mi></mrow></mtd><mtd><mrow><mi>yj</mi><mo>+</mo><mi>xi</mi></mrow></mtd><mtd><mrow><mi>yj</mi><mo>+</mo><mi>xi</mi></mrow></mtd><mtd><mrow><mi>yj</mi><mo>+</mo><mi>xi</mi></mrow></mtd><mtd><mrow><mi>yj</mi><mo>+</mo><mi>xi</mi></mrow></mtd><mtd><mrow><mi>yj</mi><mo>+</mo><mi>xi</mi></mrow></mtd><mtd><mrow><mi>yj</mi><mo>+</mo><mi>xi</mi></mrow></mtd></mtr><mtr><mtd><mrow><mi>yj</mi><mo>+</mo><mi>xi</mi></mrow></mtd><mtd><mrow><mi>yj</mi><mo>+</mo><mi>xi</mi></mrow></mtd><mtd><mrow><mi>yj</mi><mo>+</mo><mi>xi</mi></mrow></mtd><mtd><mrow><mi>yj</mi><mo>+</mo><mi>xi</mi></mrow></mtd><mtd><mrow><mi>yj</mi><mo>+</mo><mi>xi</mi></mrow></mtd><mtd><mrow><mi>yj</mi><mo>+</mo><mi>xi</mi></mrow></mtd><mtd><mrow><mi>yj</mi><mo>+</mo><mi>xi</mi></mrow></mtd><mtd><mrow><mi>yj</mi><mo>+</mo><mi>xi</mi></mrow></mtd><mtd><mrow><mi>yj<!
 /mi><mo>+</mo><mi>xi</mi></mrow></mtd><mtd><mrow><mi>yj</mi><mo>+</mo><mi>xi</mi></mrow></mtd></mtr><mtr><mtd><mrow><mi>yj</mi><mo>+</mo><mi>xi</mi></mrow></mtd><mtd><mrow><mi>yj</mi><mo>+</mo><mi>xi</mi></mrow></mtd><mtd><mrow><mi>yj</mi><mo>+</mo><mi>xi</mi></mrow></mtd><mtd><mrow><mi>yj</mi><mo>+</mo><mi>xi</mi></mrow></mtd><mtd><mrow><mi>yj</mi><mo>+</mo><mi>xi</mi></mrow></mtd><mtd><mrow><mi>yj</mi><mo>+</mo><mi>xi</mi></mrow></mtd><mtd><mrow><mi>yj</mi><mo>+</mo><mi>xi</mi></mrow></mtd><mtd><mrow><mi>yj</mi><mo>+</mo><mi>xi</mi></mrow></mtd><mtd><mrow><mi>yj</mi><mo>+</mo><mi>xi</mi></mrow></mtd><mtd><mrow><mi>yj</mi><mo>+</mo><mi>xi</mi></mrow></mtd></mtr></mtable><mo>]</mo></mrow>
+--R</math>
+--R
+--R                                              Type: Matrix Polynomial Integer
+--E 12
+
+--S 13 of 21
+y:=operator 'y
+--R
+--R   (13)  y
+--R<math xmlns="http://www.w3.org/1998/Math/MathML" mathsize="big" display="block">
+--R<mi>y</mi>
+--R</math>
+--R
+--R                                                          Type: BasicOperator
+--E 13
+
+--S 14 of 21
+D(y(x,z),[x,x,z,x])
+--R
+--R   (14)  y        (x,z)
+--R          ,1,1,2,1
+--R<math xmlns="http://www.w3.org/1998/Math/MathML" mathsize="big" display="block">
+--R<mfrac><mrow><msup><mo>&#x02202;</mo><mn>4</mn></msup><mi>y</mi></mrow><mrow><mo>&#x02202;</mo><msup><mi>x</mi><mn>3</mn></msup><mo>&#x02202;</mo><mi>z</mi></mrow></mfrac><mo>(</mo><mi>x</mi><mo>,</mo><mi>z</mi><mo>)</mo>
+--R</math>
+--R
+--R                                                     Type: Expression Integer
+--E 14
+)clear all
+
+--S 15 of 21
+y:=operator 'y
+--R 
+--R
+--R   (1)  y
+--R<math xmlns="http://www.w3.org/1998/Math/MathML" mathsize="big" display="block">
+--R<mi>y</mi>
+--R</math>
+--R
+--R                                                          Type: BasicOperator
+--E 15
+
+--S 16 of 21
+D(y x,x,2)
+--R
+--R         ,,
+--R   (2)  y  (x)
+--R
+--R<math xmlns="http://www.w3.org/1998/Math/MathML" mathsize="big" display="block">
+--R<mfrac><mrow><msup><mo>&#x02146;</mo><mn>2</mn></msup><mi>y</mi></mrow><mrow><mo>&#x02146;</mo><msup><mi>x</mi><mn>2</mn></msup></mrow></mfrac><mo>&#x02061;</mo><mo>(</mo><mi>x</mi><mo>)</mo>
+--R</math>
+--R
+--R                                                     Type: Expression Integer
+--E 16
+
+--S 17 of 21
+x:=series 'x
+--R 
+--R
+--R   (3)  x
+--R<math xmlns="http://www.w3.org/1998/Math/MathML" mathsize="big" display="block">
+--R<mi>x</mi>
+--R</math>
+--R
+--R                        Type: UnivariatePuiseuxSeries(Expression Integer,x,0)
+--E 17
+
+--S 18 of 21
+sin(1+x)
+--R
+--R   (4)
+--R                        sin(1)  2   cos(1)  3   sin(1)  4   cos(1)  5
+--R     sin(1) + cos(1)x - ------ x  - ------ x  + ------ x  + ------ x
+--R                           2           6          24          120
+--R   + 
+--R       sin(1)  6   cos(1)  7   sin(1)  8   cos(1)  9    sin(1)  10      11
+--R     - ------ x  - ------ x  + ------ x  + ------ x  - ------- x   + O(x  )
+--R         720        5040        40320      362880      3628800
+--R<math xmlns="http://www.w3.org/1998/Math/MathML" mathsize="big" display="block">
+--R<mrow><mrow><mo><mo>sin</mo></mo><mo>(</mo><mrow><mn>1</mn></mrow><mo>)</mo></mrow><mo>+</mo><mrow><mrow><mo><mo>cos</mo></mo><mo>(</mo><mrow><mn>1</mn></mrow><mo>)</mo></mrow><mo>&#x02062;</mo><mi>x</mi></mrow><mo>-</mo><mrow><mrow><mfrac><mrow><mrow><mo><mo>sin</mo></mo><mo>(</mo><mrow><mn>1</mn></mrow><mo>)</mo></mrow></mrow><mrow><mn>2</mn></mrow></mfrac></mrow><mo>&#x02062;</mo><mrow><msup><mrow><mi>x</mi></mrow><mrow><mn>2</mn></mrow></msup></mrow></mrow><mo>-</mo><mrow><mrow><mfrac><mrow><mrow><mo><mo>cos</mo></mo><mo>(</mo><mrow><mn>1</mn></mrow><mo>)</mo></mrow></mrow><mrow><mn>6</mn></mrow></mfrac></mrow><mo>&#x02062;</mo><mrow><msup><mrow><mi>x</mi></mrow><mrow><mn>3</mn></mrow></msup></mrow></mrow><mo>+</mo><mrow><mrow><mfrac><mrow><mrow><mo><mo>sin</mo></mo><mo>(</mo><mrow><mn>1</mn></mrow><mo>)</mo></mrow></mrow><mrow><mrow><mn>24</mn></mrow></mrow></mfrac></mrow><mo>&#x02062;</mo><mrow><msup><mrow><mi>x</mi></mrow><mrow><mn>4</mn></mrow></msup></mrow></mro!
 w><mo>+</mo><mrow><mrow><mfrac><mrow><mrow><mo><mo>cos</mo></mo><mo>(</mo><mrow><mn>1</mn></mrow><mo>)</mo></mrow></mrow><mrow><mrow><mn>120</mn></mrow></mrow></mfrac></mrow><mo>&#x02062;</mo><mrow><msup><mrow><mi>x</mi></mrow><mrow><mn>5</mn></mrow></msup></mrow></mrow><mo>-</mo><mrow><mrow><mfrac><mrow><mrow><mo><mo>sin</mo></mo><mo>(</mo><mrow><mn>1</mn></mrow><mo>)</mo></mrow></mrow><mrow><mrow><mn>720</mn></mrow></mrow></mfrac></mrow><mo>&#x02062;</mo><mrow><msup><mrow><mi>x</mi></mrow><mrow><mn>6</mn></mrow></msup></mrow></mrow><mo>-</mo><mrow><mrow><mfrac><mrow><mrow><mo><mo>cos</mo></mo><mo>(</mo><mrow><mn>1</mn></mrow><mo>)</mo></mrow></mrow><mrow><mrow><mn>5040</mn></mrow></mrow></mfrac></mrow><mo>&#x02062;</mo><mrow><msup><mrow><mi>x</mi></mrow><mrow><mn>7</mn></mrow></msup></mrow></mrow><mo>+</mo><mrow><mrow><mfrac><mrow><mrow><mo><mo>sin</mo></mo><mo>(</mo><mrow><mn>1</mn></mrow><mo>)</mo></mrow></mrow><mrow><mrow><mn>40320</mn></mrow></mrow></mfrac></mrow><mo>!
 &#x02062;</mo><mrow><msup><mrow><mi>x</mi></mrow><mrow><mn>8</!
mn></mrow></msup></mrow></mrow><mo>+</mo><mrow><mrow><mfrac><mrow><mrow><mo><mo>cos</mo></mo><mo>(</mo><mrow><mn>1</mn></mrow><mo>)</mo></mrow></mrow><mrow><mrow><mn>362880</mn></mrow></mrow></mfrac></mrow><mo>&#x02062;</mo><mrow><msup><mrow><mi>x</mi></mrow><mrow><mn>9</mn></mrow></msup></mrow></mrow><mo>-</mo><mrow><mrow><mfrac><mrow><mrow><mo><mo>sin</mo></mo><mo>(</mo><mrow><mn>1</mn></mrow><mo>)</mo></mrow></mrow><mrow><mrow><mn>3628800</mn></mrow></mrow></mfrac></mrow><mo>&#x02062;</mo><mrow><msup><mrow><mi>x</mi></mrow><mrow><mrow><mn>10</mn></mrow></mrow></msup></mrow></mrow><mo>+</mo><mrow><mo><mi>O</mi></mo><mo>(</mo><mrow><mrow><msup><mrow><mi>x</mi></mrow><mrow><mrow><mn>11</mn></mrow></mrow></msup></mrow></mrow><mo>)</mo></mrow></mrow>
+--R</math>
+--R
+--R                        Type: UnivariatePuiseuxSeries(Expression Integer,x,0)
+--E 18
+
+)clear all
+
+--S 19 of 21
+series(1/log(y),y=1)
+--R
+--R   (1)
+--R            - 1   1    1            1        2    19        3    3         4
+--R     (y - 1)    + - - -- (y - 1) + -- (y - 1)  - --- (y - 1)  + --- (y - 1)
+--R                  2   12           24            720            160
+--R   + 
+--R        863         5    275         6    33953         7     8183         8
+--R     - ----- (y - 1)  + ----- (y - 1)  - ------- (y - 1)  + ------- (y - 1)
+--R       60480            24192            3628800            1036800
+--R   + 
+--R        3250433         9            10
+--R     - --------- (y - 1)  + O((y - 1)  )
+--R       479001600
+--R<math xmlns="http://www.w3.org/1998/Math/MathML" mathsize="big" display="block">
+--R<mrow><mrow><msup><mrow><mrow><mo>(</mo><mi>y</mi><mo>-</mo><mn>1</mn><mo>)</mo></mrow></mrow><mrow><mrow><mo>(</mo><mo>-</mo><mn>1</mn><mo>)</mo></mrow></mrow></msup></mrow><mo>+</mo><mrow><mfrac><mrow><mn>1</mn></mrow><mrow><mn>2</mn></mrow></mfrac></mrow><mo>-</mo><mrow><mrow><mfrac><mrow><mn>1</mn></mrow><mrow><mrow><mn>12</mn></mrow></mrow></mfrac></mrow><mo>&#x02062;</mo><mrow><mo>(</mo><mi>y</mi><mo>-</mo><mn>1</mn><mo>)</mo></mrow></mrow><mo>+</mo><mrow><mrow><mfrac><mrow><mn>1</mn></mrow><mrow><mrow><mn>24</mn></mrow></mrow></mfrac></mrow><mo>&#x02062;</mo><mrow><msup><mrow><mrow><mo>(</mo><mi>y</mi><mo>-</mo><mn>1</mn><mo>)</mo></mrow></mrow><mrow><mn>2</mn></mrow></msup></mrow></mrow><mo>-</mo><mrow><mrow><mfrac><mrow><mrow><mn>19</mn></mrow></mrow><mrow><mrow><mn>720</mn></mrow></mrow></mfrac></mrow><mo>&#x02062;</mo><mrow><msup><mrow><mrow><mo>(</mo><mi>y</mi><mo>-</mo><mn>1</mn><mo>)</mo></mrow></mrow><mrow><mn>3</mn></mrow></msup></mrow></mrow><mo>+</mo><m!
 row><mrow><mfrac><mrow><mn>3</mn></mrow><mrow><mrow><mn>160</mn></mrow></mrow></mfrac></mrow><mo>&#x02062;</mo><mrow><msup><mrow><mrow><mo>(</mo><mi>y</mi><mo>-</mo><mn>1</mn><mo>)</mo></mrow></mrow><mrow><mn>4</mn></mrow></msup></mrow></mrow><mo>-</mo><mrow><mrow><mfrac><mrow><mrow><mn>863</mn></mrow></mrow><mrow><mrow><mn>60480</mn></mrow></mrow></mfrac></mrow><mo>&#x02062;</mo><mrow><msup><mrow><mrow><mo>(</mo><mi>y</mi><mo>-</mo><mn>1</mn><mo>)</mo></mrow></mrow><mrow><mn>5</mn></mrow></msup></mrow></mrow><mo>+</mo><mrow><mrow><mfrac><mrow><mrow><mn>275</mn></mrow></mrow><mrow><mrow><mn>24192</mn></mrow></mrow></mfrac></mrow><mo>&#x02062;</mo><mrow><msup><mrow><mrow><mo>(</mo><mi>y</mi><mo>-</mo><mn>1</mn><mo>)</mo></mrow></mrow><mrow><mn>6</mn></mrow></msup></mrow></mrow><mo>-</mo><mrow><mrow><mfrac><mrow><mrow><mn>33953</mn></mrow></mrow><mrow><mrow><mn>3628800</mn></mrow></mrow></mfrac></mrow><mo>&#x02062;</mo><mrow><msup><mrow><mrow><mo>(</mo><mi>y</mi><mo>-</mo><mn!
 >1</mn><mo>)</mo></mrow></mrow><mrow><mn>7</mn></mrow></msup><!
/mrow></mrow><mo>+</mo><mrow><mrow><mfrac><mrow><mrow><mn>8183</mn></mrow></mrow><mrow><mrow><mn>1036800</mn></mrow></mrow></mfrac></mrow><mo>&#x02062;</mo><mrow><msup><mrow><mrow><mo>(</mo><mi>y</mi><mo>-</mo><mn>1</mn><mo>)</mo></mrow></mrow><mrow><mn>8</mn></mrow></msup></mrow></mrow><mo>-</mo><mrow><mrow><mfrac><mrow><mrow><mn>3250433</mn></mrow></mrow><mrow><mrow><mn>479001600</mn></mrow></mrow></mfrac></mrow><mo>&#x02062;</mo><mrow><msup><mrow><mrow><mo>(</mo><mi>y</mi><mo>-</mo><mn>1</mn><mo>)</mo></mrow></mrow><mrow><mn>9</mn></mrow></msup></mrow></mrow><mo>+</mo><mrow><mo><mi>O</mi></mo><mo>(</mo><mrow><mrow><msup><mrow><mrow><mo>(</mo><mi>y</mi><mo>-</mo><mn>1</mn><mo>)</mo></mrow></mrow><mrow><mrow><mn>10</mn></mrow></mrow></msup></mrow></mrow><mo>)</mo></mrow></mrow>
+--R</math>
+--R
+--R                        Type: UnivariatePuiseuxSeries(Expression Integer,y,1)
+--E 19
+
+)clear all
+
+--S 20 of 21
+y:UTS(FLOAT,'z,0):=exp(z)
+--R
+--R   (1)
+--R                    2                            3
+--R     1.0 + z + 0.5 z  + 0.1666666666 6666666667 z
+--R   + 
+--R                                4                               5
+--R     0.0416666666 6666666666 7 z  + 0.0083333333 3333333333 34 z
+--R   + 
+--R                                 6                               7
+--R     0.0013888888 8888888888 89 z  + 0.0001984126 9841269841 27 z
+--R   + 
+--R                                   8                                  9
+--R     0.0000248015 8730158730 1587 z  + 0.0000027557 3192239858 90653 z
+--R   + 
+--R                                   10      11
+--R     0.2755731922 3985890653 E -6 z   + O(z  )
+--R<math xmlns="http://www.w3.org/1998/Math/MathML" mathsize="big" display="block">
+--R<mrow><mn>1.0</mn><mo>+</mo><mi>z</mi><mo>+</mo><mrow><mn>0.5</mn><mo>&#x02062;</mo><mrow><msup><mrow><mi>z</mi></mrow><mrow><mn>2</mn></mrow></msup></mrow></mrow><mo>+</mo><mrow><mn>0.1666666666 6666666667</mn><mo>&#x02062;</mo><mrow><msup><mrow><mi>z</mi></mrow><mrow><mn>3</mn></mrow></msup></mrow></mrow><mo>+</mo><mrow><mn>0.0416666666 6666666666 7</mn><mo>&#x02062;</mo><mrow><msup><mrow><mi>z</mi></mrow><mrow><mn>4</mn></mrow></msup></mrow></mrow><mo>+</mo><mrow><mn>0.0083333333 3333333333 34</mn><mo>&#x02062;</mo><mrow><msup><mrow><mi>z</mi></mrow><mrow><mn>5</mn></mrow></msup></mrow></mrow><mo>+</mo><mrow><mn>0.0013888888 8888888888 89</mn><mo>&#x02062;</mo><mrow><msup><mrow><mi>z</mi></mrow><mrow><mn>6</mn></mrow></msup></mrow></mrow><mo>+</mo><mrow><mn>0.0001984126 9841269841 27</mn><mo>&#x02062;</mo><mrow><msup><mrow><mi>z</mi></mrow><mrow><mn>7</mn></mrow></msup></mrow></mrow><mo>+</mo><mrow><mn>0.0000248015 8730158730 1587</mn><mo>&#x02062;</mo><mrow><msup><mr!
 ow><mi>z</mi></mrow><mrow><mn>8</mn></mrow></msup></mrow></mrow><mo>+</mo><mrow><mn>0.0000027557 3192239858 90653</mn><mo>&#x02062;</mo><mrow><msup><mrow><mi>z</mi></mrow><mrow><mn>9</mn></mrow></msup></mrow></mrow><mo>+</mo><mrow><mn>0.2755731922 3985890653 E -6</mn><mo>&#x02062;</mo><mrow><msup><mrow><mi>z</mi></mrow><mrow><mrow><mn>10</mn></mrow></mrow></msup></mrow></mrow><mo>+</mo><mrow><mo><mi>O</mi></mo><mo>(</mo><mrow><mrow><msup><mrow><mi>z</mi></mrow><mrow><mrow><mn>11</mn></mrow></mrow></msup></mrow></mrow><mo>)</mo></mrow></mrow>
+--R</math>
+--R
+--R                                    Type: UnivariateTaylorSeries(Float,z,0.0)
+--E 20
+
+--S 21 of 21
+c:=continuedFraction(314159/100000)
+--R
+--R              1 |     1  |     1 |     1  |     1 |     1 |     1 |
+--R   (2)  3 + +---+ + +----+ + +---+ + +----+ + +---+ + +---+ + +---+
+--R            | 7     | 15     | 1     | 25     | 1     | 7     | 4
+--R<math xmlns="http://www.w3.org/1998/Math/MathML" mathsize="big" display="block">
+--R<mrow><mn>3</mn><mo>+</mo><mfrac><mn>1</mn><mrow><mn><mn>7</mn></mn><mo>+</mo><mfrac><mn>1</mn><mrow><mn><mrow><mn>15</mn></mrow></mn><mo>+</mo><mfrac><mn>1</mn><mrow><mn><mn>1</mn></mn><mo>+</mo><mfrac><mn>1</mn><mrow><mn><mrow><mn>25</mn></mrow></mn><mo>+</mo><mfrac><mn>1</mn><mrow><mn><mn>1</mn></mn><mo>+</mo><mfrac><mn>1</mn><mrow><mn><mn>7</mn></mn><mo>+</mo><mfrac><mn>1</mn><mn>4</mn></mfrac></mrow></mfrac></mrow></mfrac></mrow></mfrac></mrow></mfrac></mrow></mfrac></mrow></mfrac></mrow>
+--R</math>
+--R
+--R                                              Type: ContinuedFraction Integer
+--E 21
+)spool
+)lisp (bye)
+ 
+@
+\eject
+\begin{thebibliography}{99}
+\bibitem{1} nothing
+\end{thebibliography}
+\end{document}
diff --git a/src/interp/i-output.boot.pamphlet b/src/interp/i-output.boot.pamphlet
index 10cd956..a1a84ab 100644
--- a/src/interp/i-output.boot.pamphlet
+++ b/src/interp/i-output.boot.pamphlet
@@ -1380,12 +1380,24 @@ texFormat1 expr ==
   FORCE_-OUTPUT $texOutputStream
   NIL
 
+mathmlFormat expr ==
+  mml := '(MathMLFormat)
+  mmlrep := '(String)
+  formatFn := getFunctionFromDomain("coerce",mml,[$OutputForm])
+  displayFn := getFunctionFromDomain("display",mml,[mmlrep])
+  SPADCALL(SPADCALL(expr,formatFn),displayFn)
+  TERPRI $mathmlOutputStream
+  FORCE_-OUTPUT $mathmlOutputStream
+  NIL
+
+
 output(expr,domain) ==
   if isWrapped expr then expr := unwrap expr
   isMapExpr expr =>
     if $formulaFormat then formulaFormat expr
     if $texFormat     then texFormat expr
     if $algebraFormat then mathprintWithNumber expr
+    if $mathmlFormat  then mathmlFormat expr
   categoryForm? domain or domain in '((Mode) (Domain) (SubDomain (Domain))) =>
     if $algebraFormat then
       mathprintWithNumber outputDomainConstructor expr
@@ -1401,6 +1413,7 @@ output(expr,domain) ==
     if $algebraFormat then
       mathprintWithNumber x
     if $texFormat     then texFormat x
+    if $mathmlFormat  then mathmlFormat x
   (FUNCTIONP(opOf domain)) and
     (printfun := compiledLookup("<<",'(TextWriter TextWriter $), evalDomain domain))
        and (textwrit := compiledLookup("print", '($), TextWriter())) =>
diff --git a/src/interp/setq.lisp.pamphlet b/src/interp/setq.lisp.pamphlet
index 6f23778..25155d8 100644
--- a/src/interp/setq.lisp.pamphlet
+++ b/src/interp/setq.lisp.pamphlet
@@ -777,9 +777,10 @@
 "Michel Petitot         Didier Pinchon         Ayal Pinkus"
 "Jose Alfredo Portes"
 "Claude Quitte"
-"Norman Ramsey          Michael Richardson     Renaud Rioboo"
-"Jean Rivlin            Nicolas Robidoux       Simon Robinson"
-"Raymond Rogers         Michael Rothstein      Martin Rubey"
+"Arthur C. Ralfs        Norman Ramsey          Michael Richardson"
+"Renaud Rioboo          Jean Rivlin            Nicolas Robidoux"
+"Simon Robinson         Raymond Rogers         Michael Rothstein"
+"Martin Rubey"
 "Philip Santas          Alfred Scheerhorn      William Schelter"
 "Gerhard Schneider      Martin Schoenert       Marshall Schor"
 "Frithjof Schulze       Fritz Schwarz          Nick Simicich"
diff --git a/src/interp/setvars.boot.pamphlet b/src/interp/setvars.boot.pamphlet
index 864ced0..b052e85 100644
--- a/src/interp/setvars.boot.pamphlet
+++ b/src/interp/setvars.boot.pamphlet
@@ -1382,6 +1382,125 @@ describeSetOutputFortran() ==
   '"The current setting is: ",'%b,setOutputFortran "%display%",'%d)
 
 @
+\section{output mathml}
+See the section mathml in setvart.boot.pamphlet\cite{1}
+\begin{verbatim}
+----------------------- The mathml Option ------------------------
+
+ Description: create output in MathML style
+
+ )set output mathml is used to tell AXIOM to turn MathML-style output
+printing on and off, and where to place the output.  By default,
+the destination for the output is the screen but printing is 
+turned off.
+
+Syntax:   )set output mathml <arg>
+    where arg can be one of
+  on          turn MathML printing on
+  off         turn MathML printing off (default state)
+  console     send MathML output to screen (default state)
+  fp<.fe>     send MathML output to file with file prefix fp
+              and file extension .fe. If not given, 
+              .fe defaults to .stex.
+
+If you wish to send the output to a file, you must issue 
+this command twice: once with on and once with the file name. 
+For example, to send MathML output to the file polymer.stex, 
+issue the two commands
+
+  )set output mathml on
+  )set output mathml polymer
+
+The output is placed in the directory from which you invoked 
+AXIOM or the one you set with the )cd system command.
+The current setting is:  Off:CONSOLE 
+\end{verbatim}
+<<outputmathmlCode>>=
+<<setOutputMathml>>
+<<describeSetOutputMathml>>
+@
+\subsection{setOutputMathml}
+<<setOutputMathml>>=
+setOutputMathml arg ==
+  arg = "%initialize%" =>
+    $mathmlOutputStream :=
+      DEFIOSTREAM('((MODE . OUTPUT) (DEVICE . CONSOLE)),255,0)
+    $mathmlOutputFile := '"CONSOLE"
+    $mathmlFormat := NIL
+
+  arg = "%display%" =>
+    if $mathmlFormat then label := '"On:" else label := '"Off:"
+    STRCONC(label,$mathmlOutputFile)
+
+  (null arg) or (arg = "%describe%") or (first arg = '_?) =>
+    describeSetOutputMathml()
+
+  -- try to figure out what the argument is
+
+  if arg is [fn] and
+    fn in '(Y N YE YES NO O ON OF OFF CONSOLE y n ye yes no o on of off console)
+      then 'ok
+      else arg := [fn,'smml]
+
+  arg is [fn] =>
+    UPCASE(fn) in '(Y N YE O OF) =>
+      sayKeyedMsg("S2IV0002",'(MathML mathml))
+    UPCASE(fn) in '(NO OFF)  => $mathmlFormat := NIL
+    UPCASE(fn) in '(YES ON) => $mathmlFormat := true
+    UPCASE(fn) = 'CONSOLE =>
+      SHUT $mathmlOutputStream
+      $mathmlOutputStream :=
+        DEFIOSTREAM('((MODE . OUTPUT) (DEVICE . CONSOLE)),255,0)
+      $mathmlOutputFile := '"CONSOLE"
+
+  (arg is [fn,ft]) or (arg is [fn,ft,fm]) => -- aha, a file
+    if (ptype := pathnameType fn) then
+      fn := STRCONC(pathnameDirectory fn,pathnameName fn)
+      ft := ptype
+    if null fm then fm := 'A
+    filename := $FILEP(fn,ft,fm)
+    null filename =>
+      sayKeyedMsg("S2IV0003",[fn,ft,fm])
+    (testStream := MAKE_-OUTSTREAM(filename,255,0)) =>
+      SHUT $mathmlOutputStream
+      $mathmlOutputStream := testStream
+      $mathmlOutputFile := object2String filename
+      sayKeyedMsg("S2IV0004",['"MathML",$mathmlOutputFile])
+    sayKeyedMsg("S2IV0003",[fn,ft,fm])
+
+  sayKeyedMsg("S2IV0005",NIL)
+  describeSetOutputMathml()
+
+@
+\subsection{describeSetOutputMathml}
+<<describeSetOutputMathml>>=
+describeSetOutputMathml() ==
+  sayBrightly LIST ('%b,'")set output mathml",'%d,_
+   '"is used to tell AXIOM to turn MathML-style output",'%l,_
+   '"printing on and off, and where to place the output.  By default, the",'%l,_
+   '"destination for the output is the screen but printing is turned off.",'%l,_
+   '%l,_
+   '"Syntax:   )set output mathml <arg>",'%l,_
+  '"    where arg can be one of",'%l,_
+  '"  on          turn MathML printing on",'%l,_
+  '"  off         turn MathML printing off (default state)",'%l,_
+  '"  console     send MathML output to screen (default state)",'%l,_
+  '"  fp<.fe>     send MathML output to file with file prefix fp and file",'%l,_
+  '"              extension .fe. If not given, .fe defaults to .stex.",'%l,
+  '%l,_
+  '"If you wish to send the output to a file, you must issue this command",'%l,_
+  '"twice: once with",'%b,'"on",'%d,'"and once with the file name. For example, to send",'%l,_
+  '"MathML output to the file",'%b,'"polymer.smml,",'%d,'"issue the two commands",'%l,_
+  '%l,_
+  '"  )set output mathml on",'%l,_
+  '"  )set output mathml polymer",'%l,_
+  '%l,_
+  '"The output is placed in the directory from which you invoked AXIOM or",'%l,_
+  '"the one you set with the )cd system command.",'%l,_
+  '"The current setting is: ",'%b,setOutputMathml "%display%",'%d)
+
+
+@
 \section{output openmath}
 See the subsection output openmath in setvart.boot.pamphlet\cite{1}
 \begin{verbatim}
@@ -1821,6 +1940,7 @@ describeSetStreamsCalculate() == sayKeyedMsg("S2IV0001",[$streamCount])
 <<outputalgebraCode>>
 <<outputcharactersCode>>
 <<outputfortranCode>>
+<<outputmathmlCode>>
 <<outputopenmathCode>>
 <<outputscriptCode>>
 <<outputtexCode>>
diff --git a/src/interp/setvart.boot.pamphlet b/src/interp/setvart.boot.pamphlet
index 92e8825..bfa2f14 100644
--- a/src/interp/setvart.boot.pamphlet
+++ b/src/interp/setvart.boot.pamphlet
@@ -1673,6 +1673,7 @@ length      line length of output displays           77
 scripts     show subscripts,... linearly             off 
 showeditor  view output of )show in editor           off 
 tex         create output in TeX style               Off:CONSOLE 
+mathml	    create output in MathML style	     Off:CONSOLE 
 \end{verbatim}
 Since the output option has a bunch of sub-options each suboption 
 is defined within the output structure.
@@ -1694,6 +1695,7 @@ is defined within the output structure.
 <<outputscripts>>
 <<outputshoweditor>>
 <<outputtex>>
+<<outputmathml>>
  ))
 @
 \subsection{abbreviate}
@@ -1901,6 +1903,58 @@ The current setting is:  Off:CONSOLE
       (10 245)
       77)
 @
+\subsection{mathml}
+\begin{verbatim}
+----------------------- The mathml Option ------------------------
+
+ Description: create output in MathML style
+
+ )set output mathml is used to tell AXIOM to turn MathML-style output
+printing on and off, and where to place the output.  By default,
+the destination for the output is the screen but printing is 
+turned off.
+
+Syntax:   )set output mathml <arg>
+    where arg can be one of
+  on          turn MathML printing on
+  off         turn MathML printing off (default state)
+  console     send MathML output to screen (default state)
+  fp<.fe>     send MathML output to file with file prefix fp
+              and file extension .fe. If not given, 
+              .fe defaults to .smml.
+
+If you wish to send the output to a file, you must issue 
+this command twice: once with on and once with the file name. 
+For example, to send MathML output to the file polymer.smml, 
+issue the two commands
+
+  )set output mathml on
+  )set output mathml polymer
+
+The output is placed in the directory from which you invoked 
+AXIOM or the one you set with the )cd system command.
+The current setting is:  Off:CONSOLE 
+\end{verbatim}
+<<outputmathml>>=
+     (mathml
+      "create output in MathML style"
+      interpreter
+      FUNCTION
+      setOutputMathml
+      (("create output in MathML format"
+        LITERALS
+        $mathmlFormat
+        (off on)
+        off)
+       (break $mathmlFormat)
+       ("where MathML output goes (enter {\em console} or a pathname)"
+        FILENAME
+        $mathmlOutputFile
+        chkOutputFileName
+        "console"))
+      NIL)
+
+@
 \subsection{openmath}
 \begin{verbatim}
 ----------------------- The openmath Option ------------------------

\start
Date: 22 Sep 2007 09:11:16 +0200
From: Martin Rubey
To: Tim Daly
Subject: re: hyperdoc on windows

Tim Daly writes:

> >I think it will be good to add Martin's code to Arthur's work to browse
> >the databases:
> >
> >http://wiki.axiom-developer.org/SandBoxHyperDocReplacement
> 
> I already demonstrated getting database accesses working here:
> 
>   http://daly.axiom-developer.org/asq.php

Please note that the point of my code was something else in several aspects:

* the database lookup is dynamic. I.e., if you compile a new constructor, it
  will find the docs.

* it converts LaTeX to Html, and caches the result.  Thus, it is not necessary
  to "convert" anything to html by hand, and moreover, it also works (nearly)
  with Ralf's ALLPROSE.

But I can well imagine that the different branches (forks) of axiom go in
different directions here.  This will make life for algebra contributors much
more enjoyable, I guess.  (irony)

\start
Date: Sat, 22 Sep 2007 09:14:38 -0700
From: Arthur Ralfs
To: list
Subject: axserver patch

This is a multi-part message in MIME format.
--------------040808060702040001070803

This is a small patch to make the documentation work properly
in axserver.pamphlet.

Arthur

--------------040808060702040001070803
 name="axserver.patch"
 filename="axserver.patch"

--- axserver.pamphlet	2007-09-22 09:06:19.000000000 -0700
+++ axserver.pamphlet.new	2007-09-22 09:10:20.000000000 -0700
@@ -11,14 +11,13 @@
 \eject
 \tableofcontents
 \eject
-\section{Preface}
 
 \section{Lisp preliminaries}
 
 Extract the lisp to a file named, say, http.lisp with the
 command
 
-notangle -RServer\ Lisp axserver.pamphlet > http.lisp
+notangle -RServer$\backslash$ Lisp axserver.pamphlet $>$ http.lisp
 
 <<Server Lisp>>=
 ;; file: http.lisp
@@ -109,7 +108,7 @@
 
 Extract the AxiomServer package with the command
 
-notangle axserver.pamphlet > axserver.spad
+notangle axserver.pamphlet $>$ axserver.spad
 
 <<package AXSERV AxiomServer>>=
 
@@ -255,6 +254,8 @@
 	WriteLine(str)$Lisp
 	strlist := split(str,char "&")
 	str := ""
+	-- oops, if & is the last character in the string this method
+	-- will eliminate it.  Need to redo this.
 	for s in strlist repeat
 	    str := concat [str,s,"&amp;"]
 	strlen:Integer := #str
@@ -332,7 +333,7 @@
 
 Extract the Axiom xml interface page with the commmand
 
-notangle -RAxiom\ xml axserver.pamphlet > axiom.xml
+notangle -RAxiom$\backslash$ xml axserver.pamphlet $>$ axiom.xml
 
 or in fact make the file name whatever you like instead of
 "axiom.xml".
@@ -387,7 +388,7 @@
 
 )compile axserver
 
-axServer(8085,mutliServ$AXSERV)
+axServer(8085,multiServ\$AXSERV)
 
 
 Of course you need a mathml enabled build of axiom to do this.

--------------040808060702040001070803--

\start
Date: Sat, 22 Sep 2007 12:39:35 -0400
From: Tim Daly
To: Arthur Ralfs
Subject: Re: axserver patch

Thanks. Already found and made them.
I used double quotes rather than "\ " to delimit the -R arguments
but the effect is the same.

The most significant problem I'm having is that my browser has
suddenly decided to start syntax checking my html files. But it
only does that when I go thru your interface. Browsing the file
directly works fine. Any suggestions about what causes that?

\start
Date: Sat, 22 Sep 2007 09:56:45 -0700
From: Arthur Ralfs
To: Alfredo Portes
Subject: Re: axserver patch

Alfredo Portes wrote:
> Hi Arthur,
>
> Do you think is possible to put your latest axserver.pamphlet
> as a pamphlet file in the wiki? If you send me the latest version,
> I can do this.
>
> Regards,
>
> Alfredo
>
>   
Alfredo,

The wiki won't let me upload files so I've stopped using it for the time
being.   However I've attached the latest version if you want to try.

Arthur

--------------000102000309070603050800
 name="axserver.pamphlet"
 filename="axserver.pamphlet"

\documentclass{article}
\usepackage{axiom}
\begin{document}
\title{\$SPAD/src/algebra axserver.spad}
\author{Arthur C. Ralfs}
\maketitle
\begin{abstract}
The AxiomServer package is designed to provide a web interface
to axiom.
\end{abstract}
\eject
\tableofcontents
\eject

\section{Lisp preliminaries}

Extract the lisp to a file named, say, http.lisp with the
command

notangle -RServer$\backslash$ Lisp axserver.pamphlet $>$ http.lisp

<<Server Lisp>>=
;; file: http.lisp

(defvar |StandardOutput| *standard-output*)

(defvar  |NewLine| '#\NewLine)

;; some regexp stuff

(defun |StringMatch| (s1 s2)
  (si::string-match s1 s2)
  )



(defun |ListMatches| (&rest args)
  (si::list-matches args)
  )

(defun |MatchBeginning| (i)
  (si::match-beginning i)
  )

(defun |MatchEnd| (i)
  (si::match-end i)
  )

;; the socket stuff


(defun |SiSock| (p spadfn)
;;  (format t "SiSocket-1")
  (si::socket p :server
	      (function
	       (lambda (w) (SPADCALL w spadfn) )
	       )
	      :daemon nil)
  )

(defun |SiListen| (s) 
;;  (format t "SiListen-1")
  (si::listen s)
  )
(defun |SiAccept| (s) (si::accept s))
(defun |SiCopyStream| (q s) (si::copy-stream q s))

;; Camm Maguire's modified demo server

(defun foo (s)
  (setq get "" pathvar "")
  (do ((c (read-char s) (read-char s)))
      ((eq c '#\Space))
      (setq get (concat get (string c)))
      )
  (write-line "get: ")
  (write-line get)
  (do ((c (read-char s) (read-char s nil 'the-end)))
      ((eq c '#\Space))
      (setq pathvar (concat pathvar (string c)))
      )
  (write-line "pathvar: ")
  (write-line pathvar)
  (when pathvar
    (if (pathname-name (pathname pathvar))
	(with-open-file (q pathvar) (si::copy-stream q s))
      (dolist (l (directory pathvar)) (format s "~a~%" (namestring l)))
      )
    )
  (close s)
  )
 

(defun bar (p fn) 
  (let ((s (si::socket p :server fn))) 
        (tagbody l 
                (when (si::listen s) 
                        (let ((w (si::accept s))) 
                                (foo w))) 
                (sleep 3) 
                (go l))))

;;(bar 8080 #'foo)

@

\section{Axiom Server}

Extract the AxiomServer package with the command

notangle axserver.pamphlet $>$ axserver.spad

<<package AXSERV AxiomServer>>=

)abbrev package AXSERV AxiomServer
AxiomServer: public == private where

  public == with

    axServer: (Integer, SExpression->Void) -> Void
    multiServ: SExpression -> Void
    fileserver: SExpression -> Void
    axget: SExpression -> Void
    axpost: SExpression -> Void


  private == add

    getFile: (SExpression,String) -> Void
    getCommand: (SExpression,String) -> Void
    lastStep: () -> String
    lastType: () -> String
    formatMessages: String -> String
    formatMessages1: String -> String


    axServer(port:Integer,serverfunc:SExpression->Void):Void ==
      WriteLine("socketServer")$Lisp
      s := SiSock(port,serverfunc)$Lisp
      -- To listen for just one connection and then close the socket
      -- uncomment i := 0.
      i:Integer := 1
      while (i > 0) repeat
        if not null?(SiListen(s)$Lisp)$SExpression then
          w := SiAccept(s)$Lisp
          serverfunc(w)
--	  i := 0

    multiServ(s:SExpression):Void ==
          WriteLine("multiServ")$Lisp
	  headers:String := ""
	  char:String
	  -- read in the http headers
          while (char := STRING(READ_-CHAR_-NO_-HANG(s,NIL$Lisp,'EOF)$Lisp)$Lisp) ^= "EOF" repeat
              headers := concat [headers,char]
	  sayTeX$Lisp headers
          StringMatch("([^ ]*)", headers)$Lisp
          u:UniversalSegment(Integer)
          u := segment(MatchBeginning(1)$Lisp+1,MatchEnd(1)$Lisp)$UniversalSegment(Integer)
          reqtype:String := headers.u
          sayTeX$Lisp  concat ["request type: ",reqtype]
          if  reqtype = "GET" then
              StringMatch("GET ([^ ]*)",headers)$Lisp
              u:UniversalSegment(Integer)
              u := segment(MatchBeginning(1)$Lisp+1,MatchEnd(1)$Lisp)$UniversalSegment(Integer)
              getFile(s,headers.u)
          if reqtype = "POST" then
              StringMatch("command=(.*)$",headers)$Lisp
              u:UniversalSegment(Integer)
              u := segment(MatchBeginning(1)$Lisp+1,MatchEnd(1)$Lisp)$UniversalSegment(Integer)
              getCommand(s,headers.u)

    getFile(s:SExpression,pathvar:String):Void ==
        WriteLine("getFile")$Lisp
        if not null? PATHNAME_-NAME(PATHNAME(pathvar)$Lisp)$Lisp then
        -- display contents of file
            q:=OPEN(pathvar)$Lisp
        else
            q:=MAKE_-STRING_-INPUT_-STREAM("Problem with file path")$Lisp
        file:String := ""
        while (char := STRING(READ_-CHAR_-NO_-HANG(q,NIL$Lisp,'EOF)$Lisp)$Lisp) ^= "EOF" repeat
            file := concat [file,char]
        CLOSE(q)$Lisp
        file := concat ["Content-Length: ",string(#file),STRING(NewLine$Lisp)$Lisp,STRING(NewLine$Lisp)$Lisp,file]
	file := concat ["Connection: close",STRING(NewLine$Lisp)$Lisp,file]
	file := concat ["Content-Type: application/xhtml+xml",STRING(NewLine$Lisp)$Lisp,file]
	file := concat ["HTTP/1.1 200 OK",STRING(NewLine$Lisp)$Lisp,file]
        f:=MAKE_-STRING_-INPUT_-STREAM(file)$Lisp
        SiCopyStream(f,s)$Lisp
        CLOSE(f)$Lisp
	CLOSE(s)$Lisp

    getCommand(s:SExpression,command:String):Void ==
        WriteLine$Lisp concat ["getCommand: ",command]
	SETQ(tmpmathml$Lisp, MAKE_-STRING_-OUTPUT_-STREAM()$Lisp)$Lisp
	SETQ(tmpalgebra$Lisp, MAKE_-STRING_-OUTPUT_-STREAM()$Lisp)$Lisp
	SETQ(savemathml$Lisp, _$texOutputStream$Lisp)$Lisp
	SETQ(savealgebra$Lisp, _$algebraOutputStream$Lisp)$Lisp
	SETQ(_$texOutputStream$Lisp,tmpmathml$Lisp)$Lisp
	SETQ(_$algebraOutputStream$Lisp,tmpalgebra$Lisp)$Lisp
--	parseAndInterpret$Lisp command
--	parseAndEvalStr$Lisp command
-- The previous two commands don't exit nicely when a syntactically incorrect command is
-- given to them.  They somehow need to be wrapped in CATCH statements but I haven't 
-- figured out how to do this.  parseAndEvalToStringEqNum  uses the following CATCH
-- statements to call parseAndEvalStr but when I try these they don't work.  I get a
-- "NIL is not a valid identifier to use in AXIOM" message. Using parseAndEvalToStringEqNum
-- works and doesn't crash on a syntax error.
--        v := CATCH('SPAD__READER, CATCH('top__level, parseAndEvalStr$Lisp command)$Lisp)$Lisp
--        v = 'restart => ['"error"]
        ans := string parseAndEvalToStringEqNum$Lisp command
	SETQ(resultmathml$Lisp,GET_-OUTPUT_-STREAM_-STRING(_$texOutputStream$Lisp)$Lisp)$Lisp
	SETQ(resultalgebra$Lisp,GET_-OUTPUT_-STREAM_-STRING(_$algebraOutputStream$Lisp)$Lisp)$Lisp
	SETQ(_$texOutputStream$Lisp,savemathml$Lisp)$Lisp
	SETQ(_$algebraOutputStream$Lisp,savealgebra$Lisp)$Lisp
	CLOSE(tmpmathml$Lisp)$Lisp
	CLOSE(tmpalgebra$Lisp)$Lisp
	-- Since strings returned from axiom are going to be displayed in html I
	-- should really check for the characters &,<,> and replace them with
	-- &amp;,&lt;,&gt;.  At present I only check for ampersands in formatMessages.
	mathml:String := string(resultmathml$Lisp)
	algebra:String := string(resultalgebra$Lisp)
	algebra := formatMessages(algebra)
	-- At this point mathml contains the mathml for the output but does not
	-- include step number or type information.  We should also save the command.
        -- I get the type and step number from the $internalHistoryTable
	axans:String := concat ["<div><div class=_"command_">Input: ",command,"</div><div class=_"stepnum_">Step number: ",lastStep(),"</div><div class=_"algebra_">",algebra,"</div><div class=_"mathml_">",mathml,"</div><div class=_"type_">Type: ",lastType(),"</div></div>"]
	WriteLine$Lisp concat ["mathml answer: ",mathml]
        WriteLine$Lisp concat ["algebra answer: ",algebra]
        q:=MAKE_-STRING_-INPUT_-STREAM(axans)$Lisp
        SiCopyStream(q,s)$Lisp
        CLOSE(q)$Lisp
	CLOSE(s)$Lisp


    lastType():String ==
--  The last history entry is the first item in the $internalHistoryTable list so 
--  car(_$internalHistoryTable$Lisp) selects it.  Here's an example:
--  (3 (x+y)**3 (% (value (Polynomial (Integer)) WRAPPED 1 y (3 0 . 1) (2 1 x (1 0 . 3)) (1 1 x (2 0 . 3)) (0 1 x (3 0 . 1)))))
--  This corresponds to the input "(x+y)**3" being issued as the third command after
--  starting axiom.  The following line selects the type information.
        string car(cdr(car(cdr(car(cdr(cdr(car(_$internalHistoryTable$Lisp)$Lisp)$Lisp)$Lisp)$Lisp)$Lisp)$Lisp)$Lisp)$Lisp


    lastStep():String ==
        string car(car(_$internalHistoryTable$Lisp)$Lisp)$Lisp
	

    formatMessages(str:String):String ==
        WriteLine("formatMessages")$Lisp
	-- I need to replace any ampersands with &amp; and may also need to
	-- replace < and > with &lt; and &gt;
	strlist:List String
	WriteLine(str)$Lisp
	strlist := split(str,char "&")
	str := ""
	-- oops, if & is the last character in the string this method
	-- will eliminate it.  Need to redo this.
	for s in strlist repeat
	    str := concat [str,s,"&amp;"]
	strlen:Integer := #str
	str := str.(1..(#str - 5))
	WriteLine(str)$Lisp
	-- Here I split the string into lines and put each line in a "div".
	strlist := split(str, char string NewlineChar$Lisp)
	str := ""
	WriteLine("formatMessages1")$Lisp
	WriteLine(concat strlist)$Lisp
	for s in strlist repeat
	    WriteLine(s)$Lisp
	    str := concat [str,"<div>",s,"</div>"]
        str
@
        
\section{Axiom javascript}

The javascript is currently included in a "script" element in the
Axiom xml page.

<<axiom javascript>>=

function init() {
}


function makeRequest() {
//    The following instantiation of the XMLHttpRequest object is for
//    browsers other than IE.  IE requires something different.
    http_request = new XMLHttpRequest();	 
    var command = document.getElementById('comm').value;
    http_request.open('POST', '127.0.0.1:8085', true);
    http_request.onreadystatechange = handleResponse;
//    http_request.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded');
//    http_request.send("command="+encodeURIComponent(command));
    http_request.setRequestHeader('Content-Type', 'text/plain');
    http_request.send("command="+command);
}

function handleResponse() {
    if (http_request.readyState == 4) {
	if (http_request.status == 200) {
// stick response in div=mathBox
	    var mathString = http_request.responseText;
            var mathRange = document.createRange();
	    var mathBox = document.createElementNS('http://www.w3.org/1999/xhtml','div');
            mathRange.selectNodeContents(mathBox);
            var mathFragment = mathRange.createContextualFragment(mathString);
            mathBox.appendChild(mathFragment);
// set id on mathBox
//	    var stepNum = mathBox.firstChild.firstChild.data;
//	    mathBox.setAttribute('id', 'step'+stepNum);
//	    mathBox.setAttribute('class', 'mathbox');
// remove old mathbox
            document.getElementById('mathAns').removeChild(document.getElementById('mathAns').firstChild)

// insert everything into the document

	    document.getElementById('mathAns').appendChild(mathBox);

// delete linenum box
//            mathBox.removeChild(mathBox.firstChild);

	} else
	{
	    alert('There was a problem with the request.'+ http_request.statusText);
	}
    }
}

@

\section{Axiom xml}

Extract the Axiom xml interface page with the commmand

notangle -RAxiom$\backslash$ xml axserver.pamphlet $>$ axiom.xml

or in fact make the file name whatever you like instead of
"axiom.xml".

<<Axiom xml>>=
<?xml version="1.0" encoding="UTF-8"?>
<!--
<<license-xml>>
-->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1 plus MathML 2.0//EN" "http://www.w3.org/Math/DTD/mathml2/xhtml-math11-f.dtd" [
<!ENTITY mathml "http://www.w3.org/1998/Math/MathML">
<!ENTITY InvisibleTimes " ">
]>

<html xmlns="http://www.w3.org/1999/xhtml" xmlns:xlink="http://www.w3.org/1999/xlink">

<head>
<title>Axiom Interface</title>
<script type="text/javascript">
<<axiom javascript>>
</script>

</head>

<body id="body">

  <form id="commreq" action="javascript:makeRequest();">
    <p>
      Enter command: <input type="text" id="comm" name="command" size="80"/>
      <input type="submit" value="submit command"/>
    </p>
  </form>

<div id="mathAns"><div></div></div>



</body>

</html>

@

\section{Running Axiom Server}

Put the extracted files in a suitable directory, like the one you
started Axiom from, and issue the commands:

)set output mathml on

)lisp (load "http.lisp")

)compile axserver

axServer(8085,multiServ\$AXSERV)


Of course you need a mathml enabled build of axiom to do this.
You may also want to issue the command

)set messages autoload off

before starting the Axiom server.


\section{License}
<<license>>=
--Copyright (c) 2007 Arthur C. Ralfs
--All rights reserved.
--
--Redistribution and use in source and binary forms, with or without
--modification, are permitted provided that the following conditions are
--met:
--
--    - Redistributions of source code must retain the above copyright
--      notice, this list of conditions and the following disclaimer.
--
--    - Redistributions in binary form must reproduce the above copyright
--      notice, this list of conditions and the following disclaimer in
--      the documentation and/or other materials provided with the
--      distribution.
--
--    - Neither the name of Arthur C. Ralfs nor the
--      names of its contributors may be used to endorse or promote products
--      derived from this software without specific prior written permission.
--
--THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
--IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
--TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
--PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER
--OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
--EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
--PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
--PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
--LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
--NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
--SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.


@

<<license-xml>>=
  Copyright (c) 2007 Arthur C. Ralfs
  All rights reserved.
  
  Redistribution and use in source and binary forms, with or without
  modification, are permitted provided that the following conditions are
  met:
  
      - Redistributions of source code must retain the above copyright
        notice, this list of conditions and the following disclaimer.
  
      - Redistributions in binary form must reproduce the above copyright
        notice, this list of conditions and the following disclaimer in
        the documentation and/or other materials provided with the
        distribution.
  
      - Neither the name of Arthur C. Ralfs nor the
        names of its contributors may be used to endorse or promote products
        derived from this software without specific prior written permission.
  
  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
  IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
  TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
  PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER
  OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
  EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
  PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
  LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
  SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.


@

<<*>>=
<<license>>
<<package AXSERV AxiomServer>>

@

\eject
\begin{thebibliography}{99}
\bibitem{1} nothing
\end{thebibliography}
\end{document}
--------------000102000309070603050800--

\start
Date: Sat, 22 Sep 2007 10:06:18 -0700
From: Arthur Ralfs
To: Tim Daly
Subject: Re: axserver patch

root wrote:
> Thanks. Already found and made them.
> I used double quotes rather than "\ " to delimit the -R arguments
> but the effect is the same.
>
> The most significant problem I'm having is that my browser has
> suddenly decided to start syntax checking my html files. But it
> only does that when I go thru your interface. Browsing the file
> directly works fine. Any suggestions about what causes that?
>
> Tim
>
>   
Do you mean Firefox is giving you an error message when you try to
load the axiom.xml file? 

It might be the difference between html and xhtml (xml).  If Firefox thinks
you're loading html it will display it as best it can even if it's full
of mistakes.
If it thinks it's xml then it will give an error message if it's not
well formed.

When loading a local file I think Firefox takes the content type from the
file extension.  However when the file is delivered through a server I don't
think the extension makes any difference, rather it's the Content-Type
header
that matters.  In this case the Content-Type is set in the getFile
function to
"application/xhtml+xml".

Did you make any changes to the axiom.xml file?

\start
Date: Sat, 22 Sep 2007 13:41:50 -0400
From: Alfredo Portes
To: Arthur Ralfs
Subject: Re: axserver patch

Hi Arthur,

Thank you for the file.

On 9/22/07, Arthur Ralfs wrote:

> The wiki won't let me upload files so I've stopped using it for the time
> being.   However I've attached the latest version if you want to try.

I added the file as a pamphlet page:

http://wiki.axiom-developer.org/AxServer

\start
Date: Sat, 22 Sep 2007 10:49:54 -0700
From: Arthur Ralfs
To: Tim Daly
Subject: Re: axserver patch

root wrote:
> Thanks. Already found and made them.
> I used double quotes rather than "\ " to delimit the -R arguments
> but the effect is the same.
>
> The most significant problem I'm having is that my browser has
> suddenly decided to start syntax checking my html files. But it
> only does that when I go thru your interface. Browsing the file
> directly works fine. Any suggestions about what causes that?
>
> Tim
>
>   
Should have mentioned I use nxml-mode in emacs to make sure
my xml is well formed.

\start
Date: Sat, 22 Sep 2007 20:43:50 -0400
From: Tim Daly
To: Arthur Ralfs, Alfredo Portes, Alasdair McAndrew
Subject: axserver and hyperdoc

Arthur,

> Should have mentioned I use nxml-mode in emacs to make sure
> my xml is well formed.

I finally figured it out. Although I'm still struggling with page
coloring. Coloring the page and fetching it directly as a file gives a
fully colored page. Fetching the page thru the axserver gives a
partially colored page. Style sheets and local decls are ignored.
How odd.

I rewrote your axserver output routine so it now looks exactly like
an axiom console session. I added syntax coloring to the output to
test Alasdair's requirement.

Much progress was made today. I can now do hyperdoc pages interacting
with Axiom directly. I've done pages for differentating, integrating
(definite and indefinite), and limits. Now I think the whole hyperdoc
page layout needs a lot of thought and work. Of course, I'm the last
person qualified to do GUI-based redesign. Now that the proof of
concept works perhaps someone on this list might want to take the
lead on a new design.

I'll upload a couple pages as an example for people to try.

Once I finish the page conversions I think we can completely replace
hyperdoc. This should happen shortly. I'm also looking to connect it
up to the help pages for the 95 domains I just documented.

Thanks for breaking this barrier.

\start
Date: Sat, 22 Sep 2007 19:05:50 -0700
From: Arthur Ralfs
To: Tim Daly
Subject: Re: axserver and hyperdoc

root wrote:
> Arthur,
>
>   
>> Should have mentioned I use nxml-mode in emacs to make sure
>> my xml is well formed.
>>     
>
> I finally figured it out. Although I'm still struggling with page
> coloring. Coloring the page and fetching it directly as a file gives a
> fully colored page. Fetching the page thru the axserver gives a
> partially colored page. Style sheets and local decls are ignored.
> How odd.
>   
Where did you put the style sheet?  Originally I tried having a separate
javascript file and linking to it with the <link...> element but that didn't
work.  I didn't spend any time trying to figure it out, I just put the
javascript
in a  <script> element in the xml.  So if you don't have it already maybe
the style sheet should go in a <style> element.
> I rewrote your axserver output routine so it now looks exactly like
> an axiom console session. I added syntax coloring to the output to
> test Alasdair's requirement.
>
> Much progress was made today. I can now do hyperdoc pages interacting
> with Axiom directly. I've done pages for differentating, integrating
> (definite and indefinite), and limits. Now I think the whole hyperdoc
> page layout needs a lot of thought and work. Of course, I'm the last
> person qualified to do GUI-based redesign. Now that the proof of
> concept works perhaps someone on this list might want to take the
> lead on a new design.
>
> I'll upload a couple pages as an example for people to try.
>
> Once I finish the page conversions I think we can completely replace
> hyperdoc. This should happen shortly. I'm also looking to connect it
> up to the help pages for the 95 domains I just documented.
>   

That's great.  I'm glad you found it useful.

\start
Date: Sat, 22 Sep 2007 21:22:47 -0500
From: Tim Daly
To: Arthur Ralfs, Alfredo Portes, Alasdair McAndrew
Subject: newhyper.pamphlet


  mkdir -p /home/silver/bitmaps
  cp newhyper.pamphlet /home/silver
  cd /home/silver
  (copy the axserver.spad, axiom.xml, and http.lisp files here)
  export AXIOM=(where)
  export PATH=$AXIOM/bin/lib:$AXIOM/bin:$PATH
  notangle -R"rootpage.html"      newhyper.pamphlet > rootpage.html
  notangle -R"axiom1.bitmap"      newhyper.pamphlet > bitmaps/axiom1.bitmap
  notangle -R"basiccommand.html"  newhyper.pamphlet > basiccommand.html
  notangle -R"calculus.html"      newhyper.pamphlet > calculus.html
  notangle -R"differentiate.html" newhyper.pamphlet > differentiate.html
  axiom -nox
   -> )set mes auto off
   -> )set out mathml on
   -> )lisp (load "http.lisp")
   -> )compile axserver.spad
   -> axServer(8085,multiServ)$AXSERV

 Now start your browser and go to:
   file:///home/silver/rootpage.html
 and then do:
   Basic Commands -> Calculus -> Differentiate -> Continue

 You should see the result of the differentiate appear inline in the
 page. You can change the values in the text areas, click continue,
 and see the new result.

=========================================================================
=== newhyper.pamphlet
=========================================================================
\documentclass{article}
\usepackage{axiom}
\begin{document}
\title{\$SPAD/src/hyper newhyper.pamphlet}
\author{Timothy Daly}
\maketitle
\begin{abstract}
Demo pages for the new hyperdoc using a browser.
\end{abstract}
\eject
\tableofcontents
\eject
\section{instructions}
\begin{verbatim}
  mkdir -p /home/silver/bitmaps
  cp newhyper.pamphlet /home/silver
  cd /home/silver
  (copy the axserver.spad, axiom.xml, and http.lisp files here)
  export AXIOM=(where)
  export PATH=$AXIOM/bin/lib:$AXIOM/bin:$PATH
  notangle -R"rootpage.html"      newhyper.pamphlet > rootpage.html
  notangle -R"axiom1.bitmap"      newhyper.pamphlet > bitmaps/axiom1.bitmap
  notangle -R"basiccommand.html"  newhyper.pamphlet > basiccommand.html
  notangle -R"calculus.html"      newhyper.pamphlet > calculus.html
  notangle -R"differentiate.html" newhyper.pamphlet > differentiate.html
  axiom -nox
   -> )set mes auto off
   -> )set out mathml on
   -> )lisp (load "http.lisp")
   -> )compile axserver.spad
   -> axServer(8085,multiServ)$AXSERV

 Now start your browser and go to:
   file:///home/silver/rootpage.html
 and then do:
   Basic Commands -> Calculus -> Differentiate -> Continue

 You should see the result of the differentiate appear inline in the
 page. You can change the values in the text areas, click continue,
 and see the new result.
\end{verbatim}
\section{rootpage.html}
\begin{verbatim}
  notangle -R"rootpage.html" newhyper.pamphlet > rootpage.html
\end{verbatim}
<<rootpage.html>>=
<?xml version="1.0" encoding="UTF-8"?>
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:xlink="http://www.w3.org/1999/xlink">
 <head>
  <meta http-equiv="Content-Type" content="text/html" charset="us-ascii"/>
  <title>Axiom Hyperdoc Root Page</title>
  <style>
   body { background-color: #FFFF66 }
  </style>
  <script type="text/javascript">
  </script>
 </head>
 <body>
  <center><img src="bitmaps/axiom1.bitmap"/></center>
  <center><h3> Axiom Documentation </h3></center>
  <hr/>
  What would you like to do?<br/>
  <table>
   <tr>
    <td>
     <a href="basiccommand.html">
      <b>Basic Commands</b>
     </a>
    </td>
    <td>Solve problems by filling in templates</td>
   </tr>
   <tr>
    <td>
     <a href="topreferencepage.html">
      <b>Reference</b>
     </a>
    </td>
    <td>Scan on-line documentation for AXIOM<br/></td>
   </tr>
   <tr>
    <td>
     <a href="topicpage.html">
      <b>Topics</b>
     </a> 
    </td>
    <td> Learn how to use Axiom, by topic<br/></td>
   </tr>
   <tr>
    <td>
     <a href="man0page.html">
      <b>Browser</b>
     </a> 
    </td>
    <td> Browse through the AXIOM library<br/></td>
   </tr>
   <tr>
    <td>
     <a href="topexamplepage.html">
      <b>Examples</b>
     </a> 
    </td>
    <td> See examples of use of the library<br/></td>
   </tr>
   <tr>
    <td>
     <a href="topsettingspage.html">
      <b>Settings</b>
     </a> 
    </td>
    <td> Display and change the system environment<br/></td>
   </tr>
   <tr>
    <td>
     <a href="htxl.html">
      <b>NAG Link</b>
     </a> 
    </td>
    <td> Link to NAG Numerical Library<br/></td>
   </tr>
   <tr>
    <td>
     <a href="rootpagelogo.html">
      <b>About Axiom</b>
     </a> 
    </td>
    <td> See some basic information about Axiom<br/></td>
   </tr>
   <tr>
    <td>
     <a href="releasenotes.html">
      <b>What's New</b>
     </a>
    </td>
    <td> Enhancements in this version of Axiom<br/></td>
   </tr>
  </table>
 </body>
</html>
@
\section{bitmaps/axiom1.bitmap}

\begin{verbatim}
  mkdir bitmaps
  notangle -R"axiom1.bitmap" newhyper.pamphlet > bitmaps/axiom1.bitmap
\end{verbatim}

<<axiom1.bitmap>>=
#define axiom_width 270
#define axiom_height 100
static char axiom_bits[] = {
   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3c, 0x00, 0x00, 0x00, 0x00, 0x00,
   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
   0x00, 0x00, 0x00, 0x00, 0x7e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
   0x00, 0x80, 0xff, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0,
   0xff, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, 0xff, 0x1f,
   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf8, 0xff, 0x1f, 0x00, 0x00,
   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
   0x00, 0x00, 0x00, 0x00, 0x00, 0xf8, 0xff, 0x1f, 0x00, 0x00, 0x00, 0x00,
   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
   0x00, 0x00, 0x00, 0xf8, 0xff, 0x1f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
   0x00, 0xe0, 0xff, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80,
   0xff, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0x01,
   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfe, 0x00, 0x00, 0x00,
   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 0x00, 0x00, 0x00,
   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
   0x00, 0x00, 0x00, 0x80, 0x3f, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
   0x00, 0x00, 0xf2, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
   0x92, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x92, 0x02,
   0x00, 0xe0, 0x01, 0xf0, 0xff, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
   0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0xe0, 0xff, 0x01, 0x00, 0x00, 0xe0,
   0x00, 0xc0, 0x7f, 0x00, 0x00, 0xc0, 0x1f, 0x00, 0xd2, 0x02, 0x00, 0xe0,
   0xff, 0xff, 0xff, 0x0f, 0xfe, 0xff, 0xff, 0x03, 0xf8, 0xff, 0xff, 0x03,
   0xe0, 0x07, 0x00, 0x00, 0xfe, 0xff, 0x0f, 0x00, 0x00, 0xf8, 0x01, 0xf8,
   0xff, 0x03, 0x00, 0xf8, 0xff, 0x01, 0x00, 0x00, 0x00, 0xe0, 0xff, 0xff,
   0xff, 0x3f, 0xff, 0xff, 0xff, 0x03, 0xf8, 0xff, 0xff, 0x01, 0xf8, 0x07,
   0x00, 0x80, 0xff, 0xff, 0x3f, 0x00, 0x00, 0xff, 0x01, 0xfe, 0xff, 0x07,
   0x00, 0xfe, 0xff, 0x03, 0x00, 0x00, 0x00, 0xf0, 0xff, 0xff, 0xff, 0x7f,
   0xff, 0xff, 0xff, 0x01, 0xf8, 0xff, 0xff, 0xfd, 0xff, 0x07, 0x00, 0xe0,
   0xff, 0xff, 0x7f, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x0f, 0x00, 0xff,
   0xff, 0x03, 0x00, 0x00, 0x00, 0xf0, 0xff, 0x8f, 0xff, 0xff, 0xe0, 0xff,
   0x7f, 0x00, 0x80, 0xff, 0x3f, 0xfe, 0xff, 0x07, 0x00, 0xf0, 0xff, 0xff,
   0xff, 0x80, 0xff, 0xff, 0xc0, 0xff, 0xff, 0x1f, 0xc0, 0xff, 0xff, 0x07,
   0x00, 0x00, 0x00, 0xf0, 0x7f, 0x00, 0xf0, 0xff, 0x81, 0xff, 0x3f, 0x00,
   0x00, 0xff, 0x07, 0xff, 0xff, 0x03, 0x00, 0xfe, 0xff, 0xff, 0xff, 0xc3,
   0xff, 0xff, 0xf0, 0xff, 0xff, 0x3f, 0xf0, 0xff, 0xff, 0x0f, 0x00, 0x00,
   0x00, 0xf0, 0x1f, 0x00, 0xe0, 0xff, 0x01, 0xff, 0x3f, 0x00, 0x00, 0xfe,
   0x03, 0xe0, 0xff, 0x03, 0x00, 0xff, 0xff, 0xff, 0xff, 0x83, 0xff, 0xff,
   0xf8, 0xff, 0xff, 0x3f, 0xf8, 0xff, 0xff, 0x1f, 0x00, 0x00, 0x00, 0xf0,
   0x0f, 0x00, 0xc0, 0xff, 0x01, 0xfe, 0x3f, 0x00, 0x00, 0xfe, 0x01, 0xc0,
   0xff, 0x03, 0x80, 0xff, 0x00, 0xfc, 0xff, 0x07, 0xf8, 0xff, 0xfc, 0x01,
   0xff, 0x3f, 0xfe, 0x80, 0xff, 0x1f, 0x00, 0x00, 0x00, 0xf0, 0x07, 0x00,
   0xc0, 0xff, 0x03, 0xfe, 0x3f, 0x00, 0x00, 0xff, 0x00, 0x80, 0xff, 0x03,
   0xc0, 0x3f, 0x00, 0xe0, 0xff, 0x0f, 0xe0, 0xff, 0x3f, 0x00, 0xfe, 0xbf,
   0x3f, 0x00, 0xff, 0x1f, 0x00, 0x00, 0x00, 0xf8, 0x01, 0x00, 0x80, 0xff,
   0x03, 0xf8, 0x3f, 0x00, 0x80, 0x7f, 0x00, 0x80, 0xff, 0x03, 0xe0, 0x0f,
   0x00, 0x80, 0xff, 0x1f, 0xe0, 0xff, 0x0f, 0x00, 0xf8, 0xff, 0x0f, 0x00,
   0xfc, 0x1f, 0x00, 0x00, 0x00, 0xf8, 0x00, 0x00, 0x00, 0xff, 0x03, 0xf8,
   0x7f, 0x00, 0x80, 0x3f, 0x00, 0x80, 0xff, 0x03, 0xf0, 0x0f, 0x00, 0x00,
   0xff, 0x1f, 0xe0, 0xff, 0x07, 0x00, 0xf8, 0xff, 0x07, 0x00, 0xfc, 0x1f,
   0x00, 0x00, 0x00, 0xf8, 0x00, 0x00, 0x00, 0xff, 0x03, 0xf0, 0xff, 0x00,
   0xc0, 0x1f, 0x00, 0x80, 0xff, 0x03, 0xf8, 0x07, 0x00, 0x00, 0xfe, 0x3f,
   0xe0, 0xff, 0x07, 0x00, 0xf8, 0xff, 0x03, 0x00, 0xf8, 0x3f, 0x00, 0x00,
   0x00, 0x78, 0x00, 0x00, 0x00, 0xff, 0x03, 0xe0, 0xff, 0x00, 0xc0, 0x0f,
   0x00, 0x80, 0xff, 0x03, 0xfc, 0x03, 0x00, 0x00, 0xfc, 0x3f, 0xe0, 0xff,
   0x03, 0x00, 0xf0, 0xff, 0x01, 0x00, 0xf8, 0x3f, 0x00, 0x00, 0x00, 0x3c,
   0x00, 0x00, 0x00, 0xff, 0x03, 0xc0, 0xff, 0x01, 0xe0, 0x0f, 0x00, 0x80,
   0xff, 0x03, 0xfc, 0x03, 0x00, 0x00, 0xfc, 0x3f, 0xe0, 0xff, 0x01, 0x00,
   0xf0, 0xff, 0x01, 0x00, 0xf8, 0x3f, 0x00, 0x00, 0x00, 0x1c, 0x00, 0x00,
   0x00, 0xff, 0x03, 0xc0, 0xff, 0x03, 0xf0, 0x07, 0x00, 0x80, 0xff, 0x03,
   0xfe, 0x01, 0x00, 0x00, 0xf8, 0x7f, 0xe0, 0xff, 0x01, 0x00, 0xf0, 0xff,
   0x00, 0x00, 0xf8, 0x3f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff,
   0x03, 0x80, 0xff, 0x07, 0xf8, 0x01, 0x00, 0x80, 0xff, 0x03, 0xff, 0x01,
   0x00, 0x00, 0xf8, 0x7f, 0xe0, 0xff, 0x00, 0x00, 0xf0, 0x7f, 0x00, 0x00,
   0xf8, 0x3f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0x03, 0x00,
   0xff, 0x0f, 0xf8, 0x01, 0x00, 0x80, 0xff, 0x03, 0xff, 0x01, 0x00, 0x00,
   0xf0, 0x7f, 0xe0, 0xff, 0x00, 0x00, 0xf0, 0x7f, 0x00, 0x00, 0xf8, 0x3f,
   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0x03, 0x00, 0xfe, 0x1f,
   0xf8, 0x00, 0x00, 0x80, 0xff, 0x83, 0xff, 0x00, 0x00, 0x00, 0xf0, 0xff,
   0xe0, 0xff, 0x00, 0x00, 0xf0, 0x7f, 0x00, 0x00, 0xf8, 0x3f, 0x00, 0x00,
   0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0x03, 0x00, 0xfc, 0x3f, 0x7e, 0x00,
   0x00, 0x80, 0xff, 0xc3, 0xff, 0x00, 0x00, 0x00, 0xe0, 0xff, 0xe0, 0xff,
   0x00, 0x00, 0xf0, 0x7f, 0x00, 0x00, 0xf8, 0x3f, 0x00, 0x00, 0x00, 0x00,
   0x00, 0x00, 0x00, 0xff, 0x03, 0x00, 0xf8, 0x7f, 0x3e, 0x00, 0x00, 0x80,
   0xff, 0xc3, 0xff, 0x00, 0x00, 0x00, 0xe0, 0xff, 0xe0, 0xff, 0x00, 0x00,
   0xf0, 0x7f, 0x00, 0x00, 0xf8, 0x3f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
   0x00, 0xff, 0x03, 0x00, 0xf8, 0x7f, 0x3f, 0x00, 0x00, 0x80, 0xff, 0xc3,
   0xff, 0x00, 0x00, 0x00, 0xe0, 0xff, 0xe0, 0xff, 0x00, 0x00, 0xf0, 0x7f,
   0x00, 0x00, 0xf8, 0x3f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0xff,
   0x03, 0x00, 0xf0, 0xff, 0x1f, 0x00, 0x00, 0x80, 0xff, 0xc3, 0xff, 0x00,
   0x00, 0x00, 0xe0, 0xff, 0xe0, 0xff, 0x00, 0x00, 0xf0, 0x7f, 0x00, 0x00,
   0xf8, 0x3f, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf8, 0xff, 0xff, 0x03, 0x00,
   0xe0, 0xff, 0x0f, 0x00, 0x00, 0x80, 0xff, 0xe3, 0xff, 0x00, 0x00, 0x00,
   0xc0, 0xff, 0xe1, 0xff, 0x00, 0x00, 0xf0, 0x7f, 0x00, 0x00, 0xf8, 0x3f,
   0x00, 0x00, 0x00, 0x00, 0x80, 0xff, 0xff, 0xff, 0x03, 0x00, 0xc0, 0xff,
   0x07, 0x00, 0x00, 0x80, 0xff, 0xe3, 0xff, 0x00, 0x00, 0x00, 0xc0, 0xff,
   0xe1, 0xff, 0x00, 0x00, 0xf0, 0x7f, 0x00, 0x00, 0xf8, 0x3f, 0x00, 0x00,
   0x00, 0x00, 0xe0, 0xff, 0x7f, 0xff, 0x03, 0x00, 0x80, 0xff, 0x07, 0x00,
   0x00, 0x80, 0xff, 0xe3, 0xff, 0x00, 0x00, 0x00, 0xc0, 0xff, 0xe1, 0xff,
   0x00, 0x00, 0xf0, 0x7f, 0x00, 0x00, 0xf8, 0x3f, 0x00, 0x00, 0x00, 0x00,
   0xfc, 0xff, 0x07, 0xff, 0x03, 0x00, 0x80, 0xff, 0x07, 0x00, 0x00, 0x80,
   0xff, 0xe3, 0xff, 0x00, 0x00, 0x00, 0xc0, 0xff, 0xe1, 0xff, 0x00, 0x00,
   0xf0, 0x7f, 0x00, 0x00, 0xf8, 0x3f, 0x00, 0x00, 0x00, 0x00, 0xff, 0x3f,
   0x00, 0xff, 0x03, 0x00, 0x00, 0xff, 0x0f, 0x00, 0x00, 0x80, 0xff, 0xe3,
   0xff, 0x00, 0x00, 0x00, 0xc0, 0xff, 0xe0, 0xff, 0x00, 0x00, 0xf0, 0x7f,
   0x00, 0x00, 0xf8, 0x1f, 0x00, 0x00, 0x00, 0xc0, 0xff, 0x07, 0x00, 0xff,
   0x03, 0x00, 0x00, 0xfe, 0x1f, 0x00, 0x00, 0x80, 0xff, 0xe3, 0xff, 0x00,
   0x00, 0x00, 0xc0, 0xff, 0xe0, 0xff, 0x00, 0x00, 0xf0, 0x7f, 0x00, 0x00,
   0xf8, 0x3f, 0x00, 0x00, 0x00, 0xe0, 0xff, 0x01, 0x00, 0xff, 0x03, 0x00,
   0x00, 0xfe, 0x1f, 0x00, 0x00, 0x80, 0xff, 0xe3, 0xff, 0x00, 0x00, 0x00,
   0xc0, 0xff, 0xe0, 0xff, 0x00, 0x00, 0xf0, 0x7f, 0x00, 0x00, 0xf8, 0x1f,
   0x00, 0x00, 0x00, 0xf0, 0xff, 0x00, 0x00, 0xff, 0x03, 0x00, 0x00, 0xff,
   0x3f, 0x00, 0x00, 0x80, 0xff, 0xe3, 0xff, 0x00, 0x00, 0x00, 0xc0, 0xff,
   0xe0, 0xff, 0x00, 0x00, 0xf0, 0x7f, 0x00, 0x00, 0xf8, 0x1f, 0x00, 0x00,
   0x00, 0xf8, 0x3f, 0x00, 0x00, 0xff, 0x03, 0x00, 0x80, 0xff, 0x7f, 0x00,
   0x00, 0x80, 0xff, 0xe3, 0xff, 0x00, 0x00, 0x00, 0xc0, 0xff, 0xe0, 0xff,
   0x00, 0x00, 0xf0, 0x7f, 0x00, 0x00, 0xf8, 0x1f, 0x00, 0x00, 0x00, 0xfc,
   0x1f, 0x00, 0x00, 0xff, 0x03, 0x00, 0x80, 0xff, 0xff, 0x00, 0x00, 0x80,
   0xff, 0xe3, 0xff, 0x00, 0x00, 0x00, 0xc0, 0xff, 0xe0, 0xff, 0x00, 0x00,
   0xf0, 0x7f, 0x00, 0x00, 0xf8, 0x1f, 0x00, 0x00, 0x00, 0xfe, 0x1f, 0x00,
   0x00, 0xff, 0x03, 0x00, 0xc0, 0xef, 0xff, 0x01, 0x00, 0x80, 0xff, 0xe3,
   0xff, 0x00, 0x00, 0x00, 0xc0, 0xff, 0xe0, 0xff, 0x00, 0x00, 0xf0, 0x7f,
   0x00, 0x00, 0xf8, 0x1f, 0x00, 0x00, 0x00, 0xfe, 0x0f, 0x00, 0x00, 0xff,
   0x03, 0x00, 0xe0, 0xc7, 0xff, 0x01, 0x00, 0x80, 0xff, 0xe3, 0xff, 0x01,
   0x00, 0x00, 0xc0, 0xff, 0xe0, 0xff, 0x00, 0x00, 0xf0, 0x7f, 0x00, 0x00,
   0xf8, 0x1f, 0x00, 0x00, 0x00, 0xff, 0x07, 0x00, 0x00, 0xff, 0x03, 0x00,
   0xf0, 0x83, 0xff, 0x07, 0x00, 0x80, 0xff, 0xe3, 0xff, 0x01, 0x00, 0x00,
   0xc0, 0x7f, 0xe0, 0xff, 0x00, 0x00, 0xf0, 0x7f, 0x00, 0x00, 0xf8, 0x1f,
   0x00, 0x00, 0x80, 0xff, 0x07, 0x00, 0x00, 0xff, 0x03, 0x00, 0xf8, 0x83,
   0xff, 0x0f, 0x00, 0x80, 0xff, 0xe3, 0xff, 0x01, 0x00, 0x00, 0xc0, 0x7f,
   0xe0, 0xff, 0x00, 0x00, 0xf0, 0x7f, 0x00, 0x00, 0xf8, 0x1f, 0x00, 0x00,
   0x80, 0xff, 0x07, 0x00, 0x80, 0xff, 0x03, 0x00, 0xf8, 0x01, 0xff, 0x0f,
   0x00, 0x80, 0xff, 0xc3, 0xff, 0x01, 0x00, 0x00, 0xc0, 0x3f, 0xe0, 0xff,
   0x00, 0x00, 0xf0, 0x7f, 0x00, 0x00, 0xf8, 0x1f, 0x00, 0x00, 0x80, 0xff,
   0x03, 0x00, 0x80, 0xff, 0x03, 0x00, 0xfc, 0x00, 0xfe, 0x1f, 0x00, 0x80,
   0xff, 0xc3, 0xff, 0x03, 0x00, 0x00, 0xe0, 0x3f, 0xe0, 0xff, 0x00, 0x00,
   0xf0, 0x7f, 0x00, 0x00, 0xf8, 0x1f, 0x00, 0x00, 0x80, 0xff, 0x03, 0x00,
   0x80, 0xff, 0x03, 0x00, 0xfe, 0x00, 0xfc, 0x3f, 0x00, 0x80, 0xff, 0xc3,
   0xff, 0x03, 0x00, 0x00, 0xe0, 0x3f, 0xe0, 0xff, 0x00, 0x00, 0xf0, 0x7f,
   0x00, 0x00, 0xf8, 0x1f, 0x00, 0x00, 0x80, 0xff, 0x03, 0x00, 0xc0, 0xff,
   0x03, 0x00, 0x7f, 0x00, 0xf8, 0x7f, 0x00, 0x80, 0xff, 0xc3, 0xff, 0x07,
   0x00, 0x00, 0xe0, 0x1f, 0xe0, 0xff, 0x00, 0x00, 0xf0, 0x7f, 0x00, 0x00,
   0xf8, 0x1f, 0x00, 0x00, 0x80, 0xff, 0x03, 0x00, 0xc0, 0xff, 0x03, 0x80,
   0x3f, 0x00, 0xf8, 0x7f, 0x00, 0x80, 0xff, 0x83, 0xff, 0x07, 0x00, 0x00,
   0xf0, 0x0f, 0xe0, 0xff, 0x00, 0x00, 0xf0, 0x7f, 0x00, 0x00, 0xf8, 0x1f,
   0x00, 0x00, 0x80, 0xff, 0x03, 0x00, 0xe0, 0xff, 0x03, 0x80, 0x1f, 0x00,
   0xf0, 0xff, 0x00, 0x80, 0xff, 0x83, 0xff, 0x0f, 0x00, 0x00, 0xf0, 0x0f,
   0xe0, 0xff, 0x00, 0x00, 0xf0, 0x7f, 0x00, 0x00, 0xf8, 0x1f, 0x00, 0x00,
   0x80, 0xff, 0x07, 0x00, 0xe0, 0xff, 0x03, 0xc0, 0x1f, 0x00, 0xf0, 0xff,
   0x01, 0x80, 0xff, 0x83, 0xff, 0x0f, 0x00, 0x00, 0xf0, 0x07, 0xe0, 0xff,
   0x00, 0x00, 0xf0, 0x7f, 0x00, 0x00, 0xf8, 0x1f, 0x00, 0x00, 0x80, 0xff,
   0x07, 0x00, 0xf8, 0xff, 0x03, 0xe0, 0x0f, 0x00, 0xe0, 0xff, 0x03, 0x80,
   0xff, 0x03, 0xff, 0x3f, 0x00, 0x00, 0xf8, 0x03, 0xe0, 0xff, 0x00, 0x00,
   0xf0, 0x7f, 0x00, 0x00, 0xf8, 0x1f, 0x00, 0x00, 0x80, 0xff, 0x0f, 0x00,
   0xf8, 0xff, 0x03, 0xf0, 0x07, 0x00, 0xc0, 0xff, 0x07, 0x80, 0xff, 0x03,
   0xfe, 0x7f, 0x00, 0x00, 0xfc, 0x01, 0xe0, 0xff, 0x00, 0x00, 0xf0, 0x7f,
   0x00, 0x00, 0xf8, 0x1f, 0x00, 0x00, 0x80, 0xff, 0x1f, 0x00, 0xfe, 0xff,
   0x07, 0xf8, 0x07, 0x00, 0xc0, 0xff, 0x0f, 0x80, 0xff, 0x03, 0xfe, 0xff,
   0x00, 0x00, 0xfe, 0x00, 0xe0, 0xff, 0x00, 0x00, 0xf0, 0x7f, 0x00, 0x00,
   0xf8, 0x3f, 0x00, 0x00, 0x80, 0xff, 0x1f, 0x00, 0x7f, 0xff, 0x0f, 0xf8,
   0x07, 0x00, 0x80, 0xff, 0x1f, 0x80, 0xff, 0x03, 0xfc, 0xff, 0x01, 0x00,
   0x7f, 0x00, 0xe0, 0xff, 0x00, 0x00, 0xf0, 0x7f, 0x00, 0x00, 0xf8, 0x3f,
   0x00, 0x00, 0x00, 0xff, 0xff, 0xf1, 0x1f, 0xfe, 0xff, 0xff, 0x03, 0x00,
   0x80, 0xff, 0x3f, 0xc0, 0xff, 0x07, 0xf8, 0xff, 0x1f, 0xf0, 0x3f, 0x00,
   0xf0, 0xff, 0x00, 0x00, 0xf8, 0xff, 0x00, 0x00, 0xf8, 0x3f, 0x00, 0x00,
   0x00, 0xfe, 0xff, 0xff, 0x0f, 0xfe, 0xff, 0xff, 0x03, 0x00, 0x80, 0xff,
   0x7f, 0xc0, 0xff, 0x07, 0xf8, 0xff, 0xff, 0xff, 0x1f, 0x00, 0xf0, 0xff,
   0x01, 0x00, 0xf8, 0xff, 0x00, 0x00, 0xfc, 0x7f, 0x00, 0x00, 0x00, 0xfc,
   0xff, 0xff, 0x07, 0xfe, 0xff, 0xff, 0x07, 0x00, 0xc0, 0xff, 0xff, 0xe0,
   0xff, 0x1f, 0xf0, 0xff, 0xff, 0xff, 0x0f, 0x00, 0xf8, 0xff, 0x03, 0x00,
   0xf8, 0xff, 0x01, 0x00, 0xfc, 0xff, 0x00, 0x00, 0x00, 0xf8, 0xff, 0xff,
   0x01, 0xfc, 0xff, 0xff, 0x0f, 0x00, 0xe0, 0xff, 0xff, 0xfb, 0xff, 0x3f,
   0xe0, 0xff, 0xff, 0xff, 0x03, 0x00, 0xfe, 0xff, 0x07, 0x00, 0xfc, 0xff,
   0x07, 0x00, 0xfe, 0xff, 0x01, 0x00, 0x00, 0xf0, 0xff, 0x7f, 0x00, 0xfc,
   0xff, 0xff, 0x7f, 0x00, 0xf8, 0xff, 0xff, 0xff, 0xff, 0xff, 0x87, 0xff,
   0xff, 0xff, 0x00, 0xc0, 0xff, 0xff, 0xff, 0x01, 0xff, 0xff, 0x7f, 0x80,
   0xff, 0xff, 0x3f, 0x00, 0x00, 0xc0, 0xff, 0x3f, 0x00, 0xf8, 0xff, 0xff,
   0x3f, 0x00, 0xf8, 0xff, 0xff, 0xff, 0xff, 0xff, 0x03, 0xff, 0xff, 0x3f,
   0x00, 0xc0, 0xff, 0xff, 0xff, 0x80, 0xff, 0xff, 0x7f, 0xc0, 0xff, 0xff,
   0x3f, 0x00, 0x00, 0x00, 0xff, 0x0f, 0x00, 0xf0, 0xff, 0x00, 0x1f, 0x00,
   0xfc, 0x0f, 0xfe, 0xff, 0xcf, 0xff, 0x03, 0xfc, 0xff, 0x0f, 0x00, 0xe0,
   0xff, 0xff, 0x7f, 0x80, 0xff, 0xff, 0x3f, 0xc0, 0xff, 0xff, 0x3f, 0x00,
   0x00, 0x00, 0xf8, 0x03, 0x00, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
   0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0xff, 0x01, 0x00, 0x00, 0x00, 0x00,
   0x00, 0x00, 0x00, 0x00, 0x18, 0xc0, 0x01, 0x00, 0x1f, 0x00, 0x00, 0x00,
   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3c, 0x00,
   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0x00, 0x00, 0x00,
   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
   0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0xff, 0x03, 0x00, 0x00, 0x00, 0x00,
   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
   0x00, 0x00, 0x00, 0xe0, 0xff, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
   0x00, 0xf0, 0xff, 0x1f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf8,
   0xff, 0x1f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf8, 0xff, 0x1f,
   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf8, 0xff, 0x1f, 0x00, 0x00,
   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
   0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0xff, 0x07, 0x00, 0x00, 0x00, 0x00,
   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
   0x00, 0x00, 0x00, 0xc0, 0xff, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
   0x00, 0x00, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
   0x7e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x00,
   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
   0x00, 0x00, 0x00, 0x00};
@
        
\section{basiccommand.html}

\begin{verbatim}
  notangle -R"basiccommand.html" newhyper.pamphlet > basiccommand.html
\end{verbatim}

<<basiccommand.html>>=
<?xml version="1.0" encoding="UTF-8"?>
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:xlink="http://www.w3.org/1999/xlink">
 <head>
  <meta http-equiv="Content-Type" content="text/html" charset="us-ascii"/>
  <title>Axiom Hyperdoc Root Page</title>
  <style>
   body { background-color: #FFFF66 }
  </style>
  <script type="text/javascript">
   function AxiomExit() {
    alert("Exit");
    return(true);
   };
   function AxiomHelp() {
    alert("AxiomHelp");
    return(true);
   };
   function AxiomNull() {
    alert("AxiomNull");
    return(true);
   };
  </script>
 </head>
 <body>
  <center><h3> Axiom Documentation </h3></center>
  <hr/>
  <table>
   <tr>
    <td>
     <a href="calculus.html">
      <b>Calculus</b>
     </a>
    </td>
    <td>Compute integrals, derivatives, or limits</td>
   </tr>
   <tr>
    <td><a href="bcMatrix.js"><b>Matrix</b></a></td>
    <td>Create a matrix</td>
   </tr>
   <tr>
    <td><a href="bcExpand.js"><b>Operations</b></a></td>
    <td>Expand, factor, simplify, substitute, etc.</td>
   </tr>
   <tr>
    <td><a href="bcDraw.js"><b>Draw</b></a></td>
    <td>Create 2D or 3D plots.</td>
   </tr>
   <tr>
    <td><a href="bcSeries.js"><b>Series</b></a></td>
    <td>Create a power series</td>
   </tr>
   <tr>
    <td><a href="bcSolve.js"><b>Solve</b></a></td>
    <td>Solve an equation or system of equations</td>
   </tr>
  </table>
 </body>
</html> 
@

\section{calculus.html}

\begin{verbatim}
  notangle -R"calculus.html" newhyper.pamphlet > calculus.html
\end{verbatim}

<<calculus.html>>=
<?xml version="1.0" encoding="UTF-8"?>
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:xlink="http://www.w3.org/1999/xlink">
 <head>
  <meta http-equiv="Content-Type" content="text/html" charset="us-ascii"/>
  <title>Axiom Hyperdoc Root Page</title>
  <style>
   body { background-color: #FFFF66 }
  </style>
  <script type="text/javascript">
  </script>
 </head>
 <body>
  <center><h3> Axiom Documentation </h3></center>
  <hr/>
  <table>
   <tr>
    <td>
     <a href="http://127.0.0.1:8085/home/silver/differentiate.html">
      <b>Differentiate</b>
     </a>
    </td>
   </tr>
   <tr>
    <td><a href="http://127.0.0.1:8085/home/silver/indefiniteintegral.html">
      <b>Do an Indefinite Integral</b></a></td>
   </tr>
   <tr>
    <td><a href="http://127.0.0.1:8085/home/silver/definiteintegral.html">
     <b>Do a Definite Integral</b></a></td>
   </tr>
   <tr>
    <td><a href="basiclimit.html"><b>Find a limit</b></a></td>
   </tr>
   <tr>
    <td><a href="(|bcSum|).html"><b>Do a summation</b></a></td>
   </tr>
   <tr>
    <td><a href="(|bcProduct|).html"><b>Compute a product</b></a></td>
   </tr>
  </table>
 </body>
</html>
@

\section{differentiate.html}

\begin{verbatim}
  notangle -R"differentiate.html" newhyper.pamphlet > differentiate.html
\end{verbatim}

<<differentiate.html>>=
<?xml version="1.0" encoding="UTF-8"?>
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:xlink="http://www.w3.org/1999/xlink">
 <head>
  <meta http-equiv="Content-Type" content="text/html" charset="us-ascii"/>
  <title>Axiom Hyperdoc Root Page</title>
  <style>
   body { background-color: #FFFF66 }
   div#answer { color:blue }
  </style>
  <script type="text/javascript">
   function differentiate() {
    var myform = document.getElementById("form2");
    return('differentiate('+myform.expr.value+',['+
                            myform.vars.value+'],['+
                            myform.powers.value+'])');
   }
   function init() {
   }
   function makeRequest() {
     http_request = new XMLHttpRequest();         
     var command = differentiate();
     //alert(command);
     http_request.open('POST', '127.0.0.1:8085', true);
     http_request.onreadystatechange = handleResponse;
     http_request.setRequestHeader('Content-Type', 'text/plain');
     http_request.send("command="+command);
     return(false);
   }
   function handleResponse() {
    if (http_request.readyState == 4) {
        if (http_request.status == 200) {
            var mathString = http_request.responseText;
            var mathRange = document.createRange();
            var mathBox = document.createElementNS('http://www.w3.org/1999/xhtml','div');
            mathRange.selectNodeContents(mathBox);
            var mathFragment = mathRange.createContextualFragment(mathString);
            mathBox.appendChild(mathFragment);
            document.getElementById('mathAns').removeChild(document.getElementById('mathAns').firstChild)
            document.getElementById('mathAns').appendChild(mathBox);

        } else
        {
          alert('There was a problem with the request.'+ 
                 http_request.statusText);
        }
      }
    }
  </script>
 </head>
 <body>
  <center><h3> Axiom Documentation </h3></center>
  <hr/>
  <form id="form2">
   Enter the function you want to differentiate:<br/>
   <input type="text" id="expr" tabindex="10" size="50" value="sin(x*y)"/><br/>
   List the variables you want to differentiate with respect to:<br/>
   <input type="text" id="vars" tabindex="20" value="x,y"/><br/>
   List the number of times you want to differentiate with respect
   to each variable (leave blank if once for each)<br/>
   <input type="text" id="powers" tabindex="30" value="1,2"/><br/>
   <center>
     <input type="button" value="Continue" name="continue" 
       onclick="javascript:makeRequest();"/>
   </center>
  </form>
  <div id="mathAns"><div></div></div>
 </body>
</html>
@

\eject
\begin{thebibliography}{99}
\bibitem{1} nothing
\end{thebibliography}
\end{document}

\start
Date: Sat, 22 Sep 2007 22:35:41 -0400
From: Tim Daly
To: Arthur Ralfs
Subject: Re: axserver and hyperdoc

>> I finally figured it out. Although I'm still struggling with page
>> coloring. Coloring the page and fetching it directly as a file gives a
>> fully colored page. Fetching the page thru the axserver gives a
>> partially colored page. Style sheets and local decls are ignored.
>> How odd.
>>   
>Where did you put the style sheet?  Originally I tried having a separate
>javascript file and linking to it with the <link...> element but that didn't
>work.  I didn't spend any time trying to figure it out, I just put the
>javascript
>in a  <script> element in the xml.  So if you don't have it already maybe
>the style sheet should go in a <style> element.

The <style> element is in the <head> element block for the page.
See newhyper.pamphlet which just went out.

Notice that all of the pages are fully colored (they are fetched
locally from files) but the differentiate page is partially colored
(it is fetched thru axserver).

\start
Date: Sun, 23 Sep 2007 04:57:19 -0700
From: Arthur Ralfs
To: Alfredo Portes
Subject: re: axserver and hyperdoc

Alfredo Portes wrote:
> Arthur,
>
> Is it ok if I separate the javascript and the html from the
> main pamphlet into separate pamphlets, so I just see them
> as the front-end and the spad/lisp as the back-end.
>
> I am planning on having the examples that Tim gave as just
> javascript functions, so you don't need individual html pages,
> but you just click a button and the content is changed.
>
> I really don't want to duplicate or have something different
> than what you envision.
>
> Regards,
>
> Alfredo
>   
That makes sense to me.  I guess some people might choose
to work more on one or the other.


Do you have mathml working in IE?

Arthur

> On 9/23/07, Alfredo Portes wrote:
>   
>> The attached patch adds support for xmlhttp objects in IE.
>>
>> I setup a svn repository at:
>>
>> https://alfredoportes.com/svn/axserver
>>
>> If you want access let me know, or if you setup a repo with
>> this work, where I can pull from, please let me know.

\start
Date: Sun, 23 Sep 2007 13:53:54 -0500
From: Tim Daly
To: Alfredo Portes
Subject: svn server

Alfredo,

https://alfredoportes.com/svn/server

is insufficient information. When I try to connect it needs a username
and password. And I don't know what to check out.

You're welcome to create a branch on sourceforge (despite the last few
branch disasters) and we can work together there if you like.

\start
Date: Sun, 23 Sep 2007 12:30:19 -0700
From: Arthur Ralfs
To: Tim Daly, Alfredo Portes
Subject: re: axserver and hyperdoc

root wrote:
> console output
>
> It occurs to me that we could make a page that does not replace
> the current result with the new result but adds the current result
> to the prior results. In this way we have the complete console
> output.
>
> If we have the complete console output it seems that we might want
> to add the new result "at the top", right under the command input
> line so the results show in "stack order". That way the current
> result is always visible on the web page and scrolling is not needed.
>
> t
>
>   
My own thoughts on the console interface was that output should be
appended and not replace the last output.  Also I would like to be able
to go back, edit and resubmit previous commands so all previous
commands should be active command boxes.  That suggests a tree
of input/output nodes with the possibility of branching off a previous node.
Probably not all output should be visible by default since that might lead
to a cluttered workspace so there should be a mechanism for hiding/showing
nodes or whole branches of nodes.

Of course the hyperdoc stuff should be easily accessible and I would also
like to see other documentation, for instance the xhtml+mathml version of
the Jenks-Sutor book, accesible through a menu item.  Other documentation,
like Tim's new books, could  be added as available.

Note that I have it set up in the Jenks-Sutor book so that the command boxes
can be live enabling the reader to test out commands while reading.  I had
this set up using the "serv.c" example I posted previously so I just have to
review the javascript and make a few changes to get it working with the new
axiom server.  Or if anybody else cares to look at it I can forward the
javascript.

\start
Date: Sun, 23 Sep 2007 15:32:17 -0400
From: Alfredo Portes
To: Tim Daly
Subject: Re: svn server

Hi Tim,

Sorry about that. I instead added it in the svn repos of doyen
that we were not using:

svn co https://doyencd.svn.sourceforge.net/svnroot/doyencd/trunk/axserver
axserver

which you of course have access. Please let me know if this is ok
with you. Give access to Arthur please if you can.

Regards,

Alfredo

On 9/23/07, Tim Daly wrote:
> Alfredo,
>
> https://alfredoportes.com/svn/server
>
> is insufficient information. When I try to connect it needs a username
> and password. And I don't know what to check out.
>
> You're welcome to create a branch on sourceforge (despite the last few
> branch disasters) and we can work together there if you like.

\start
Date: Sun, 23 Sep 2007 17:33:22 -0400
From: Tim Daly
To: Arthur Ralfs
Subject: re: axserver and hyperdoc

>> It occurs to me that we could make a page that does not replace
>> the current result with the new result but adds the current result
>> to the prior results. In this way we have the complete console
>> output.
>>
>> If we have the complete console output it seems that we might want
>> to add the new result "at the top", right under the command input
>> line so the results show in "stack order". That way the current
>> result is always visible on the web page and scrolling is not needed.
>>
>> t
>>
>>   
>My own thoughts on the console interface was that output should be
>appended and not replace the last output.  Also I would like to be able
>to go back, edit and resubmit previous commands so all previous
>commands should be active command boxes.  That suggests a tree
>of input/output nodes with the possibility of branching off a previous node.
>Probably not all output should be visible by default since that might lead
>to a cluttered workspace so there should be a mechanism for hiding/showing
>nodes or whole branches of nodes.
>
>Of course the hyperdoc stuff should be easily accessible and I would also
>like to see other documentation, for instance the xhtml+mathml version of
>the Jenks-Sutor book, accesible through a menu item.  Other documentation,
>like Tim's new books, could  be added as available.
>
>Note that I have it set up in the Jenks-Sutor book so that the command boxes
>can be live enabling the reader to test out commands while reading.  I had
>this set up using the "serv.c" example I posted previously so I just have to
>review the javascript and make a few changes to get it working with the new
>axiom server.  Or if anybody else cares to look at it I can forward the
>javascript.

I'm doing some heavy editing of the pages at the moment. I've added
some chunks to make the javascript easy to include as well as standard
page headers/footers. 

It would be sweet to be able to rerun a command.  If you'll send me
the files I'll try to incorporate them and test them out. Please resend
serv.c so I'm sure I have the latest version.

Do you know if html has a tree control? We could embed the commands
and results into a tree that can be expanded or collapsed giving a
"notebook" style interface. 

I still like the idea of using "stack order" for commands because 
that keeps the latest command and result on the screen without
scrolling. Command numbering should make that unambiguous.

Clearly all of the available documentation should be reflected in
the new documentation system. I'll look at what you've done and try
to prototype an example. 

We could modify the )help command to run the axServer function so
)help would enable browsing. )help could start the browser with a
context-specific command line.

\start
Date: Sun, 23 Sep 2007 17:34:53 -0400
From: Tim Daly
To: Alfredo Portes
Subject: Re: svn server

Alfredo,

>Sorry about that. I instead added it in the svn repos of doyen
>that we were not using:
>
>svn co https://doyencd.svn.sourceforge.net/svnroot/doyencd/trunk/axserver
>axserver
>
>which you of course have access. Please let me know if this is ok
>with you. Give access to Arthur please if you can.

Arthur should be able to reach that without special handling.
I believe it is public by default.

\start
Date: Mon, 24 Sep 2007 01:00:39 -0400
From: Tim Daly
To: Arthur Ralfs
Subject: re: axserver and hyperdoc

Arthur, Thanks. I'll look at the code.

Alfredo, I will incorporate your style changes into the current 
axserver.pamphlet. I still have a few more proof-of-concept pages
that I want to do and then I'll upload the latest revision.

I have implemented the Basic Commands -> Matrix path and can create
dynamically sized matrices which took a fair amount of javascript but
it works well.  I do have to find the Math1..N fonts for firefox under
linux. Variable sized parens and brackets are not rendering due to fonts.

So far it seems that a browser-based hyperdoc replacement is a workable
path and it should be very portable (modulo figuring out how to get
lisp to handle a socket).

\start
Date: Mon, 24 Sep 2007 04:40:55 -0700 (PDT)
From: Cliff Yapp
To: Tim Daly, Arthur Ralfs
Subject: re: axserver and hyperdoc

--- Tim Daly wrote:

> I do have to find the Math1..N fonts for firefox
> under linux. Variable sized parens and brackets are 
> not rendering due to fonts.

I don't know if this will be immediately helpful, but the STIX project
is projecting a beta font release by the end of September so it might
be worth watching.  Past history with STIX release dates makes me
cautious but it sounds promising.

http://stixfonts.org/

\start
Date: Tue, 25 Sep 2007 10:19:19 -0700
From: Arthur Ralfs
To: Tim Daly
Subject: Re: Stylesheet

root wrote:
>> One of my longer term interests is more network awareness and parallelism
>> with Axiom.  For instance I imagine wanting to run axiom on a powerful
>> server and then connect to it from some other computer.  It might just
>> be that I'm running Axiom on my own server and connecting to it with my 
>> laptop.  In >that case though  don't we need to go through the server?
>>     
>
> When I have a quad or 16-way processor on my laptop I'm not sure what
> benefit a "powerful server" adds. I'm not even sure what "powerful
> server" might mean. Perhaps you could give more details about your 
> longer term view?
>   
That's true that laptops can be very powerful now-a-days however
desktops still give much more computing power for the buck.
Certainly running locally is fine in lots of cases but I would still like to
have the option of running over a network.

In my experience no matter how powerful the computer I can quite easily
bring it to a near standstill with a computationally intensive project.
For instance in the classical N-body problem it's just a question of making
N big enough.

> I do see parallelism being important to Axiom as I'd like to be able
> to handle both parallelism-in-the-small, e.g. matrix multiply and
> parallelism-in-the-large, multiple problem solutions or multiple
> non-algorithmic procedures, like magnus, which are not guaranteed
> to terminate. But I don't see the need for remote servers anymore.
>
>
>
> Another advantage of a local axiom is that I can see a person working
> on Axiom who does not know the syntax of a function (say, a laplace
> function call). In the middle of their session they could do )help
> laplace which would put them into a screen to construct the function
> call (see differentiate and matrix). They would construct their
> function call and it would be added to their workspace as it is under
> the current setup. Once they quit the )help they have already defined
> the function call. 
>
> Alternatively a user could make a new frame (see the )frame command)
> and do all of their )help browsing in a separate frame namespace so
> it does not impact their current work.
>
> The frame mechanism allows Axiom to support multiple namespaces of
> work and could probably be applied in a server environment.
>
>
>
> That said, I don't see any disconnect between the current test
> setup and a remote server. Instead of doing 
>   file:///...../rootpage.html
> you could certainly do
>   http://....../rootpage.html
> In fact, that would probably work now although I haven't tried it.
>   

As long as either option works I'm happy.
>
>
> If we want to widen this discussion perhaps we should journal it
> on the axiom-developer mailing list.

\start
Date: Tue, 25 Sep 2007 13:29:37 -0400
From: Tim Daly
To: Arthur Ralfs
Subject: Re: Stylesheet

>> That said, I don't see any disconnect between the current test
>> setup and a remote server. Instead of doing 
>>   file:///...../rootpage.html
>> you could certainly do
>>   http://....../rootpage.html
>> In fact, that would probably work now although I haven't tried it.
>>   
>
>As long as either option works I'm happy.

Ok. I'll test both paths.

\start
Date: Wed, 26 Sep 2007 10:42:53 -0400
From: Tim Daly
To: Camm Maguire
Subject: GCL-2.6.8pre cygwin

Camm,

I commented out the unixtime code and the define (per the mailing list)
and now I see:

========================================================================
$ ./configure
creating cache ./config.cache
checking host system type... i686-pc-cygwin
host=i686-pc-cygwin
enable_machine=
use=gnuwin95
checking for gcc... gcc
checking whether the C compiler (gcc    ) works... yes
checking whether the C compiler (gcc    ) is a cross-compiler... no
checking whether we are using GNU C... yes
checking whether gcc accepts -g... yes
checking how to run the C preprocessor... gcc -E
checking for gawk... gawk
checking system version (for dynamic loading)... checking for makeinfo... makeinfo
CYGWIN_NT-5.1-1.5.18(0.132/4/2)
checking for unistd.h... yes
checking for sysconf in -lc... yes
checking for _SC_CLK_TCK... 1000
checking for gmp.h... yes
checking for __gmpz_init in -lgmp... yes
checking for external gmp version... checking for leading underscore in object symbols... yes
checking for GNU ld option -Map... yes
checking for size of gmp limbs... 4
checking _SHORT_LIMB... no
checking _LONG_LONG_LIMB... no
checking for X... libraries /usr/X11R6/lib, headers /usr/X11R6/include
checking for dnet_ntoa in -ldnet... no
checking for dnet_ntoa in -ldnet_stub... no
checking for gethostbyname... yes
checking for connect... yes
checking for remove... yes
checking for shmat... yes
checking for IceConnectionNumber in -lICE... yes
-I/usr/X11R6/include
-L/usr/X11R6/lib

-lSM -lICE
checking for main in -lXmu... yes
checking for main in -lXt... yes
checking for main in -lXext... yes
checking for main in -lXaw... yes
checking for main in -lX11... yes
checking for bfd.h... yes
checking for bfd_init in -lbfd... yes
checking if need to define CONST for bfd... no
checking for useable bfd_boolean... yes
checking size of long... 4
checking sizeof struct contblock... 8
checking for endian.h... yes
checking endianness... big
checking for sbrk... yes
checking for randomized sbrk... no
checking for pagewidth... 12
checking finding DBEGIN... got 0x460000
checking finding CSTACK_ADDRESS... got 2289428
checking sizeof long long int... yes
checking for getcwd... yes
checking for getwd... yes
checking for uname... yes
checking for gettimeofday... yes
checking for sys/ioctl.h... yes
checking for elf.h... no
checking for elf_abi.h... no
checking for sys/sockio.h... no
checking for BSDgettimeofday... no
checking for gettimeofday... (cached) yes
checking for gettimeofday declaration... present
checking for sin in -lm... yes
checking for main in -lmingwex... no
checking for math.h... yes
checking for values.h... no
checking for float.h... yes
checking for isnormal... yes
checking for isfinite... yes
checking for sockets... checking for connect... (cached) yes
checking for gethostbyname... (cached) yes
checking for readline/readline.h... yes
checking for main in -lreadline... yes
checking for rl_completion_matches in -lreadline... yes
checking For network code for nsocket.c... yes
checking check for listen using fcntl... yes
checking for profil... no
checking for setenv... yes
checking for _cleanup... no
checking FIONBIO vs. O_NONBLOCK for nonblocking I/O... O_NONBLOCK
checking check for SV_ONSTACK... no
checking check for SIGSYS... yes
checking check for SIGEMT... yes
checking for asm/sigcontext.h... no
checking for asm/signal.h... no
checking for sigcontext...... sigcontext NOT in signal.h
checking for sigcontext...... no sigcontext found
checking for emacs... /usr/bin/emacs
checking emacs site lisp directory... NONE/share/emacs/site-lisp/
checking emacs default.el... ./default.el
checking emacs info/dir... NONE/share/info/
checking for tcl/tk... checking for tclsh... tclsh
checking for main in -llieee... no
not found
checking alloca... yes
checking Checking for buggy gcc version from redhat... no
updating cache ./config.cache
creating ./config.status
creating makedefc
creating windows/gcl.iss
creating windows/sysdir.bat
creating windows/install.lsp
creating h/gclincl.h
makedefc

# begin makedefs

# use=gnuwin95

# for main link of raw_gcl
LIBS=   -lSM -lICE  -L/usr/X11R6/lib -lXmu -lXt -lXext -lXaw -lX11    -lm  -lgmp -lbfd -liberty -lreadline -lncurses

#The multi precision library stuff
MPFILES=$(MPDIR)/@MPI_FILE@ $(MPDIR)/libmport.a


# root for the installation, eg /usr/local
# This would cause make install to create /usr/local/bin/gcl and
# /usr/local/lib/gcl-2-??/* with some basic files.
prefix=/usr/local

# where to place the info files
INFO_DIR=NONE/share/info/

# where to put emacs lisp files.
EMACS_SITE_LISP=NONE/share/emacs/site-lisp/

# the default.el file
EMACS_DEFAULT_EL=./default.el

# numerous TCL/TK variables culled from the tkConfig.sh and tclConfig.sh
# if these are found.
TK_CONFIG_PREFIX=
TK_LIBRARY=
TCL_LIBRARY=
TK_XINCLUDES=
TK_INCLUDE=
TCL_INCLUDE=
TK_LIB_SPEC=
TK_BUILD_LIB_SPEC=
TK_XLIBSW=
TK_XINCLUDES=
TCL_LIB_SPEC=
TCL_DL_LIBS=
TCL_LIBS=

NOTIFY=yes
CC=gcc
CFLAGS=  -Wall -DVOL=volatile -fsigned-char -pipe -O3 -fomit-frame-pointer  -I$(GCLDIR)/o
FINAL_CFLAGS=   -I/usr/X11R6/include -Wall -DVOL=volatile -fsigned-char -pipe 
NIFLAGS=  -Wall -DVOL=volatile -fsigned-char -pipe   -I$(GCLDIR)/o
O3FLAGS=-O3 -fomit-frame-pointer
O2FLAGS=-O

RL_OBJS=gcl_readline.o

RL_LIB=

MAKEINFO=makeinfo

FLISP=saved_gcl
SYSTEM=gcl
BUILD_BFD=
GMPDIR=gmp3
X_LIBS= -L/usr/X11R6/lib -lXmu -lXt -lXext -lXaw -lX11
X_CFLAGS= -I/usr/X11R6/include

PROCESSOR_FLAGS=

EXTRA_LOBJS=
LEADING_UNDERSCORE=1
GNU_LD=1
AWK=gawk
add-defs1 gnuwin95
using gnuwin95.defs
]0;~/gcl-2_6_8pre
[32mdaly@deadbeef [33m~/gcl-2_6_8pre[0m
$ make
(cd o && make ../h/new_decl.h)
make[1]: Entering directory `/cygdrive/c/daly/home/gcl-2_6_8pre/o'
gcc  -fwritable-strings  -DVOL=volatile  -I/cygdrive/c/daly/home/gcl-2_6_8pre/o -fsigned-char  -o grab_defs  grab_defs.c
cc1: note: -fwritable-strings is deprecated; see documentation for details
gcc  -fwritable-strings  -DVOL=volatile  -I/cygdrive/c/daly/home/gcl-2_6_8pre/o -fsigned-char -c -Wall -DVOL=volatile -fsigned-char -pipe -O3 -fomit-frame-pointer  -I/cygdrive/c/daly/home/gcl-2_6_8pre/o -I../h -I../gcl-tk plttest.c  
cc1: note: -fwritable-strings is deprecated; see documentation for details
plttest.c: In function `main':
plttest.c:19: warning: statement with no effect
nm plttest.o | gawk '/ U / {a=$2;if (k) sub("^_","",a);\
                            print a}' \
		k=1 |\
		sort | \
		grep -v 'restFP' | grep -v 'saveFP' | \
		grep -v '[^ \t_]_' |\
		gawk '{A[++k]=$0} END {for (i=1;i<=k;i++) \
			printf("MY_PLT(%s)%s\n",A[i],i==k ? "" : ",");}' >plt.h
[ -e ../h/new_decl.h ] || touch ../h/new_decl.h
gcc  -fwritable-strings  -DVOL=volatile  -I/cygdrive/c/daly/home/gcl-2_6_8pre/o -fsigned-char -DNO_DEFUN -Wall -DVOL=volatile -fsigned-char -pipe -O3 -fomit-frame-pointer  -I/cygdrive/c/daly/home/gcl-2_6_8pre/o -I../h -I../gcl-tk -E main.c | sed -e 's:\"[ ]*):\"):g' | ./grab_defs > main.ini
cc1: note: -fwritable-strings is deprecated; see documentation for details
[ -e ../h/new_decl.h ] || touch ../h/new_decl.h
gcc  -fwritable-strings  -DVOL=volatile  -I/cygdrive/c/daly/home/gcl-2_6_8pre/o -fsigned-char -DNO_DEFUN -Wall -DVOL=volatile -fsigned-char -pipe -O3 -fomit-frame-pointer  -I/cygdrive/c/daly/home/gcl-2_6_8pre/o -I../h -I../gcl-tk -E alloc.c | sed -e 's:\"[ ]*):\"):g' | ./grab_defs > alloc.ini
cc1: note: -fwritable-strings is deprecated; see documentation for details
[ -e ../h/new_decl.h ] || touch ../h/new_decl.h
gcc  -fwritable-strings  -DVOL=volatile  -I/cygdrive/c/daly/home/gcl-2_6_8pre/o -fsigned-char -DNO_DEFUN -Wall -DVOL=volatile -fsigned-char -pipe -O3 -fomit-frame-pointer  -I/cygdrive/c/daly/home/gcl-2_6_8pre/o -I../h -I../gcl-tk -E gbc.c | sed -e 's:\"[ ]*):\"):g' | ./grab_defs > gbc.ini
cc1: note: -fwritable-strings is deprecated; see documentation for details
[ -e ../h/new_decl.h ] || touch ../h/new_decl.h
gcc  -fwritable-strings  -DVOL=volatile  -I/cygdrive/c/daly/home/gcl-2_6_8pre/o -fsigned-char -DNO_DEFUN -Wall -DVOL=volatile -fsigned-char -pipe -O3 -fomit-frame-pointer  -I/cygdrive/c/daly/home/gcl-2_6_8pre/o -I../h -I../gcl-tk -E bitop.c | sed -e 's:\"[ ]*):\"):g' | ./grab_defs > bitop.ini
cc1: note: -fwritable-strings is deprecated; see documentation for details
[ -e ../h/new_decl.h ] || touch ../h/new_decl.h
gcc  -fwritable-strings  -DVOL=volatile  -I/cygdrive/c/daly/home/gcl-2_6_8pre/o -fsigned-char -DNO_DEFUN -Wall -DVOL=volatile -fsigned-char -pipe -O3 -fomit-frame-pointer  -I/cygdrive/c/daly/home/gcl-2_6_8pre/o -I../h -I../gcl-tk -E typespec.c | sed -e 's:\"[ ]*):\"):g' | ./grab_defs > typespec.ini
cc1: note: -fwritable-strings is deprecated; see documentation for details
[ -e ../h/new_decl.h ] || touch ../h/new_decl.h
gcc  -fwritable-strings  -DVOL=volatile  -I/cygdrive/c/daly/home/gcl-2_6_8pre/o -fsigned-char -DNO_DEFUN -Wall -DVOL=volatile -fsigned-char -pipe -O3 -fomit-frame-pointer  -I/cygdrive/c/daly/home/gcl-2_6_8pre/o -I../h -I../gcl-tk -E eval.c | sed -e 's:\"[ ]*):\"):g' | ./grab_defs > eval.ini
cc1: note: -fwritable-strings is deprecated; see documentation for details
[ -e ../h/new_decl.h ] || touch ../h/new_decl.h
gcc  -fwritable-strings  -DVOL=volatile  -I/cygdrive/c/daly/home/gcl-2_6_8pre/o -fsigned-char -DNO_DEFUN -Wall -DVOL=volatile -fsigned-char -pipe -O3 -fomit-frame-pointer  -I/cygdrive/c/daly/home/gcl-2_6_8pre/o -I../h -I../gcl-tk -E macros.c | sed -e 's:\"[ ]*):\"):g' | ./grab_defs > macros.ini
cc1: note: -fwritable-strings is deprecated; see documentation for details
[ -e ../h/new_decl.h ] || touch ../h/new_decl.h
gcc  -fwritable-strings  -DVOL=volatile  -I/cygdrive/c/daly/home/gcl-2_6_8pre/o -fsigned-char -DNO_DEFUN -Wall -DVOL=volatile -fsigned-char -pipe -O3 -fomit-frame-pointer  -I/cygdrive/c/daly/home/gcl-2_6_8pre/o -I../h -I../gcl-tk -E lex.c | sed -e 's:\"[ ]*):\"):g' | ./grab_defs > lex.ini
cc1: note: -fwritable-strings is deprecated; see documentation for details
[ -e ../h/new_decl.h ] || touch ../h/new_decl.h
gcc  -fwritable-strings  -DVOL=volatile  -I/cygdrive/c/daly/home/gcl-2_6_8pre/o -fsigned-char -DNO_DEFUN -Wall -DVOL=volatile -fsigned-char -pipe -O3 -fomit-frame-pointer  -I/cygdrive/c/daly/home/gcl-2_6_8pre/o -I../h -I../gcl-tk -E bds.c | sed -e 's:\"[ ]*):\"):g' | ./grab_defs > bds.ini
cc1: note: -fwritable-strings is deprecated; see documentation for details
[ -e ../h/new_decl.h ] || touch ../h/new_decl.h
gcc  -fwritable-strings  -DVOL=volatile  -I/cygdrive/c/daly/home/gcl-2_6_8pre/o -fsigned-char -DNO_DEFUN -Wall -DVOL=volatile -fsigned-char -pipe -O3 -fomit-frame-pointer  -I/cygdrive/c/daly/home/gcl-2_6_8pre/o -I../h -I../gcl-tk -E frame.c | sed -e 's:\"[ ]*):\"):g' | ./grab_defs > frame.ini
cc1: note: -fwritable-strings is deprecated; see documentation for details
[ -e ../h/new_decl.h ] || touch ../h/new_decl.h
gcc  -fwritable-strings  -DVOL=volatile  -I/cygdrive/c/daly/home/gcl-2_6_8pre/o -fsigned-char -DNO_DEFUN -Wall -DVOL=volatile -fsigned-char -pipe -O3 -fomit-frame-pointer  -I/cygdrive/c/daly/home/gcl-2_6_8pre/o -I../h -I../gcl-tk -E predicate.c | sed -e 's:\"[ ]*):\"):g' | ./grab_defs > predicate.ini
cc1: note: -fwritable-strings is deprecated; see documentation for details
[ -e ../h/new_decl.h ] || touch ../h/new_decl.h
gcc  -fwritable-strings  -DVOL=volatile  -I/cygdrive/c/daly/home/gcl-2_6_8pre/o -fsigned-char -DNO_DEFUN -Wall -DVOL=volatile -fsigned-char -pipe -O3 -fomit-frame-pointer  -I/cygdrive/c/daly/home/gcl-2_6_8pre/o -I../h -I../gcl-tk -E reference.c | sed -e 's:\"[ ]*):\"):g' | ./grab_defs > reference.ini
cc1: note: -fwritable-strings is deprecated; see documentation for details
[ -e ../h/new_decl.h ] || touch ../h/new_decl.h
gcc  -fwritable-strings  -DVOL=volatile  -I/cygdrive/c/daly/home/gcl-2_6_8pre/o -fsigned-char -DNO_DEFUN -Wall -DVOL=volatile -fsigned-char -pipe -O3 -fomit-frame-pointer  -I/cygdrive/c/daly/home/gcl-2_6_8pre/o -I../h -I../gcl-tk -E assignment.c | sed -e 's:\"[ ]*):\"):g' | ./grab_defs > assignment.ini
cc1: note: -fwritable-strings is deprecated; see documentation for details
[ -e ../h/new_decl.h ] || touch ../h/new_decl.h
gcc  -fwritable-strings  -DVOL=volatile  -I/cygdrive/c/daly/home/gcl-2_6_8pre/o -fsigned-char -DNO_DEFUN -Wall -DVOL=volatile -fsigned-char -pipe -O3 -fomit-frame-pointer  -I/cygdrive/c/daly/home/gcl-2_6_8pre/o -I../h -I../gcl-tk -E bind.c | sed -e 's:\"[ ]*):\"):g' | ./grab_defs > bind.ini
cc1: note: -fwritable-strings is deprecated; see documentation for details
[ -e ../h/new_decl.h ] || touch ../h/new_decl.h
gcc  -fwritable-strings  -DVOL=volatile  -I/cygdrive/c/daly/home/gcl-2_6_8pre/o -fsigned-char -DNO_DEFUN -Wall -DVOL=volatile -fsigned-char -pipe -O3 -fomit-frame-pointer  -I/cygdrive/c/daly/home/gcl-2_6_8pre/o -I../h -I../gcl-tk -E let.c | sed -e 's:\"[ ]*):\"):g' | ./grab_defs > let.ini
cc1: note: -fwritable-strings is deprecated; see documentation for details
[ -e ../h/new_decl.h ] || touch ../h/new_decl.h
gcc  -fwritable-strings  -DVOL=volatile  -I/cygdrive/c/daly/home/gcl-2_6_8pre/o -fsigned-char -DNO_DEFUN -Wall -DVOL=volatile -fsigned-char -pipe -O3 -fomit-frame-pointer  -I/cygdrive/c/daly/home/gcl-2_6_8pre/o -I../h -I../gcl-tk -E conditional.c | sed -e 's:\"[ ]*):\"):g' | ./grab_defs > conditional.ini
cc1: note: -fwritable-strings is deprecated; see documentation for details
[ -e ../h/new_decl.h ] || touch ../h/new_decl.h
gcc  -fwritable-strings  -DVOL=volatile  -I/cygdrive/c/daly/home/gcl-2_6_8pre/o -fsigned-char -DNO_DEFUN -Wall -DVOL=volatile -fsigned-char -pipe -O3 -fomit-frame-pointer  -I/cygdrive/c/daly/home/gcl-2_6_8pre/o -I../h -I../gcl-tk -E block.c | sed -e 's:\"[ ]*):\"):g' | ./grab_defs > block.ini
cc1: note: -fwritable-strings is deprecated; see documentation for details
[ -e ../h/new_decl.h ] || touch ../h/new_decl.h
gcc  -fwritable-strings  -DVOL=volatile  -I/cygdrive/c/daly/home/gcl-2_6_8pre/o -fsigned-char -DNO_DEFUN -Wall -DVOL=volatile -fsigned-char -pipe -O3 -fomit-frame-pointer  -I/cygdrive/c/daly/home/gcl-2_6_8pre/o -I../h -I../gcl-tk -E iteration.c | sed -e 's:\"[ ]*):\"):g' | ./grab_defs > iteration.ini
cc1: note: -fwritable-strings is deprecated; see documentation for details
[ -e ../h/new_decl.h ] || touch ../h/new_decl.h
gcc  -fwritable-strings  -DVOL=volatile  -I/cygdrive/c/daly/home/gcl-2_6_8pre/o -fsigned-char -DNO_DEFUN -Wall -DVOL=volatile -fsigned-char -pipe -O3 -fomit-frame-pointer  -I/cygdrive/c/daly/home/gcl-2_6_8pre/o -I../h -I../gcl-tk -E mapfun.c | sed -e 's:\"[ ]*):\"):g' | ./grab_defs > mapfun.ini
cc1: note: -fwritable-strings is deprecated; see documentation for details
[ -e ../h/new_decl.h ] || touch ../h/new_decl.h
gcc  -fwritable-strings  -DVOL=volatile  -I/cygdrive/c/daly/home/gcl-2_6_8pre/o -fsigned-char -DNO_DEFUN -Wall -DVOL=volatile -fsigned-char -pipe -O3 -fomit-frame-pointer  -I/cygdrive/c/daly/home/gcl-2_6_8pre/o -I../h -I../gcl-tk -E prog.c | sed -e 's:\"[ ]*):\"):g' | ./grab_defs > prog.ini
cc1: note: -fwritable-strings is deprecated; see documentation for details
[ -e ../h/new_decl.h ] || touch ../h/new_decl.h
gcc  -fwritable-strings  -DVOL=volatile  -I/cygdrive/c/daly/home/gcl-2_6_8pre/o -fsigned-char -DNO_DEFUN -Wall -DVOL=volatile -fsigned-char -pipe -O3 -fomit-frame-pointer  -I/cygdrive/c/daly/home/gcl-2_6_8pre/o -I../h -I../gcl-tk -E multival.c | sed -e 's:\"[ ]*):\"):g' | ./grab_defs > multival.ini
cc1: note: -fwritable-strings is deprecated; see documentation for details
[ -e ../h/new_decl.h ] || touch ../h/new_decl.h
gcc  -fwritable-strings  -DVOL=volatile  -I/cygdrive/c/daly/home/gcl-2_6_8pre/o -fsigned-char -DNO_DEFUN -Wall -DVOL=volatile -fsigned-char -pipe -O3 -fomit-frame-pointer  -I/cygdrive/c/daly/home/gcl-2_6_8pre/o -I../h -I../gcl-tk -E catch.c | sed -e 's:\"[ ]*):\"):g' | ./grab_defs > catch.ini
cc1: note: -fwritable-strings is deprecated; see documentation for details
gcc  -fwritable-strings  -DVOL=volatile  -I/cygdrive/c/daly/home/gcl-2_6_8pre/o -fsigned-char -I../h -I../gcl-tk -o ../bin/dpp.exe ../bin/dpp.c
cc1: note: -fwritable-strings is deprecated; see documentation for details
[ -e ../h/new_decl.h ] || touch ../h/new_decl.h
../bin/dpp.exe symbol
dpp: symbol.d -> symbol.c
./grab_defs < symbol.c > symbol.ini
rm symbol.c
[ -e ../h/new_decl.h ] || touch ../h/new_decl.h
gcc  -fwritable-strings  -DVOL=volatile  -I/cygdrive/c/daly/home/gcl-2_6_8pre/o -fsigned-char -DNO_DEFUN -Wall -DVOL=volatile -fsigned-char -pipe -O3 -fomit-frame-pointer  -I/cygdrive/c/daly/home/gcl-2_6_8pre/o -I../h -I../gcl-tk -E cfun.c | sed -e 's:\"[ ]*):\"):g' | ./grab_defs > cfun.ini
cc1: note: -fwritable-strings is deprecated; see documentation for details
[ -e ../h/new_decl.h ] || touch ../h/new_decl.h
gcc  -fwritable-strings  -DVOL=volatile  -I/cygdrive/c/daly/home/gcl-2_6_8pre/o -fsigned-char -DNO_DEFUN -Wall -DVOL=volatile -fsigned-char -pipe -O3 -fomit-frame-pointer  -I/cygdrive/c/daly/home/gcl-2_6_8pre/o -I../h -I../gcl-tk -E cmpaux.c | sed -e 's:\"[ ]*):\"):g' | ./grab_defs > cmpaux.ini
cc1: note: -fwritable-strings is deprecated; see documentation for details
[ -e ../h/new_decl.h ] || touch ../h/new_decl.h
../bin/dpp.exe package
dpp: package.d -> package.c
./grab_defs < package.c > package.ini
rm package.c
[ -e ../h/new_decl.h ] || touch ../h/new_decl.h
gcc  -fwritable-strings  -DVOL=volatile  -I/cygdrive/c/daly/home/gcl-2_6_8pre/o -fsigned-char -DNO_DEFUN -Wall -DVOL=volatile -fsigned-char -pipe -O3 -fomit-frame-pointer  -I/cygdrive/c/daly/home/gcl-2_6_8pre/o -I../h -I../gcl-tk -E big.c | sed -e 's:\"[ ]*):\"):g' | ./grab_defs > big.ini
cc1: note: -fwritable-strings is deprecated; see documentation for details
[ -e ../h/new_decl.h ] || touch ../h/new_decl.h
gcc  -fwritable-strings  -DVOL=volatile  -I/cygdrive/c/daly/home/gcl-2_6_8pre/o -fsigned-char -DNO_DEFUN -Wall -DVOL=volatile -fsigned-char -pipe -O3 -fomit-frame-pointer  -I/cygdrive/c/daly/home/gcl-2_6_8pre/o -I../h -I../gcl-tk -E number.c | sed -e 's:\"[ ]*):\"):g' | ./grab_defs > number.ini
cc1: note: -fwritable-strings is deprecated; see documentation for details
[ -e ../h/new_decl.h ] || touch ../h/new_decl.h
gcc  -fwritable-strings  -DVOL=volatile  -I/cygdrive/c/daly/home/gcl-2_6_8pre/o -fsigned-char -DNO_DEFUN -Wall -DVOL=volatile -fsigned-char -pipe -O3 -fomit-frame-pointer  -I/cygdrive/c/daly/home/gcl-2_6_8pre/o -I../h -I../gcl-tk -E num_pred.c | sed -e 's:\"[ ]*):\"):g' | ./grab_defs > num_pred.ini
cc1: note: -fwritable-strings is deprecated; see documentation for details
[ -e ../h/new_decl.h ] || touch ../h/new_decl.h
gcc  -fwritable-strings  -DVOL=volatile  -I/cygdrive/c/daly/home/gcl-2_6_8pre/o -fsigned-char -DNO_DEFUN -Wall -DVOL=volatile -fsigned-char -pipe -O3 -fomit-frame-pointer  -I/cygdrive/c/daly/home/gcl-2_6_8pre/o -I../h -I../gcl-tk -E num_comp.c | sed -e 's:\"[ ]*):\"):g' | ./grab_defs > num_comp.ini
cc1: note: -fwritable-strings is deprecated; see documentation for details
[ -e ../h/new_decl.h ] || touch ../h/new_decl.h
gcc  -fwritable-strings  -DVOL=volatile  -I/cygdrive/c/daly/home/gcl-2_6_8pre/o -fsigned-char -DNO_DEFUN -Wall -DVOL=volatile -fsigned-char -pipe -O3 -fomit-frame-pointer  -I/cygdrive/c/daly/home/gcl-2_6_8pre/o -I../h -I../gcl-tk -E num_arith.c | sed -e 's:\"[ ]*):\"):g' | ./grab_defs > num_arith.ini
cc1: note: -fwritable-strings is deprecated; see documentation for details
[ -e ../h/new_decl.h ] || touch ../h/new_decl.h
gcc  -fwritable-strings  -DVOL=volatile  -I/cygdrive/c/daly/home/gcl-2_6_8pre/o -fsigned-char -DNO_DEFUN -Wall -DVOL=volatile -fsigned-char -pipe -O3 -fomit-frame-pointer  -I/cygdrive/c/daly/home/gcl-2_6_8pre/o -I../h -I../gcl-tk -E num_sfun.c | sed -e 's:\"[ ]*):\"):g' | ./grab_defs > num_sfun.ini
cc1: note: -fwritable-strings is deprecated; see documentation for details
[ -e ../h/new_decl.h ] || touch ../h/new_decl.h
gcc  -fwritable-strings  -DVOL=volatile  -I/cygdrive/c/daly/home/gcl-2_6_8pre/o -fsigned-char -DNO_DEFUN -Wall -DVOL=volatile -fsigned-char -pipe -O3 -fomit-frame-pointer  -I/cygdrive/c/daly/home/gcl-2_6_8pre/o -I../h -I../gcl-tk -E num_co.c | sed -e 's:\"[ ]*):\"):g' | ./grab_defs > num_co.ini
cc1: note: -fwritable-strings is deprecated; see documentation for details
[ -e ../h/new_decl.h ] || touch ../h/new_decl.h
gcc  -fwritable-strings  -DVOL=volatile  -I/cygdrive/c/daly/home/gcl-2_6_8pre/o -fsigned-char -DNO_DEFUN -Wall -DVOL=volatile -fsigned-char -pipe -O3 -fomit-frame-pointer  -I/cygdrive/c/daly/home/gcl-2_6_8pre/o -I../h -I../gcl-tk -E num_log.c | sed -e 's:\"[ ]*):\"):g' | ./grab_defs > num_log.ini
cc1: note: -fwritable-strings is deprecated; see documentation for details
[ -e ../h/new_decl.h ] || touch ../h/new_decl.h
gcc  -fwritable-strings  -DVOL=volatile  -I/cygdrive/c/daly/home/gcl-2_6_8pre/o -fsigned-char -DNO_DEFUN -Wall -DVOL=volatile -fsigned-char -pipe -O3 -fomit-frame-pointer  -I/cygdrive/c/daly/home/gcl-2_6_8pre/o -I../h -I../gcl-tk -E num_rand.c | sed -e 's:\"[ ]*):\"):g' | ./grab_defs > num_rand.ini
cc1: note: -fwritable-strings is deprecated; see documentation for details
[ -e ../h/new_decl.h ] || touch ../h/new_decl.h
gcc  -fwritable-strings  -DVOL=volatile  -I/cygdrive/c/daly/home/gcl-2_6_8pre/o -fsigned-char -DNO_DEFUN -Wall -DVOL=volatile -fsigned-char -pipe -O3 -fomit-frame-pointer  -I/cygdrive/c/daly/home/gcl-2_6_8pre/o -I../h -I../gcl-tk -E earith.c | sed -e 's:\"[ ]*):\"):g' | ./grab_defs > earith.ini
cc1: note: -fwritable-strings is deprecated; see documentation for details
[ -e ../h/new_decl.h ] || touch ../h/new_decl.h
../bin/dpp.exe character
dpp: character.d -> character.c
./grab_defs < character.c > character.ini
rm character.c
[ -e ../h/new_decl.h ] || touch ../h/new_decl.h
../bin/dpp.exe sequence
dpp: sequence.d -> sequence.c
./grab_defs < sequence.c > sequence.ini
rm sequence.c
[ -e ../h/new_decl.h ] || touch ../h/new_decl.h
../bin/dpp.exe list
dpp: list.d -> list.c
./grab_defs < list.c > list.ini
rm list.c
[ -e ../h/new_decl.h ] || touch ../h/new_decl.h
../bin/dpp.exe hash
dpp: hash.d -> hash.c
./grab_defs < hash.c > hash.ini
rm hash.c
[ -e ../h/new_decl.h ] || touch ../h/new_decl.h
gcc  -fwritable-strings  -DVOL=volatile  -I/cygdrive/c/daly/home/gcl-2_6_8pre/o -fsigned-char -DNO_DEFUN -Wall -DVOL=volatile -fsigned-char -pipe -O3 -fomit-frame-pointer  -I/cygdrive/c/daly/home/gcl-2_6_8pre/o -I../h -I../gcl-tk -E array.c | sed -e 's:\"[ ]*):\"):g' | ./grab_defs > array.ini
cc1: note: -fwritable-strings is deprecated; see documentation for details
[ -e ../h/new_decl.h ] || touch ../h/new_decl.h
../bin/dpp.exe string
dpp: string.d -> string.c
./grab_defs < string.c > string.ini
rm string.c
[ -e ../h/new_decl.h ] || touch ../h/new_decl.h
gcc  -fwritable-strings  -DVOL=volatile  -I/cygdrive/c/daly/home/gcl-2_6_8pre/o -fsigned-char -DNO_DEFUN -Wall -DVOL=volatile -fsigned-char -pipe -O3 -fomit-frame-pointer  -I/cygdrive/c/daly/home/gcl-2_6_8pre/o -I../h -I../gcl-tk -E regexpr.c | sed -e 's:\"[ ]*):\"):g' | ./grab_defs > regexpr.ini
cc1: note: -fwritable-strings is deprecated; see documentation for details
[ -e ../h/new_decl.h ] || touch ../h/new_decl.h
gcc  -fwritable-strings  -DVOL=volatile  -I/cygdrive/c/daly/home/gcl-2_6_8pre/o -fsigned-char -DNO_DEFUN -Wall -DVOL=volatile -fsigned-char -pipe -O3 -fomit-frame-pointer  -I/cygdrive/c/daly/home/gcl-2_6_8pre/o -I../h -I../gcl-tk -E structure.c | sed -e 's:\"[ ]*):\"):g' | ./grab_defs > structure.ini
cc1: note: -fwritable-strings is deprecated; see documentation for details
[ -e ../h/new_decl.h ] || touch ../h/new_decl.h
gcc  -fwritable-strings  -DVOL=volatile  -I/cygdrive/c/daly/home/gcl-2_6_8pre/o -fsigned-char -DNO_DEFUN -Wall -DVOL=volatile -fsigned-char -pipe -O3 -fomit-frame-pointer  -I/cygdrive/c/daly/home/gcl-2_6_8pre/o -I../h -I../gcl-tk -E toplevel.c | sed -e 's:\"[ ]*):\"):g' | ./grab_defs > toplevel.ini
cc1: note: -fwritable-strings is deprecated; see documentation for details
[ -e ../h/new_decl.h ] || touch ../h/new_decl.h
../bin/dpp.exe file
dpp: file.d -> file.c
./grab_defs < file.c > file.ini
rm file.c
[ -e ../h/new_decl.h ] || touch ../h/new_decl.h
../bin/dpp.exe read
dpp: read.d -> read.c
./grab_defs < read.c > read.ini
rm read.c
[ -e ../h/new_decl.h ] || touch ../h/new_decl.h
gcc  -fwritable-strings  -DVOL=volatile  -I/cygdrive/c/daly/home/gcl-2_6_8pre/o -fsigned-char -DNO_DEFUN -Wall -DVOL=volatile -fsigned-char -pipe -O3 -fomit-frame-pointer  -I/cygdrive/c/daly/home/gcl-2_6_8pre/o -I../h -I../gcl-tk -E backq.c | sed -e 's:\"[ ]*):\"):g' | ./grab_defs > backq.ini
cc1: note: -fwritable-strings is deprecated; see documentation for details
[ -e ../h/new_decl.h ] || touch ../h/new_decl.h
../bin/dpp.exe print
dpp: print.d -> print.c
./grab_defs < print.c > print.ini
rm print.c
[ -e ../h/new_decl.h ] || touch ../h/new_decl.h
gcc  -fwritable-strings  -DVOL=volatile  -I/cygdrive/c/daly/home/gcl-2_6_8pre/o -fsigned-char -DNO_DEFUN -Wall -DVOL=volatile -fsigned-char -pipe -O3 -fomit-frame-pointer  -I/cygdrive/c/daly/home/gcl-2_6_8pre/o -I../h -I../gcl-tk -E format.c | sed -e 's:\"[ ]*):\"):g' | ./grab_defs > format.ini
cc1: note: -fwritable-strings is deprecated; see documentation for details
[ -e ../h/new_decl.h ] || touch ../h/new_decl.h
../bin/dpp.exe pathname
dpp: pathname.d -> pathname.c
./grab_defs < pathname.c > pathname.ini
rm pathname.c
[ -e ../h/new_decl.h ] || touch ../h/new_decl.h
gcc  -fwritable-strings  -DVOL=volatile  -I/cygdrive/c/daly/home/gcl-2_6_8pre/o -fsigned-char -DNO_DEFUN -Wall -DVOL=volatile -fsigned-char -pipe -O3 -fomit-frame-pointer  -I/cygdrive/c/daly/home/gcl-2_6_8pre/o -I../h -I../gcl-tk -E unixfsys.c | sed -e 's:\"[ ]*):\"):g' | ./grab_defs > unixfsys.ini
cc1: note: -fwritable-strings is deprecated; see documentation for details
[ -e ../h/new_decl.h ] || touch ../h/new_decl.h
gcc  -fwritable-strings  -DVOL=volatile  -I/cygdrive/c/daly/home/gcl-2_6_8pre/o -fsigned-char -DNO_DEFUN -Wall -DVOL=volatile -fsigned-char -pipe -O3 -fomit-frame-pointer  -I/cygdrive/c/daly/home/gcl-2_6_8pre/o -I../h -I../gcl-tk -E unixfasl.c | sed -e 's:\"[ ]*):\"):g' | ./grab_defs > unixfasl.ini
cc1: note: -fwritable-strings is deprecated; see documentation for details
[ -e ../h/new_decl.h ] || touch ../h/new_decl.h
gcc  -fwritable-strings  -DVOL=volatile  -I/cygdrive/c/daly/home/gcl-2_6_8pre/o -fsigned-char -DNO_DEFUN -Wall -DVOL=volatile -fsigned-char -pipe -O3 -fomit-frame-pointer  -I/cygdrive/c/daly/home/gcl-2_6_8pre/o -I../h -I../gcl-tk -E error.c | sed -e 's:\"[ ]*):\"):g' | ./grab_defs > error.ini
cc1: note: -fwritable-strings is deprecated; see documentation for details
[ -e ../h/new_decl.h ] || touch ../h/new_decl.h
gcc  -fwritable-strings  -DVOL=volatile  -I/cygdrive/c/daly/home/gcl-2_6_8pre/o -fsigned-char -DNO_DEFUN -Wall -DVOL=volatile -fsigned-char -pipe -O3 -fomit-frame-pointer  -I/cygdrive/c/daly/home/gcl-2_6_8pre/o -I../h -I../gcl-tk -E unixtime.c | sed -e 's:\"[ ]*):\"):g' | ./grab_defs > unixtime.ini
cc1: note: -fwritable-strings is deprecated; see documentation for details
[ -e ../h/new_decl.h ] || touch ../h/new_decl.h
gcc  -fwritable-strings  -DVOL=volatile  -I/cygdrive/c/daly/home/gcl-2_6_8pre/o -fsigned-char -DNO_DEFUN -Wall -DVOL=volatile -fsigned-char -pipe -O3 -fomit-frame-pointer  -I/cygdrive/c/daly/home/gcl-2_6_8pre/o -I../h -I../gcl-tk -E unixsys.c | sed -e 's:\"[ ]*):\"):g' | ./grab_defs > unixsys.ini
cc1: note: -fwritable-strings is deprecated; see documentation for details
[ -e ../h/new_decl.h ] || touch ../h/new_decl.h
gcc  -fwritable-strings  -DVOL=volatile  -I/cygdrive/c/daly/home/gcl-2_6_8pre/o -fsigned-char -DNO_DEFUN -Wall -DVOL=volatile -fsigned-char -pipe -O3 -fomit-frame-pointer  -I/cygdrive/c/daly/home/gcl-2_6_8pre/o -I../h -I../gcl-tk -E unixsave.c | sed -e 's:\"[ ]*):\"):g' | ./grab_defs > unixsave.ini
cc1: note: -fwritable-strings is deprecated; see documentation for details
In file included from unexnt.c:24,
                 from unixsave.c:32:
../h/gclincl.h:13:1: warning: "DBEGIN" redefined
In file included from ../h/include.h:37,
                 from unixsave.c:28:
../h/config.h:8:1: warning: this is the location of the previous definition
[ -e ../h/new_decl.h ] || touch ../h/new_decl.h
gcc  -fwritable-strings  -DVOL=volatile  -I/cygdrive/c/daly/home/gcl-2_6_8pre/o -fsigned-char -DNO_DEFUN -Wall -DVOL=volatile -fsigned-char -pipe -O3 -fomit-frame-pointer  -I/cygdrive/c/daly/home/gcl-2_6_8pre/o -I../h -I../gcl-tk -E funlink.c | sed -e 's:\"[ ]*):\"):g' | ./grab_defs > funlink.ini
cc1: note: -fwritable-strings is deprecated; see documentation for details
[ -e ../h/new_decl.h ] || touch ../h/new_decl.h
gcc  -fwritable-strings  -DVOL=volatile  -I/cygdrive/c/daly/home/gcl-2_6_8pre/o -fsigned-char -DNO_DEFUN -Wall -DVOL=volatile -fsigned-char -pipe -O3 -fomit-frame-pointer  -I/cygdrive/c/daly/home/gcl-2_6_8pre/o -I../h -I../gcl-tk -E plt.c | sed -e 's:\"[ ]*):\"):g' | ./grab_defs > plt.ini
cc1: note: -fwritable-strings is deprecated; see documentation for details
[ -e ../h/new_decl.h ] || touch ../h/new_decl.h
gcc  -fwritable-strings  -DVOL=volatile  -I/cygdrive/c/daly/home/gcl-2_6_8pre/o -fsigned-char -DNO_DEFUN -Wall -DVOL=volatile -fsigned-char -pipe -O3 -fomit-frame-pointer  -I/cygdrive/c/daly/home/gcl-2_6_8pre/o -I../h -I../gcl-tk -E fat_string.c | sed -e 's:\"[ ]*):\"):g' | ./grab_defs > fat_string.ini
cc1: note: -fwritable-strings is deprecated; see documentation for details
[ -e ../h/new_decl.h ] || touch ../h/new_decl.h
gcc  -fwritable-strings  -DVOL=volatile  -I/cygdrive/c/daly/home/gcl-2_6_8pre/o -fsigned-char -DNO_DEFUN -Wall -DVOL=volatile -fsigned-char -pipe -O3 -fomit-frame-pointer  -I/cygdrive/c/daly/home/gcl-2_6_8pre/o -I../h -I../gcl-tk -E run_process.c | sed -e 's:\"[ ]*):\"):g' | ./grab_defs > run_process.ini
cc1: note: -fwritable-strings is deprecated; see documentation for details
[ -e ../h/new_decl.h ] || touch ../h/new_decl.h
gcc  -fwritable-strings  -DVOL=volatile  -I/cygdrive/c/daly/home/gcl-2_6_8pre/o -fsigned-char -DNO_DEFUN -Wall -DVOL=volatile -fsigned-char -pipe -O3 -fomit-frame-pointer  -I/cygdrive/c/daly/home/gcl-2_6_8pre/o -I../h -I../gcl-tk -E nfunlink.c | sed -e 's:\"[ ]*):\"):g' | ./grab_defs > nfunlink.ini
cc1: note: -fwritable-strings is deprecated; see documentation for details
[ -e ../h/new_decl.h ] || touch ../h/new_decl.h
gcc  -fwritable-strings  -DVOL=volatile  -I/cygdrive/c/daly/home/gcl-2_6_8pre/o -fsigned-char -DNO_DEFUN -Wall -DVOL=volatile -fsigned-char -pipe -O3 -fomit-frame-pointer  -I/cygdrive/c/daly/home/gcl-2_6_8pre/o -I../h -I../gcl-tk -E usig.c | sed -e 's:\"[ ]*):\"):g' | ./grab_defs > usig.ini
cc1: note: -fwritable-strings is deprecated; see documentation for details
[ -e ../h/new_decl.h ] || touch ../h/new_decl.h
gcc  -fwritable-strings  -DVOL=volatile  -I/cygdrive/c/daly/home/gcl-2_6_8pre/o -fsigned-char -DNO_DEFUN -Wall -DVOL=volatile -fsigned-char -pipe -O3 -fomit-frame-pointer  -I/cygdrive/c/daly/home/gcl-2_6_8pre/o -I../h -I../gcl-tk -E usig2.c | sed -e 's:\"[ ]*):\"):g' | ./grab_defs > usig2.ini
cc1: note: -fwritable-strings is deprecated; see documentation for details
[ -e ../h/new_decl.h ] || touch ../h/new_decl.h
gcc  -fwritable-strings  -DVOL=volatile  -I/cygdrive/c/daly/home/gcl-2_6_8pre/o -fsigned-char -DNO_DEFUN -Wall -DVOL=volatile -fsigned-char -pipe -O3 -fomit-frame-pointer  -I/cygdrive/c/daly/home/gcl-2_6_8pre/o -I../h -I../gcl-tk -E utils.c | sed -e 's:\"[ ]*):\"):g' | ./grab_defs > utils.ini
cc1: note: -fwritable-strings is deprecated; see documentation for details
[ -e ../h/new_decl.h ] || touch ../h/new_decl.h
gcc  -fwritable-strings  -DVOL=volatile  -I/cygdrive/c/daly/home/gcl-2_6_8pre/o -fsigned-char -DNO_DEFUN -Wall -DVOL=volatile -fsigned-char -pipe -O3 -fomit-frame-pointer  -I/cygdrive/c/daly/home/gcl-2_6_8pre/o -I../h -I../gcl-tk -E makefun.c | sed -e 's:\"[ ]*):\"):g' | ./grab_defs > makefun.ini
cc1: note: -fwritable-strings is deprecated; see documentation for details
[ -e ../h/new_decl.h ] || touch ../h/new_decl.h
gcc  -fwritable-strings  -DVOL=volatile  -I/cygdrive/c/daly/home/gcl-2_6_8pre/o -fsigned-char -DNO_DEFUN -Wall -DVOL=volatile -fsigned-char -pipe -O3 -fomit-frame-pointer  -I/cygdrive/c/daly/home/gcl-2_6_8pre/o -I../h -I../gcl-tk -E sockets.c | sed -e 's:\"[ ]*):\"):g' | ./grab_defs > sockets.ini
cc1: note: -fwritable-strings is deprecated; see documentation for details
[ -e ../h/new_decl.h ] || touch ../h/new_decl.h
gcc  -fwritable-strings  -DVOL=volatile  -I/cygdrive/c/daly/home/gcl-2_6_8pre/o -fsigned-char -DNO_DEFUN -Wall -DVOL=volatile -fsigned-char -pipe -O3 -fomit-frame-pointer  -I/cygdrive/c/daly/home/gcl-2_6_8pre/o -I../h -I../gcl-tk -E gmp_wrappers.c | sed -e 's:\"[ ]*):\"):g' | ./grab_defs > gmp_wrappers.ini
cc1: note: -fwritable-strings is deprecated; see documentation for details
[ -e ../h/new_decl.h ] || touch ../h/new_decl.h
gcc  -fwritable-strings  -DVOL=volatile  -I/cygdrive/c/daly/home/gcl-2_6_8pre/o -fsigned-char -DNO_DEFUN -Wall -DVOL=volatile -fsigned-char -pipe -O3 -fomit-frame-pointer  -I/cygdrive/c/daly/home/gcl-2_6_8pre/o -I../h -I../gcl-tk -E clxsocket.c | sed -e 's:\"[ ]*):\"):g' | ./grab_defs > clxsocket.ini
cc1: note: -fwritable-strings is deprecated; see documentation for details
[ -e ../h/new_decl.h ] || touch ../h/new_decl.h
gcc  -fwritable-strings  -DVOL=volatile  -I/cygdrive/c/daly/home/gcl-2_6_8pre/o -fsigned-char -DNO_DEFUN -Wall -DVOL=volatile -fsigned-char -pipe -O3 -fomit-frame-pointer  -I/cygdrive/c/daly/home/gcl-2_6_8pre/o -I../h -I../gcl-tk -E init_pari.c | sed -e 's:\"[ ]*):\"):g' | ./grab_defs > init_pari.ini
cc1: note: -fwritable-strings is deprecated; see documentation for details
[ -e ../h/new_decl.h ] || touch ../h/new_decl.h
gcc  -fwritable-strings  -DVOL=volatile  -I/cygdrive/c/daly/home/gcl-2_6_8pre/o -fsigned-char -DNO_DEFUN -Wall -DVOL=volatile -fsigned-char -pipe -O3 -fomit-frame-pointer  -I/cygdrive/c/daly/home/gcl-2_6_8pre/o -I../h -I../gcl-tk -E nsocket.c | sed -e 's:\"[ ]*):\"):g' | ./grab_defs > nsocket.ini
cc1: note: -fwritable-strings is deprecated; see documentation for details
[ -e ../h/new_decl.h ] || touch ../h/new_decl.h
gcc  -fwritable-strings  -DVOL=volatile  -I/cygdrive/c/daly/home/gcl-2_6_8pre/o -fsigned-char -DNO_DEFUN -Wall -DVOL=volatile -fsigned-char -pipe -O3 -fomit-frame-pointer  -I/cygdrive/c/daly/home/gcl-2_6_8pre/o -I../h -I../gcl-tk -E sfasl.c | sed -e 's:\"[ ]*):\"):g' | ./grab_defs > sfasl.ini
cc1: note: -fwritable-strings is deprecated; see documentation for details
[ -e ../h/new_decl.h ] || touch ../h/new_decl.h
../bin/dpp.exe gcl_readline
dpp: gcl_readline.d -> gcl_readline.c
./grab_defs < gcl_readline.c > gcl_readline.ini
rm gcl_readline.c
echo '#include "make-decl.h"' > foo.c
cat main.ini alloc.ini gbc.ini bitop.ini typespec.ini eval.ini macros.ini lex.ini bds.ini frame.ini predicate.ini reference.ini assignment.ini bind.ini let.ini conditional.ini block.ini iteration.ini mapfun.ini prog.ini multival.ini catch.ini symbol.ini cfun.ini cmpaux.ini package.ini big.ini number.ini num_pred.ini num_comp.ini num_arith.ini num_sfun.ini num_co.ini num_log.ini num_rand.ini earith.ini character.ini sequence.ini list.ini hash.ini array.ini string.ini regexpr.ini structure.ini toplevel.ini file.ini read.ini backq.ini print.ini format.ini pathname.ini unixfsys.ini unixfasl.ini error.ini unixtime.ini unixsys.ini unixsave.ini funlink.ini plt.ini fat_string.ini ./run_process.ini nfunlink.ini usig.ini usig2.ini utils.ini makefun.ini sockets.ini gmp_wrappers.ini clxsocket.ini init_pari.ini nsocket.ini ./sfasl.ini gcl_readline.ini >> foo.c
gcc  -fwritable-strings  -DVOL=volatile  -I/cygdrive/c/daly/home/gcl-2_6_8pre/o -fsigned-char -E -I../h foo.c | sed -n -e '/#/d' -e '/DO_/d' -e '/[a-zA-Z;]/p' > ../h/new_decl.h
cc1: note: -fwritable-strings is deprecated; see documentation for details
rm foo.c
make[1]: Leaving directory `/cygdrive/c/daly/home/gcl-2_6_8pre/o'
cat h/config.h | sed -e "1,/Begin for cmpincl/d" \
	-e "/End for cmpinclude/,50000d" > tmpx
echo -e '#include "h/config.h"\n#ifdef SGC\n"#define SGC"\n#else\n"#undef SGC"\n#endif' | cpp 2>/dev/null| grep -v '^ *$' | tail -1l | tr -d '"' >>tmpx
cat h/cmpincl1.h h/gclincl.h h/compbas.h h/enum.h h/mgmp.h h/object.h h/vs.h h/bds.h h/frame.h h/lex.h h/eval.h    h/funlink.h h/att_ext.h h/new_decl.h h/compbas2.h h/compat.h h/cmponly.h o/regexp.h h//protoize.h >> tmpx
./xbin/move-if-changed mv tmpx h/cmpinclude.h
tmpx and h/cmpinclude.h were not the same.
ln tmpx h/cmpinclude.h
./xbin/move-if-changed cp h/cmpinclude.h o/cmpinclude.h
h/cmpinclude.h and o/cmpinclude.h were not the same.
ln h/cmpinclude.h o/cmpinclude.h
(cd bin; make all)
make[1]: Entering directory `/cygdrive/c/daly/home/gcl-2_6_8pre/bin'
gcc  -fwritable-strings  -DVOL=volatile  -I/cygdrive/c/daly/home/gcl-2_6_8pre/o -fsigned-char  -I../h  -o append.exe  append.c
cc1: note: -fwritable-strings is deprecated; see documentation for details
gcc  -fwritable-strings  -DVOL=volatile  -I/cygdrive/c/daly/home/gcl-2_6_8pre/o -fsigned-char -I../h  -o file-sub.exe file-sub.c
cc1: note: -fwritable-strings is deprecated; see documentation for details
make[1]: Leaving directory `/cygdrive/c/daly/home/gcl-2_6_8pre/bin'
make mpfiles
make[1]: Entering directory `/cygdrive/c/daly/home/gcl-2_6_8pre'
make[1]: Nothing to be done for `mpfiles'.
make[1]: Leaving directory `/cygdrive/c/daly/home/gcl-2_6_8pre'
rm -f o/cmpinclude.h ; cp h/cmpinclude.h o
(cd o; make all)
make[1]: Entering directory `/cygdrive/c/daly/home/gcl-2_6_8pre/o'
gcc  -fwritable-strings  -DVOL=volatile  -I/cygdrive/c/daly/home/gcl-2_6_8pre/o -fsigned-char -c -Wall -DVOL=volatile -fsigned-char -pipe -O3 -fomit-frame-pointer  -I/cygdrive/c/daly/home/gcl-2_6_8pre/o -I../h -I../gcl-tk main.c  
cc1: note: -fwritable-strings is deprecated; see documentation for details
main.c: In function `main':
main.c:153: warning: implicit declaration of function `recreate_heap1'
gcc  -fwritable-strings  -DVOL=volatile  -I/cygdrive/c/daly/home/gcl-2_6_8pre/o -fsigned-char -c -Wall -DVOL=volatile -fsigned-char -pipe -O3 -fomit-frame-pointer  -I/cygdrive/c/daly/home/gcl-2_6_8pre/o -I../h -I../gcl-tk alloc.c  
cc1: note: -fwritable-strings is deprecated; see documentation for details
alloc.c: In function `gcl_init_alloc':
alloc.c:930: warning: suggest parentheses around assignment used as truth value
alloc.c: In function `malloc':
alloc.c:1494: warning: implicit declaration of function `recreate_heap1'
alloc.c: At top level:
alloc.c:1668: warning: 'memalign' defined but not used
gcc  -fwritable-strings  -DVOL=volatile  -I/cygdrive/c/daly/home/gcl-2_6_8pre/o -fsigned-char -c -Wall -DVOL=volatile -fsigned-char -pipe -O3 -fomit-frame-pointer  -I/cygdrive/c/daly/home/gcl-2_6_8pre/o -I../h -I../gcl-tk gbc.c  
cc1: note: -fwritable-strings is deprecated; see documentation for details
gcc  -fwritable-strings  -DVOL=volatile  -I/cygdrive/c/daly/home/gcl-2_6_8pre/o -fsigned-char -c -Wall -DVOL=volatile -fsigned-char -pipe -O3 -fomit-frame-pointer  -I/cygdrive/c/daly/home/gcl-2_6_8pre/o -I../h -I../gcl-tk bitop.c  
cc1: note: -fwritable-strings is deprecated; see documentation for details
gcc  -fwritable-strings  -DVOL=volatile  -I/cygdrive/c/daly/home/gcl-2_6_8pre/o -fsigned-char -c -Wall -DVOL=volatile -fsigned-char -pipe -O3 -fomit-frame-pointer  -I/cygdrive/c/daly/home/gcl-2_6_8pre/o -I../h -I../gcl-tk typespec.c  
cc1: note: -fwritable-strings is deprecated; see documentation for details
gcc  -fwritable-strings  -DVOL=volatile  -I/cygdrive/c/daly/home/gcl-2_6_8pre/o -fsigned-char -c -Wall -DVOL=volatile -fsigned-char -pipe -O3 -fomit-frame-pointer  -I/cygdrive/c/daly/home/gcl-2_6_8pre/o -I../h -I../gcl-tk eval.c  
cc1: note: -fwritable-strings is deprecated; see documentation for details
gcc  -fwritable-strings  -DVOL=volatile  -I/cygdrive/c/daly/home/gcl-2_6_8pre/o -fsigned-char -c -Wall -DVOL=volatile -fsigned-char -pipe -O3 -fomit-frame-pointer  -I/cygdrive/c/daly/home/gcl-2_6_8pre/o -I../h -I../gcl-tk macros.c  
cc1: note: -fwritable-strings is deprecated; see documentation for details
gcc  -fwritable-strings  -DVOL=volatile  -I/cygdrive/c/daly/home/gcl-2_6_8pre/o -fsigned-char -c -Wall -DVOL=volatile -fsigned-char -pipe -O3 -fomit-frame-pointer  -I/cygdrive/c/daly/home/gcl-2_6_8pre/o -I../h -I../gcl-tk lex.c  
cc1: note: -fwritable-strings is deprecated; see documentation for details
gcc  -fwritable-strings  -DVOL=volatile  -I/cygdrive/c/daly/home/gcl-2_6_8pre/o -fsigned-char -c -Wall -DVOL=volatile -fsigned-char -pipe -O3 -fomit-frame-pointer  -I/cygdrive/c/daly/home/gcl-2_6_8pre/o -I../h -I../gcl-tk bds.c  
cc1: note: -fwritable-strings is deprecated; see documentation for details
gcc  -fwritable-strings  -DVOL=volatile  -I/cygdrive/c/daly/home/gcl-2_6_8pre/o -fsigned-char -c -Wall -DVOL=volatile -fsigned-char -pipe -O3 -fomit-frame-pointer  -I/cygdrive/c/daly/home/gcl-2_6_8pre/o -I../h -I../gcl-tk frame.c  
cc1: note: -fwritable-strings is deprecated; see documentation for details
gcc  -fwritable-strings  -DVOL=volatile  -I/cygdrive/c/daly/home/gcl-2_6_8pre/o -fsigned-char -c -Wall -DVOL=volatile -fsigned-char -pipe -O3 -fomit-frame-pointer  -I/cygdrive/c/daly/home/gcl-2_6_8pre/o -I../h -I../gcl-tk predicate.c  
cc1: note: -fwritable-strings is deprecated; see documentation for details
gcc  -fwritable-strings  -DVOL=volatile  -I/cygdrive/c/daly/home/gcl-2_6_8pre/o -fsigned-char -c -Wall -DVOL=volatile -fsigned-char -pipe -O3 -fomit-frame-pointer  -I/cygdrive/c/daly/home/gcl-2_6_8pre/o -I../h -I../gcl-tk reference.c  
cc1: note: -fwritable-strings is deprecated; see documentation for details
gcc  -fwritable-strings  -DVOL=volatile  -I/cygdrive/c/daly/home/gcl-2_6_8pre/o -fsigned-char -c -Wall -DVOL=volatile -fsigned-char -pipe -O3 -fomit-frame-pointer  -I/cygdrive/c/daly/home/gcl-2_6_8pre/o -I../h -I../gcl-tk assignment.c  
cc1: note: -fwritable-strings is deprecated; see documentation for details
gcc  -fwritable-strings  -DVOL=volatile  -I/cygdrive/c/daly/home/gcl-2_6_8pre/o -fsigned-char -c -Wall -DVOL=volatile -fsigned-char -pipe -O3 -fomit-frame-pointer  -I/cygdrive/c/daly/home/gcl-2_6_8pre/o -I../h -I../gcl-tk bind.c  
cc1: note: -fwritable-strings is deprecated; see documentation for details
gcc  -fwritable-strings  -DVOL=volatile  -I/cygdrive/c/daly/home/gcl-2_6_8pre/o -fsigned-char -c -Wall -DVOL=volatile -fsigned-char -pipe -O3 -fomit-frame-pointer  -I/cygdrive/c/daly/home/gcl-2_6_8pre/o -I../h -I../gcl-tk let.c  
cc1: note: -fwritable-strings is deprecated; see documentation for details
gcc  -fwritable-strings  -DVOL=volatile  -I/cygdrive/c/daly/home/gcl-2_6_8pre/o -fsigned-char -c -Wall -DVOL=volatile -fsigned-char -pipe -O3 -fomit-frame-pointer  -I/cygdrive/c/daly/home/gcl-2_6_8pre/o -I../h -I../gcl-tk conditional.c  
cc1: note: -fwritable-strings is deprecated; see documentation for details
gcc  -fwritable-strings  -DVOL=volatile  -I/cygdrive/c/daly/home/gcl-2_6_8pre/o -fsigned-char -c -Wall -DVOL=volatile -fsigned-char -pipe -O3 -fomit-frame-pointer  -I/cygdrive/c/daly/home/gcl-2_6_8pre/o -I../h -I../gcl-tk block.c  
cc1: note: -fwritable-strings is deprecated; see documentation for details
gcc  -fwritable-strings  -DVOL=volatile  -I/cygdrive/c/daly/home/gcl-2_6_8pre/o -fsigned-char -c -Wall -DVOL=volatile -fsigned-char -pipe -O3 -fomit-frame-pointer  -I/cygdrive/c/daly/home/gcl-2_6_8pre/o -I../h -I../gcl-tk iteration.c  
cc1: note: -fwritable-strings is deprecated; see documentation for details
gcc  -fwritable-strings  -DVOL=volatile  -I/cygdrive/c/daly/home/gcl-2_6_8pre/o -fsigned-char -c -Wall -DVOL=volatile -fsigned-char -pipe -O3 -fomit-frame-pointer  -I/cygdrive/c/daly/home/gcl-2_6_8pre/o -I../h -I../gcl-tk mapfun.c  
cc1: note: -fwritable-strings is deprecated; see documentation for details
gcc  -fwritable-strings  -DVOL=volatile  -I/cygdrive/c/daly/home/gcl-2_6_8pre/o -fsigned-char -c -Wall -DVOL=volatile -fsigned-char -pipe -O3 -fomit-frame-pointer  -I/cygdrive/c/daly/home/gcl-2_6_8pre/o -I../h -I../gcl-tk prog.c  
cc1: note: -fwritable-strings is deprecated; see documentation for details
gcc  -fwritable-strings  -DVOL=volatile  -I/cygdrive/c/daly/home/gcl-2_6_8pre/o -fsigned-char -c -Wall -DVOL=volatile -fsigned-char -pipe -O3 -fomit-frame-pointer  -I/cygdrive/c/daly/home/gcl-2_6_8pre/o -I../h -I../gcl-tk multival.c  
cc1: note: -fwritable-strings is deprecated; see documentation for details
gcc  -fwritable-strings  -DVOL=volatile  -I/cygdrive/c/daly/home/gcl-2_6_8pre/o -fsigned-char -c -Wall -DVOL=volatile -fsigned-char -pipe -O3 -fomit-frame-pointer  -I/cygdrive/c/daly/home/gcl-2_6_8pre/o -I../h -I../gcl-tk catch.c  
cc1: note: -fwritable-strings is deprecated; see documentation for details
../bin/dpp.exe symbol
dpp: symbol.d -> symbol.c
gcc  -fwritable-strings  -DVOL=volatile  -I/cygdrive/c/daly/home/gcl-2_6_8pre/o -fsigned-char -c -Wall -DVOL=volatile -fsigned-char -pipe -O3 -fomit-frame-pointer  -I/cygdrive/c/daly/home/gcl-2_6_8pre/o -I../h -I../gcl-tk symbol.c 
cc1: note: -fwritable-strings is deprecated; see documentation for details
rm symbol.c
gcc  -fwritable-strings  -DVOL=volatile  -I/cygdrive/c/daly/home/gcl-2_6_8pre/o -fsigned-char -c -Wall -DVOL=volatile -fsigned-char -pipe -O3 -fomit-frame-pointer  -I/cygdrive/c/daly/home/gcl-2_6_8pre/o -I../h -I../gcl-tk cfun.c  
cc1: note: -fwritable-strings is deprecated; see documentation for details
gcc  -fwritable-strings  -DVOL=volatile  -I/cygdrive/c/daly/home/gcl-2_6_8pre/o -fsigned-char -c -Wall -DVOL=volatile -fsigned-char -pipe -O3 -fomit-frame-pointer  -I/cygdrive/c/daly/home/gcl-2_6_8pre/o -I../h -I../gcl-tk cmpaux.c  
cc1: note: -fwritable-strings is deprecated; see documentation for details
../bin/dpp.exe package
dpp: package.d -> package.c
gcc  -fwritable-strings  -DVOL=volatile  -I/cygdrive/c/daly/home/gcl-2_6_8pre/o -fsigned-char -c -Wall -DVOL=volatile -fsigned-char -pipe -O3 -fomit-frame-pointer  -I/cygdrive/c/daly/home/gcl-2_6_8pre/o -I../h -I../gcl-tk package.c 
cc1: note: -fwritable-strings is deprecated; see documentation for details
rm package.c
gcc  -fwritable-strings  -DVOL=volatile  -I/cygdrive/c/daly/home/gcl-2_6_8pre/o -fsigned-char -c -Wall -DVOL=volatile -fsigned-char -pipe -O3 -fomit-frame-pointer  -I/cygdrive/c/daly/home/gcl-2_6_8pre/o -I../h -I../gcl-tk big.c  
cc1: note: -fwritable-strings is deprecated; see documentation for details
gcc  -fwritable-strings  -DVOL=volatile  -I/cygdrive/c/daly/home/gcl-2_6_8pre/o -fsigned-char -c -Wall -DVOL=volatile -fsigned-char -pipe -O3 -fomit-frame-pointer  -I/cygdrive/c/daly/home/gcl-2_6_8pre/o -I../h -I../gcl-tk number.c  
cc1: note: -fwritable-strings is deprecated; see documentation for details
gcc  -fwritable-strings  -DVOL=volatile  -I/cygdrive/c/daly/home/gcl-2_6_8pre/o -fsigned-char -c -Wall -DVOL=volatile -fsigned-char -pipe -O3 -fomit-frame-pointer  -I/cygdrive/c/daly/home/gcl-2_6_8pre/o -I../h -I../gcl-tk num_pred.c  
cc1: note: -fwritable-strings is deprecated; see documentation for details
gcc  -fwritable-strings  -DVOL=volatile  -I/cygdrive/c/daly/home/gcl-2_6_8pre/o -fsigned-char -c -Wall -DVOL=volatile -fsigned-char -pipe -O3 -fomit-frame-pointer  -I/cygdrive/c/daly/home/gcl-2_6_8pre/o -I../h -I../gcl-tk num_comp.c  
cc1: note: -fwritable-strings is deprecated; see documentation for details
gcc  -fwritable-strings  -DVOL=volatile  -I/cygdrive/c/daly/home/gcl-2_6_8pre/o -fsigned-char -c -Wall -DVOL=volatile -fsigned-char -pipe -O3 -fomit-frame-pointer  -I/cygdrive/c/daly/home/gcl-2_6_8pre/o -I../h -I../gcl-tk num_arith.c  
cc1: note: -fwritable-strings is deprecated; see documentation for details
gcc  -fwritable-strings  -DVOL=volatile  -I/cygdrive/c/daly/home/gcl-2_6_8pre/o -fsigned-char -c -Wall -DVOL=volatile -fsigned-char -pipe -O3 -fomit-frame-pointer  -I/cygdrive/c/daly/home/gcl-2_6_8pre/o -I../h -I../gcl-tk num_sfun.c  
cc1: note: -fwritable-strings is deprecated; see documentation for details
gcc  -fwritable-strings  -DVOL=volatile  -I/cygdrive/c/daly/home/gcl-2_6_8pre/o -fsigned-char -c -Wall -DVOL=volatile -fsigned-char -pipe -O3 -fomit-frame-pointer  -I/cygdrive/c/daly/home/gcl-2_6_8pre/o -I../h -I../gcl-tk num_co.c  
cc1: note: -fwritable-strings is deprecated; see documentation for details
gcc  -fwritable-strings  -DVOL=volatile  -I/cygdrive/c/daly/home/gcl-2_6_8pre/o -fsigned-char -c -Wall -DVOL=volatile -fsigned-char -pipe -O3 -fomit-frame-pointer  -I/cygdrive/c/daly/home/gcl-2_6_8pre/o -I../h -I../gcl-tk num_log.c  
cc1: note: -fwritable-strings is deprecated; see documentation for details
gcc  -fwritable-strings  -DVOL=volatile  -I/cygdrive/c/daly/home/gcl-2_6_8pre/o -fsigned-char -c -Wall -DVOL=volatile -fsigned-char -pipe -O3 -fomit-frame-pointer  -I/cygdrive/c/daly/home/gcl-2_6_8pre/o -I../h -I../gcl-tk num_rand.c  
cc1: note: -fwritable-strings is deprecated; see documentation for details
gcc  -fwritable-strings  -DVOL=volatile  -I/cygdrive/c/daly/home/gcl-2_6_8pre/o -fsigned-char -c -Wall -DVOL=volatile -fsigned-char -pipe -O3 -fomit-frame-pointer  -I/cygdrive/c/daly/home/gcl-2_6_8pre/o -I../h -I../gcl-tk earith.c  
cc1: note: -fwritable-strings is deprecated; see documentation for details
../bin/dpp.exe character
dpp: character.d -> character.c
gcc  -fwritable-strings  -DVOL=volatile  -I/cygdrive/c/daly/home/gcl-2_6_8pre/o -fsigned-char -c -Wall -DVOL=volatile -fsigned-char -pipe -O3 -fomit-frame-pointer  -I/cygdrive/c/daly/home/gcl-2_6_8pre/o -I../h -I../gcl-tk character.c 
cc1: note: -fwritable-strings is deprecated; see documentation for details
rm character.c
../bin/dpp.exe sequence
dpp: sequence.d -> sequence.c
gcc  -fwritable-strings  -DVOL=volatile  -I/cygdrive/c/daly/home/gcl-2_6_8pre/o -fsigned-char -c -Wall -DVOL=volatile -fsigned-char -pipe -O3 -fomit-frame-pointer  -I/cygdrive/c/daly/home/gcl-2_6_8pre/o -I../h -I../gcl-tk sequence.c 
cc1: note: -fwritable-strings is deprecated; see documentation for details
rm sequence.c
../bin/dpp.exe list
dpp: list.d -> list.c
gcc  -fwritable-strings  -DVOL=volatile  -I/cygdrive/c/daly/home/gcl-2_6_8pre/o -fsigned-char -c -Wall -DVOL=volatile -fsigned-char -pipe -O3 -fomit-frame-pointer  -I/cygdrive/c/daly/home/gcl-2_6_8pre/o -I../h -I../gcl-tk list.c 
cc1: note: -fwritable-strings is deprecated; see documentation for details
rm list.c
../bin/dpp.exe hash
dpp: hash.d -> hash.c
gcc  -fwritable-strings  -DVOL=volatile  -I/cygdrive/c/daly/home/gcl-2_6_8pre/o -fsigned-char -c -Wall -DVOL=volatile -fsigned-char -pipe -O3 -fomit-frame-pointer  -I/cygdrive/c/daly/home/gcl-2_6_8pre/o -I../h -I../gcl-tk hash.c 
cc1: note: -fwritable-strings is deprecated; see documentation for details
rm hash.c
gcc  -fwritable-strings  -DVOL=volatile  -I/cygdrive/c/daly/home/gcl-2_6_8pre/o -fsigned-char -c -Wall -DVOL=volatile -fsigned-char -pipe -O3 -fomit-frame-pointer  -I/cygdrive/c/daly/home/gcl-2_6_8pre/o -I../h -I../gcl-tk array.c  
cc1: note: -fwritable-strings is deprecated; see documentation for details
../bin/dpp.exe string
dpp: string.d -> string.c
gcc  -fwritable-strings  -DVOL=volatile  -I/cygdrive/c/daly/home/gcl-2_6_8pre/o -fsigned-char -c -Wall -DVOL=volatile -fsigned-char -pipe -O3 -fomit-frame-pointer  -I/cygdrive/c/daly/home/gcl-2_6_8pre/o -I../h -I../gcl-tk string.c 
cc1: note: -fwritable-strings is deprecated; see documentation for details
rm string.c
gcc  -fwritable-strings  -DVOL=volatile  -I/cygdrive/c/daly/home/gcl-2_6_8pre/o -fsigned-char -c -Wall -DVOL=volatile -fsigned-char -pipe -O3 -fomit-frame-pointer  -I/cygdrive/c/daly/home/gcl-2_6_8pre/o -I../h -I../gcl-tk regexpr.c  
cc1: note: -fwritable-strings is deprecated; see documentation for details
gcc  -fwritable-strings  -DVOL=volatile  -I/cygdrive/c/daly/home/gcl-2_6_8pre/o -fsigned-char -c -Wall -DVOL=volatile -fsigned-char -pipe -O3 -fomit-frame-pointer  -I/cygdrive/c/daly/home/gcl-2_6_8pre/o -I../h -I../gcl-tk structure.c  
cc1: note: -fwritable-strings is deprecated; see documentation for details
gcc  -fwritable-strings  -DVOL=volatile  -I/cygdrive/c/daly/home/gcl-2_6_8pre/o -fsigned-char -c -Wall -DVOL=volatile -fsigned-char -pipe -O3 -fomit-frame-pointer  -I/cygdrive/c/daly/home/gcl-2_6_8pre/o -I../h -I../gcl-tk toplevel.c  
cc1: note: -fwritable-strings is deprecated; see documentation for details
../bin/dpp.exe file
dpp: file.d -> file.c
gcc  -fwritable-strings  -DVOL=volatile  -I/cygdrive/c/daly/home/gcl-2_6_8pre/o -fsigned-char -c -Wall -DVOL=volatile -fsigned-char -pipe -O3 -fomit-frame-pointer  -I/cygdrive/c/daly/home/gcl-2_6_8pre/o -I../h -I../gcl-tk file.c 
cc1: note: -fwritable-strings is deprecated; see documentation for details
rm file.c
../bin/dpp.exe read
dpp: read.d -> read.c
gcc  -fwritable-strings  -DVOL=volatile  -I/cygdrive/c/daly/home/gcl-2_6_8pre/o -fsigned-char -c -Wall -DVOL=volatile -fsigned-char -pipe -O3 -fomit-frame-pointer  -I/cygdrive/c/daly/home/gcl-2_6_8pre/o -I../h -I../gcl-tk read.c 
cc1: note: -fwritable-strings is deprecated; see documentation for details
read.d: In function `parse_number':
read.d:701: warning: 'ch1' might be used uninitialized in this function
read.d:701: warning: 'ch1' might be used uninitialized in this function
rm read.c
gcc  -fwritable-strings  -DVOL=volatile  -I/cygdrive/c/daly/home/gcl-2_6_8pre/o -fsigned-char -c -Wall -DVOL=volatile -fsigned-char -pipe -O3 -fomit-frame-pointer  -I/cygdrive/c/daly/home/gcl-2_6_8pre/o -I../h -I../gcl-tk backq.c  
cc1: note: -fwritable-strings is deprecated; see documentation for details
../bin/dpp.exe print
dpp: print.d -> print.c
gcc  -fwritable-strings  -DVOL=volatile  -I/cygdrive/c/daly/home/gcl-2_6_8pre/o -fsigned-char -c -Wall -DVOL=volatile -fsigned-char -pipe -O3 -fomit-frame-pointer  -I/cygdrive/c/daly/home/gcl-2_6_8pre/o -I../h -I../gcl-tk print.c 
cc1: note: -fwritable-strings is deprecated; see documentation for details
rm print.c
gcc  -fwritable-strings  -DVOL=volatile  -I/cygdrive/c/daly/home/gcl-2_6_8pre/o -fsigned-char -c -Wall -DVOL=volatile -fsigned-char -pipe -O3 -fomit-frame-pointer  -I/cygdrive/c/daly/home/gcl-2_6_8pre/o -I../h -I../gcl-tk format.c  
cc1: note: -fwritable-strings is deprecated; see documentation for details
../bin/dpp.exe pathname
dpp: pathname.d -> pathname.c
gcc  -fwritable-strings  -DVOL=volatile  -I/cygdrive/c/daly/home/gcl-2_6_8pre/o -fsigned-char -c -Wall -DVOL=volatile -fsigned-char -pipe -O3 -fomit-frame-pointer  -I/cygdrive/c/daly/home/gcl-2_6_8pre/o -I../h -I../gcl-tk pathname.c 
cc1: note: -fwritable-strings is deprecated; see documentation for details
rm pathname.c
gcc  -fwritable-strings  -DVOL=volatile  -I/cygdrive/c/daly/home/gcl-2_6_8pre/o -fsigned-char -c -Wall -DVOL=volatile -fsigned-char -pipe -O3 -fomit-frame-pointer  -I/cygdrive/c/daly/home/gcl-2_6_8pre/o -I../h -I../gcl-tk unixfsys.c  
cc1: note: -fwritable-strings is deprecated; see documentation for details
gcc  -fwritable-strings  -DVOL=volatile  -I/cygdrive/c/daly/home/gcl-2_6_8pre/o -fsigned-char -c -Wall -DVOL=volatile -fsigned-char -pipe -O3 -fomit-frame-pointer  -I/cygdrive/c/daly/home/gcl-2_6_8pre/o -I../h -I../gcl-tk unixfasl.c  
cc1: note: -fwritable-strings is deprecated; see documentation for details
gcc  -fwritable-strings  -DVOL=volatile  -I/cygdrive/c/daly/home/gcl-2_6_8pre/o -fsigned-char -c -Wall -DVOL=volatile -fsigned-char -pipe -O3 -fomit-frame-pointer  -I/cygdrive/c/daly/home/gcl-2_6_8pre/o -I../h -I../gcl-tk error.c  
cc1: note: -fwritable-strings is deprecated; see documentation for details
gcc  -fwritable-strings  -DVOL=volatile  -I/cygdrive/c/daly/home/gcl-2_6_8pre/o -fsigned-char -c -Wall -DVOL=volatile -fsigned-char -pipe -O3 -fomit-frame-pointer  -I/cygdrive/c/daly/home/gcl-2_6_8pre/o -I../h -I../gcl-tk unixtime.c  
cc1: note: -fwritable-strings is deprecated; see documentation for details
gcc  -fwritable-strings  -DVOL=volatile  -I/cygdrive/c/daly/home/gcl-2_6_8pre/o -fsigned-char -c -Wall -DVOL=volatile -fsigned-char -pipe -O3 -fomit-frame-pointer  -I/cygdrive/c/daly/home/gcl-2_6_8pre/o -I../h -I../gcl-tk unixsys.c  
cc1: note: -fwritable-strings is deprecated; see documentation for details
gcc  -fwritable-strings  -DVOL=volatile  -I/cygdrive/c/daly/home/gcl-2_6_8pre/o -fsigned-char -c -Wall -DVOL=volatile -fsigned-char -pipe -O3 -fomit-frame-pointer  -I/cygdrive/c/daly/home/gcl-2_6_8pre/o -I../h -I../gcl-tk unixsave.c  
cc1: note: -fwritable-strings is deprecated; see documentation for details
In file included from unexnt.c:24,
                 from unixsave.c:32:
../h/gclincl.h:13:1: warning: "DBEGIN" redefined
In file included from ../h/include.h:37,
                 from unixsave.c:28:
../h/config.h:8:1: warning: this is the location of the previous definition
In file included from unexnt.c:58,
                 from unixsave.c:32:
ntheap.h:63: error: conflicting types for 'sbrk'
/usr/include/sys/unistd.h:120: error: previous declaration of 'sbrk' was here
ntheap.h:63: error: conflicting types for 'sbrk'
/usr/include/sys/unistd.h:120: error: previous declaration of 'sbrk' was here
In file included from unixsave.c:32:
unexnt.c: In function `unexec':
unexnt.c:241: warning: implicit declaration of function `cygwin_conv_to_full_win32_path'
unexnt.c: In function `allocate_heap':
unexnt.c:984: error: `DBEGIN_TY' undeclared (first use in this function)
unexnt.c:984: error: (Each undeclared identifier is reported only once
unexnt.c:984: error: for each function it appears in.)
unexnt.c:984: error: parse error before "ptr"
unexnt.c: In function `ctrl_c_handler':
unexnt.c:1139: warning: implicit declaration of function `sigint'
make[1]: *** [unixsave.o] Error 1
make[1]: Leaving directory `/cygdrive/c/daly/home/gcl-2_6_8pre/o'
make: *** [unixport/saved_pre_gcl] Error 2
;~/gcl-2_6_8pre
daly@deadbeef ~/gcl-2_6_8pre

\start
Date: Wed, 26 Sep 2007 14:35:24 -0400
From: Tim Daly
To: Camm Maguire
Subject: gcl-2.6.8pre on cygwin

In unexnt.c line 989 reads:

  DBEGIN = (DBEGIN_TY) ptr;

It seems that everywhere the symbol DBEGIN appears it is defined
to be a number. Thus this line expands to something like:

  0 = unsigned int ptr;

which generates:
 unexnt.c:989: error: invalid lvalue in assignment

\start
Date: Wed, 26 Sep 2007 16:49:13 -0400
From: Tim Daly
To: Camm Maguire
Subject: [Alfredo Portes: Re: hyperdoc on windows]

Camm,

We have a version of GCL running on mingw.
Sockets seem to exist but reading/writing doesn't seem to work.
Any suggestions for things to check?

Tim


------- Start of forwarded message -------
Tim,

On 9/26/07, Tim Daly wrote:
> excellent. thanks. i'll see if i can get a running version.
>
> if you have a few minutes can you try to get a working socket?

I tried, the socket opens, and the browser connects (kind of),
but I get this error:

   >> System error:
   Error "No such file or directory" on accepting connection to #<two-way stream
 10e7d384>

Maybe Cam can say something about it.

\start
Date: 26 Sep 2007 17:23:48 -0400
From: Camm Maguire
To: Tim Daly
Subject: Re: GCL-2.6.8pre cygwin

Greetings!  Glad your working on this, Tim -- thanks so much!

Is there any chance of getting remote ssh access to either your mingw
or cygwin machine?  If not, that's OK, I'll then suggest edits via
email (for the cygwin port) and gdb commands (to investigate mingw
sockets.)  

\start
Date: Thu, 27 Sep 2007 11:00:49 -0400
From: Tim Daly
To: list
Subject: Axiom on windows

Please be aware that if you have axiom installed on windows
and you later install openaxiom, your axiom installation will break.
Re-installing axiom will fix the problem.

\start
Date: Thu, 27 Sep 2007 17:56:02 -0500
From: Tim Daly
To: Martin Rubey
Subject: pfaffian.input.pamphlet

Martin,

Attached is a pamphlet file documenting Pfaffian along with regression
test cases. I've added it to axiom and am running a regression test 
cycle now.

Tim

========================================================================
\documentclass{article}
\usepackage{amsfonts}
\usepackage{axiom}
\begin{document}
\title{\$SPAD/src/input pfaffian}
\author{Timothy Daly, Gunter Rote, Martin Rubey}
\maketitle
\begin{abstract}
In mathematics, the determinant of a skew-symmetric matrix can always
be written as the square of a polynomial in the matrix entries. This
polynomial is called the Pfaffian of the matrix. The Pfaffian is
nonvanishing only for $2n \times 2n$ skew-symmetric matrices, in which
case it is a polynomial of degree $n$.
\end{abstract}
\eject
\tableofcontents
\eject
\section{Examples}
$$
{\rm Pfaffian}\left[
\begin{array}{cc}
0 & a\\
-a & 0
\end{array}
\right] = a
$$

$$
{\rm Pfaffian}\left[
\begin{array}{cccc}
0 & a & b & c\\
-a & 0 & d & e\\
-b & -d & 0 & f\\
-c & -e & -f & 0
\end{array}
\right] = af -be + dc
$$

$$
{\rm Pfaffian}\left[
\begin{array}{cccc}
\begin{array}{cc}
0 & \lambda_1\\
-\lambda_1 & 0
\end{array} & 0 & \cdots & 0\\
0 & 
\begin{array}{cc}
0 & \lambda_2\\
-\lambda_2 & 0
\end{array} & & 0\\
\vdots & & \ddots & \vdots\\
0 & 0 & \cdots &
\begin{array}{cc}
0 & \lambda_n\\
-\lambda_n & 0
\end{array}
\end{array}
\right] = \lambda_1\lambda_2\cdots\lambda_n
$$
\section{Formal definition}

Let $A = \{a_{i,j}\}$ be a $2n \times 2n$ skew-symmetric matrix. 
The Pfaffian of A is defined by the equation

$$Pf(A) = \frac{1}{s^n n!}\sum_{\sigma\in{}S_{2n}}sgn(\sigma)
\prod_{i=1}^n{a_{\sigma(2i-1),\sigma(2i)}}$$

where $S_{2n}$ is the symmetric group and $sgn(\sigma)$ 
is the signature of $\sigma$.

One can make use of the skew-symmetry of $A$ to avoid summing over all
possible permutations. Let $\Pi$ be the set of all partitions of 
$\{1, 2, \ldots, 2n\}$ into pairs without regard to order. 
There are $(2n - 1)!!$ such partitions. An element  
$\alpha \in \Pi$, can be written as

$$\alpha=\{(i_1,j_1),(i_2,j_2),\cdots,(i_n,j_n)\}$$

with $i_k < j_k$ and $i_1 < i_2 < \cdots < i_n$. Let

$$
\pi=
\left[
\begin{array}{cccccc}
1 & 2 & 3 & 4 & \cdots & 2n \\ 
i_1 & j_1 & i_2 & j_2 & \cdots & j_{n} 
\end{array}
\right]
$$

be a corresponding permutation. This depends only on the partition $\alpha$
and not on the particular choice of $\Pi$. Given a partition $\alpha$ as above
define

$$A_\alpha =sgn(\pi)a_{i_1,j_1}a_{i_2,j_2}\cdots a_{i_n,j_n}$$

The Pfaffian of $A$ is then given by

$$Pf(A)=\sum_{\alpha\in\Pi} A_\alpha$$

The Pfaffian of a $n\times n$ skew-symmetric matrix for n odd is
defined to be zero.

\subsection{Alternative definition}

One can associate to any skew-symmetric $2n \times 2n$ 
matrix $A=\{a_{ij}\}$ a bivector

$$\omega=\sum_{i<j} a_{ij}~e^i\wedge e^j$$

where $\{e^1, e^2, \ldots,  e^{2n}\}$ is the standard basis of 
$\mathbb{R}^{2n}$. The Pfaffian is then defined by the equation

$$\frac{1}{n!}\omega^n = \mbox{Pf}(A)~e^1\wedge e^2\wedge\cdots\wedge e^{2n}$$

here $\omega^n$ denotes the wedge product of $n$ copies of 
$\omega^n$ with itself.

\subsection{Derivation from Determinant}

The Pfaffian can be derived from the determinant for a skew-symmetric
matrix $A$ as follows. Using Laplace's formula we can write the
determinant as

$$\det(A)=(-1)^{p+1}a_{p1}A_{p1} + 
(-1)^{p+2}a_{p2}A_{p2}+\cdots+(-1)^{n+p}a_{pn}A_{pn}$$

where $A_{pi}$ is the $p,i$ minor matrix of the matrix $A$. We further
use Laplace's formula to note that

$$\det(A[A_{ij}]) = \vert A \vert^n$$

since this determinant is that of an $n \times n$ matrix whose only
non-zero elements are the diagonals (each with value det(A)) and
$[A_{ij}]$ is a matrix whose $i,j$th component is the corresponding $i,j$
minor matrix. In this way, following a proof by Parameswaran, we can
write the determinant as,

$$\det(A)\equiv\Delta_n=
\left| 
\begin{array}{cccc} 
a_{11}&a_{12}&\cdots&a_{1n}\\
a_{21}&a_{22}&\cdots&a_{2n}\\
\vdots&&&\vdots\\
a_{n1}&a_{n2}&\cdots&a_{nn}
\end{array}
\right|
$$

The minor of 
$$
\left| 
\begin{array}{cc} 
a_{11}&a_{12}\\
a_{21}&a_{22}
\end{array}
\right|
$$
would be $\Delta_{n - 2}$. With this notation

$$\left| 
\begin{array}{cccc}
1&0&\cdots&0\\
0&1&\cdots&0\\
a_{31}&a_{32}&\cdots&a_{3n}\\
\cdots&\cdots&\cdots&\cdots\\
a_{n1}&a_{n2}&\cdots&a_{nn}
\end{array}
\right|
\times 
\left| 
\begin{array}{cccc}
A_{11}&A_{21}&\cdots&A_{n1}\\
A_{12}&A_{22}&\cdots&A_{n2}\\
A_{13}&A_{23}&\cdots&A_{n3}\\
\cdots&\cdots&\cdots&\cdots\\
A_{1n}&A_{2n}&\cdots&A_{nn}
\end{array}
\right| =
\left| 
\begin{array}{cc} 
A_{11}&A_{21}\\
A_{12}&a_{22}
\end{array}
\right|
\Delta_n^{n-2}
$$

Thus

$$\Delta_{n-2}\Delta_n^{n-1}=
\left| 
\begin{array}{cc} 
A_{11}&A_{21}\\
A_{12}&a_{22}
\end{array}
\right|
\Delta_n^{n-2}
$$

Of course, it was only arbitrarily that we chose to remove the first
two rows, and more generically we can write

$$A_{rr}A_{ss} - A_{rs}A_{sr} = \Delta_{rs,rs}\Delta_n$$

where $\Delta_{rs,rs}$ is the determinant of the original matrix with
the rows $r$ and $s$, as well as the columns $r$ and $s$ removed. The
equation above simplifies in the skew-symmetric case to

$$A_{rs} = \sqrt{\Delta_{rs,rs}\Delta_n}$$

We now plug this back into the original formula for the determinant,

$$\Delta_n=
(-1)^{p+1}a_{p1}\sqrt{\Delta_{p1,p1}\Delta_n} + 
(-1)^{p+2}a_{p2}\sqrt{\Delta_{p2,p2}\Delta_n} +
\cdots +
(-1)^{n+p}a_{pn}\sqrt{\Delta_{pn,pn}\Delta_n}
$$

or with slight manipulation,

$$\sqrt{\Delta_n}=(-1)^{p+1}
\left( \ a_{p1}\sqrt{\Delta_{p1,p1}} - 
a_{p2}\sqrt{\Delta_{p2,p2}} +
\cdots +
(-1)^{n-1}a_{pn}\sqrt{\Delta_{pn,pn}} \ 
\right)
$$

The determinant is thus the square of the right hand side, and so we
identify the right hand side as the Pfaffian.

\section{Identities}

For a $2n \times 2n$ skew-symmetric matrix $A$ and an arbitrary 
$2n \times 2n$ matrix B,
\begin{itemize}
\item $Pf(A)^2 = \det(A)$
\item $Pf(BAB^T) = \det(B)Pf(A)$
\item $Pf(\lambda{}A) = \lambda^nPf(A)$
\item $Pf(A^T) = ( - 1)^nPf(A)$
\item For a block-diagonal matrix
$$A_1\oplus A_2=
\left[
\begin{array}{cc}
A_1 & 0 \\
0 & A_2 
\end{array}
\right]
$$
$$Pf(A1\oplus A2) = Pf(A_11)Pf(A_2)$$
\item For an arbitrary $n \times n$ matrix $M$:
$$\mbox{Pf}
\left[
\begin{array}{cc}
0 & M \\
-M^T & 0 
\end{array}
\right] = 
(-1)^{n(n-1)/2}\det M
$$
\end{itemize}
\section{Applications}

The Pfaffian is an invariant polynomial of a skew-symmetric matrix
(note that it is not invariant under a general change of basis but
rather under a proper orthogonal transformation). As such, it is
important in the theory of characteristic classes. In particular, it
can be used to define the Euler class of a Riemannian manifold which
is used in the generalized Gauss-Bonnet theorem.

The number of perfect matchings in a planar graph turns out to be the
absolute value of a Pfaffian, hence is polynomial time
computable. This is surprising given that for a general graph, the
problem is very difficult (so called \#P-complete). This result is used
to calculate the partition function of Ising models of spin glasses in
physics, respectively of Markov random fields in machine learning
(Globerson and Jaakkola, 2007), where the underlying graph is
planar. Recently it is also used to derive efficient algorithms for
some otherwise seemingly intractable problems, including the efficient
simulation of certain types of restricted quantum computation.

The calculation of the number of possible ways to tile a standard
chessboard or 8-by-8 checkerboard with 32 dominoes is a simple example
of a problem which may be solved through the use of the Pfaffian
technique. There are 12,988,816 possible ways to tile a chessboard in
this manner. Specifically, 12988816 is the number of possible ways to
cover an 8-by-8 square with 32 1-by-2 rectangles. 12988816 is a square
number: $12988816 = 3604^2$). Note that 12988816 can be written in the
form: $2\times 1802^2 + 2\times 1802^2$, 
where all the numbers have a digital root of 2.

More generally, the number of ways to cover a $2n \times 2n$ square with 
$2n^2$ dominoes (as calculated independently by Temperley and M.E. Fisher and
Kasteleyn in 1961) is given by

$$
\prod_{j=1}^N 
\prod_{k=1}^N 
\left ( 4\cos^2 \frac{\pi j}{2n + 1} + 
4\cos^2 \frac{\pi k}{2n + 1} \right ) 
$$

This technique can be applied in many mathematics-related subjects,
for example, in the classical, 2-dimensional computation of the
dimer-dimer correlator function in quantum mechanics.

\section{History}

The term Pfaffian was introduced by Arthur Cayley, who used the term
in 1852: "The permutants of this class (from their connection with the
researches of Pfaff on differential equations) I shall term
Pfaffians." The term honors German mathematician Johann Friedrich
Pfaff.

\section{Axiom code}
I have hacked together an algorithm to compute a Pfaffian, using an algorithm
of Gunter Rote.  Currently it's only an .input script, but if it's useful for
somebody else than myself, we could make it a little more professional.

Martin

<<*>>=
)spool pfaffian.output
)set message test on
)set message auto off
)clear all
 
--S 1 of 9
B0 n == matrix [[(if i=j+1 and odd? j then -1 else _
                   if i=j-1 and odd? i then 1 else 0) _
                     for j in 1..n] for i in 1..n]
--R 
--R                                                                   Type: Void
--E 1

--S 2 of 9
PfChar(lambda, A) ==
    n := nrows A
    (n = 2) => lambda^2 + A.(1,2)
    M := subMatrix(A, 3, n, 3, n)
    r := subMatrix(A, 1, 1, 3, n)
    s := subMatrix(A, 3, n, 2, 2)

    p := PfChar(lambda, M)
    d := degree(p, lambda)

    B := B0(n-2)
    C := r*B
    g := [(C*s).(1,1), A.(1,2), 1]
    if d >= 4 then 
        B := M*B
        for i in 4..d by 2 repeat
            C := C*B
            g := cons((C*s).(1,1), g)
    g := reverse! g

    res := 0
    for i in 0..d by 2 for j in 2..d+2 repeat
        c := coefficient(p, lambda, i)
        for e in first(g, j) for k in 2..-d by -2 repeat
            res := res +  c * e * lambda^(k+i)

    res
--R 
--R                                                                   Type: Void
--E 2

--S 3 of 9
pfaffian A == eval(PfChar(l, A), l=0)
--R 
--R                                                                   Type: Void
--E 3

--S 4 of 9
m:Matrix(Integer):=[[0,15],[-15,0]]
--R
--R        + 0    15+
--R   (4)  |        |
--R        +- 15  0 +
--R                                                         Type: Matrix Integer
--E 4

--S 5 of 9
pfaffian m
--R
--R   (5)  15
--R                                                     Type: Polynomial Integer
--E 5

--S 6 of 9
(a,b,c,d,e,f):=(3,5,7,11,13,17)
--R
--R   (6)  17
--R                                                        Type: PositiveInteger
--E

--S 7 of 9
m1:Matrix(Integer):=[[0,a,b,c],[-a,0,d,e],[-b,-d,0,f],[-c,-e,-f,0]]
--R
--R        + 0    3     5    7 +
--R        |                   |
--R        |- 3   0     11   13|
--R   (7)  |                   |
--R        |- 5  - 11   0    17|
--R        |                   |
--R        +- 7  - 13  - 17  0 +
--R                                                         Type: Matrix Integer
--E 7

--S 8 of 9
m1ans:=a*f-b*e+d*c
--R 
--R
--R   (8)  63
--R                                                        Type: PositiveInteger
--E 8

--S 9 of 9
pfaffian m1
--R 
--R   Compiling function B0 with type PositiveInteger -> Matrix Integer 
--R
--R   (9)  63
--R                                                     Type: Polynomial Integer
--E 9
)spool 
)lisp (bye)
@
\eject
\begin{thebibliography}{99}
\bibitem{1} {\bf "http://en.wikipedia.org/wiki/Pfaffian"}
\bibitem{2} ``The statistics of dimers on a lattice, Part I'', Physica, 
vol.27, 1961, pp.1209-25, P.W. Kasteleyn.
\bibitem{3} Propp, James (2004), 
``Lambda-determinants and domino-tilings'', arXiv:math.CO/0406301.
\bibitem{4} Globerson, Amir and Tommi Jaakkola (2007), 
``Approximate inference using planar graph decomposition'', 
Advances in Neural Information Processing Systems 19, MIT Press.
\bibitem{5} ``The Games and Puzzles Journal'', 
No.14, 1996, pp.204-5, Robin J. Chapman, University of Exeter
\bibitem{6} ``Domino Tilings and Products of Fibonacci and Pell numbers'', 
Journal of Integer Sequences, Vol.5, 2002, Article 02.1.2, 
James A. Sellers, The Pennsylvania State University
\bibitem{7} ``The Penguin Dictionary of Curious and Interesting Numbers'', 
revised ed., 1997, ISBN 0-14-026149-4, David Wells, p.182.
\bibitem{8} ``A Treatise on the Theory of Determinants'', 
1882, Macmillan and Co., Thomas Muir, Online
\bibitem{9} ``Skew-Symmetric Determinants'', 
The American Mathematical Monthly, vol. 61, no.2., 1954, p.116, 
S. Parameswaran Online-Subscription
\end{thebibliography}
\end{document}

\start
Date: Thu, 27 Sep 2007 20:38:10 -0400
From: Alfredo Portes
To: Tim Daly
Subject: Re: Axiom on windows

Hello everyone,

If you want you just need to change the AXIOM variable
in your Windows box (the last program that is installed
re-defines the variable).

Dos cuerpos no pueden ocupar el mismo espacio :-)

Regards,

Alfredo

On 9/27/07, Tim Daly wrote:
> Please be aware that if you have axiom installed on windows
> and you later install openaxiom, your axiom installation will break.
> Re-installing axiom will fix the problem.

\start
Date: Thu, 27 Sep 2007 22:16:22 -0500
From: Tim Daly
To: list
Subject: 20070927.01.tpd.patch

This patch adds Martin Rubey's implementation of Gunter Rote's Pfaffian 
algorithm as well as some documentation and regression test cases.

========================================================================
diff --git a/changelog b/changelog
index d085c48..c254ce6 100644
--- a/changelog
+++ b/changelog
@@ -1,3 +1,5 @@
+20070927 tpd src/input/Makefile pfaffian regression test added 
+20070927 mxr src/input/pfaffian.input regression test added 
 20070920 tpd src/input/Makefile add bug101.input regression test
 20070920 tpd src/input/bug101.input test laplace(log(z),z,w) bug 101
 20070920 wxh src/algebra/laplace.spad fix laplace(log(z),z,w) bug 101
diff --git a/src/input/Makefile.pamphlet b/src/input/Makefile.pamphlet
index b2d5fe9..b9e5374 100644
--- a/src/input/Makefile.pamphlet
+++ b/src/input/Makefile.pamphlet
@@ -338,9 +338,9 @@ REGRES= algaggr.regress algbrbf.regress  algfacob.regress alist.regress  \
     oct.regress       ode.regress      odpol.regress    op1.regress \
     opalg.regress     operator.regress op.regress       ovar.regress \
     padic.regress     parabola.regress pascal1.regress  pascal.regress \
-    patch51.regress \
+    patch51.regress   page.regress \
     patmatch.regress  pat.regress      perman.regress   perm.regress \
-    pfr1.regress      pfr.regress      page.regress     pmint.regress \
+    pfaffian.regress  pfr1.regress     pfr.regress      pmint.regress \
     poly1.regress     polycoer.regress poly.regress     psgenfcn.regress \
     quat1.regress     quat.regress     r20abugs.regress r20bugs.regress \
     r21bugsbig.regress r21bugs.regress radff.regress    radix.regress \
@@ -592,8 +592,9 @@ FILES= ${OUT}/algaggr.input  ${OUT}/algbrbf.input    ${OUT}/algfacob.input \
        ${OUT}/pascal1.input \
        ${OUT}/pascal.input   \
        ${OUT}/patch51.input \
-       ${OUT}/patmatch.input   ${OUT}/perman.input \
-       ${OUT}/perm.input     ${OUT}/pfr.input        ${OUT}/pfr1.input \
+       ${OUT}/patmatch.input ${OUT}/perman.input \
+       ${OUT}/perm.input     ${OUT}/pfaffian.input \
+       ${OUT}/pfr.input      ${OUT}/pfr1.input \
        ${OUT}/pinch.input    ${OUT}/plotfile.input   ${OUT}/pollevel.input \
        ${OUT}/pmint.input    ${OUT}/polycoer.input \
        ${OUT}/poly1.input    ${OUT}/psgenfcn.input   \
@@ -869,7 +870,8 @@ DOCFILES= \
   ${DOC}/pat.input.dvi         ${DOC}/patch51.input.dvi   \
   ${DOC}/patmatch.input.dvi   \
   ${DOC}/pdecomp0.as.dvi       ${DOC}/perman.input.dvi     \
-  ${DOC}/perm.input.dvi        ${DOC}/pfr1.input.dvi       \
+  ${DOC}/perm.input.dvi        ${DOC}/pfaffian.input.dvi   \
+  ${DOC}/pfr1.input.dvi       \
   ${DOC}/pfr.input.dvi         ${DOC}/pinch.input.dvi      \
   ${DOC}/plotfile.input.dvi    ${DOC}/plotlist.input.dvi   \
   ${DOC}/pollevel.input.dvi    ${DOC}/poly1.input.dvi      \
diff --git a/src/input/pfaffian.input.pamphlet b/src/input/pfaffian.input.pamphlet
new file mode 100755
index 0000000..ad4d7f0
--- /dev/null
+++ b/src/input/pfaffian.input.pamphlet
@@ -0,0 +1,483 @@
+\documentclass{article}
+\usepackage{amsfonts}
+\usepackage{axiom}
+\begin{document}
+\title{\$SPAD/src/input pfaffian}
+\author{Timothy Daly, Gunter Rote, Martin Rubey}
+\maketitle
+\begin{abstract}
+In mathematics, the determinant of a skew-symmetric matrix can always
+be written as the square of a polynomial in the matrix entries. This
+polynomial is called the Pfaffian of the matrix. The Pfaffian is
+nonvanishing only for $2n \times 2n$ skew-symmetric matrices, in which
+case it is a polynomial of degree $n$.
+\end{abstract}
+\eject
+\tableofcontents
+\eject
+\section{Examples}
+$$
+{\rm Pfaffian}\left[
+\begin{array}{cc}
+0 & a\\
+-a & 0
+\end{array}
+\right] = a
+$$
+
+$$
+{\rm Pfaffian}\left[
+\begin{array}{cccc}
+0 & a & b & c\\
+-a & 0 & d & e\\
+-b & -d & 0 & f\\
+-c & -e & -f & 0
+\end{array}
+\right] = af -be + dc
+$$
+
+$$
+{\rm Pfaffian}\left[
+\begin{array}{cccc}
+\begin{array}{cc}
+0 & \lambda_1\\
+-\lambda_1 & 0
+\end{array} & 0 & \cdots & 0\\
+0 & 
+\begin{array}{cc}
+0 & \lambda_2\\
+-\lambda_2 & 0
+\end{array} & & 0\\
+\vdots & & \ddots & \vdots\\
+0 & 0 & \cdots &
+\begin{array}{cc}
+0 & \lambda_n\\
+-\lambda_n & 0
+\end{array}
+\end{array}
+\right] = \lambda_1\lambda_2\cdots\lambda_n
+$$
+\section{Formal definition}
+
+Let $A = \{a_{i,j}\}$ be a $2n \times 2n$ skew-symmetric matrix. 
+The Pfaffian of A is defined by the equation
+
+$$Pf(A) = \frac{1}{s^n n!}\sum_{\sigma\in{}S_{2n}}sgn(\sigma)
+\prod_{i=1}^n{a_{\sigma(2i-1),\sigma(2i)}}$$
+
+where $S_{2n}$ is the symmetric group and $sgn(\sigma)$ 
+is the signature of $\sigma$.
+
+One can make use of the skew-symmetry of $A$ to avoid summing over all
+possible permutations. Let $\Pi$ be the set of all partitions of 
+$\{1, 2, \ldots, 2n\}$ into pairs without regard to order. 
+There are $(2n - 1)!!$ such partitions. An element  
+$\alpha \in \Pi$, can be written as
+
+$$\alpha=\{(i_1,j_1),(i_2,j_2),\cdots,(i_n,j_n)\}$$
+
+with $i_k < j_k$ and $i_1 < i_2 < \cdots < i_n$. Let
+
+$$
+\pi=
+\left[
+\begin{array}{cccccc}
+1 & 2 & 3 & 4 & \cdots & 2n \\ 
+i_1 & j_1 & i_2 & j_2 & \cdots & j_{n} 
+\end{array}
+\right]
+$$
+
+be a corresponding permutation. This depends only on the partition $\alpha$
+and not on the particular choice of $\Pi$. Given a partition $\alpha$ as above
+define
+
+$$A_\alpha =sgn(\pi)a_{i_1,j_1}a_{i_2,j_2}\cdots a_{i_n,j_n}$$
+
+The Pfaffian of $A$ is then given by
+
+$$Pf(A)=\sum_{\alpha\in\Pi} A_\alpha$$
+
+The Pfaffian of a $n\times n$ skew-symmetric matrix for n odd is
+defined to be zero.
+
+\subsection{Alternative definition}
+
+One can associate to any skew-symmetric $2n \times 2n$ 
+matrix $A=\{a_{ij}\}$ a bivector
+
+$$\omega=\sum_{i<j} a_{ij}~e^i\wedge e^j$$
+
+where $\{e^1, e^2, \ldots,  e^{2n}\}$ is the standard basis of 
+$\mathbb{R}^{2n}$. The Pfaffian is then defined by the equation
+
+$$\frac{1}{n!}\omega^n = \mbox{Pf}(A)~e^1\wedge e^2\wedge\cdots\wedge e^{2n}$$
+
+here $\omega^n$ denotes the wedge product of $n$ copies of 
+$\omega^n$ with itself.
+
+\subsection{Derivation from Determinant}
+
+The Pfaffian can be derived from the determinant for a skew-symmetric
+matrix $A$ as follows. Using Laplace's formula we can write the
+determinant as
+
+$$\det(A)=(-1)^{p+1}a_{p1}A_{p1} + 
+(-1)^{p+2}a_{p2}A_{p2}+\cdots+(-1)^{n+p}a_{pn}A_{pn}$$
+
+where $A_{pi}$ is the $p,i$ minor matrix of the matrix $A$. We further
+use Laplace's formula to note that
+
+$$\det(A[A_{ij}]) = \vert A \vert^n$$
+
+since this determinant is that of an $n \times n$ matrix whose only
+non-zero elements are the diagonals (each with value det(A)) and
+$[A_{ij}]$ is a matrix whose $i,j$th component is the corresponding $i,j$
+minor matrix. In this way, following a proof by Parameswaran, we can
+write the determinant as,
+
+$$\det(A)\equiv\Delta_n=
+\left| 
+\begin{array}{cccc} 
+a_{11}&a_{12}&\cdots&a_{1n}\\
+a_{21}&a_{22}&\cdots&a_{2n}\\
+\vdots&&&\vdots\\
+a_{n1}&a_{n2}&\cdots&a_{nn}
+\end{array}
+\right|
+$$
+
+The minor of 
+$$
+\left| 
+\begin{array}{cc} 
+a_{11}&a_{12}\\
+a_{21}&a_{22}
+\end{array}
+\right|
+$$
+would be $\Delta_{n - 2}$. With this notation
+
+$$\left| 
+\begin{array}{cccc}
+1&0&\cdots&0\\
+0&1&\cdots&0\\
+a_{31}&a_{32}&\cdots&a_{3n}\\
+\cdots&\cdots&\cdots&\cdots\\
+a_{n1}&a_{n2}&\cdots&a_{nn}
+\end{array}
+\right|
+\times 
+\left| 
+\begin{array}{cccc}
+A_{11}&A_{21}&\cdots&A_{n1}\\
+A_{12}&A_{22}&\cdots&A_{n2}\\
+A_{13}&A_{23}&\cdots&A_{n3}\\
+\cdots&\cdots&\cdots&\cdots\\
+A_{1n}&A_{2n}&\cdots&A_{nn}
+\end{array}
+\right| =
+\left| 
+\begin{array}{cc} 
+A_{11}&A_{21}\\
+A_{12}&a_{22}
+\end{array}
+\right|
+\Delta_n^{n-2}
+$$
+
+Thus
+
+$$\Delta_{n-2}\Delta_n^{n-1}=
+\left| 
+\begin{array}{cc} 
+A_{11}&A_{21}\\
+A_{12}&a_{22}
+\end{array}
+\right|
+\Delta_n^{n-2}
+$$
+
+Of course, it was only arbitrarily that we chose to remove the first
+two rows, and more generically we can write
+
+$$A_{rr}A_{ss} - A_{rs}A_{sr} = \Delta_{rs,rs}\Delta_n$$
+
+where $\Delta_{rs,rs}$ is the determinant of the original matrix with
+the rows $r$ and $s$, as well as the columns $r$ and $s$ removed. The
+equation above simplifies in the skew-symmetric case to
+
+$$A_{rs} = \sqrt{\Delta_{rs,rs}\Delta_n}$$
+
+We now plug this back into the original formula for the determinant,
+
+$$\Delta_n=
+(-1)^{p+1}a_{p1}\sqrt{\Delta_{p1,p1}\Delta_n} + 
+(-1)^{p+2}a_{p2}\sqrt{\Delta_{p2,p2}\Delta_n} +
+\cdots +
+(-1)^{n+p}a_{pn}\sqrt{\Delta_{pn,pn}\Delta_n}
+$$
+
+or with slight manipulation,
+
+$$\sqrt{\Delta_n}=(-1)^{p+1}
+\left( \ a_{p1}\sqrt{\Delta_{p1,p1}} - 
+a_{p2}\sqrt{\Delta_{p2,p2}} +
+\cdots +
+(-1)^{n-1}a_{pn}\sqrt{\Delta_{pn,pn}} \ 
+\right)
+$$
+
+The determinant is thus the square of the right hand side, and so we
+identify the right hand side as the Pfaffian.
+
+\section{Identities}
+
+For a $2n \times 2n$ skew-symmetric matrix $A$ and an arbitrary 
+$2n \times 2n$ matrix B,
+\begin{itemize}
+\item $Pf(A)^2 = \det(A)$
+\item $Pf(BAB^T) = \det(B)Pf(A)$
+\item $Pf(\lambda{}A) = \lambda^nPf(A)$
+\item $Pf(A^T) = ( - 1)^nPf(A)$
+\item For a block-diagonal matrix
+$$A_1\oplus A_2=
+\left[
+\begin{array}{cc}
+A_1 & 0 \\
+0 & A_2 
+\end{array}
+\right]
+$$
+$$Pf(A1\oplus A2) = Pf(A_11)Pf(A_2)$$
+\item For an arbitrary $n \times n$ matrix $M$:
+$$\mbox{Pf}
+\left[
+\begin{array}{cc}
+0 & M \\
+-M^T & 0 
+\end{array}
+\right] = 
+(-1)^{n(n-1)/2}\det M
+$$
+\end{itemize}
+\section{Applications}
+
+The Pfaffian is an invariant polynomial of a skew-symmetric matrix
+(note that it is not invariant under a general change of basis but
+rather under a proper orthogonal transformation). As such, it is
+important in the theory of characteristic classes. In particular, it
+can be used to define the Euler class of a Riemannian manifold which
+is used in the generalized Gauss-Bonnet theorem.
+
+The number of perfect matchings in a planar graph turns out to be the
+absolute value of a Pfaffian, hence is polynomial time
+computable. This is surprising given that for a general graph, the
+problem is very difficult (so called \#P-complete). This result is used
+to calculate the partition function of Ising models of spin glasses in
+physics, respectively of Markov random fields in machine learning
+(Globerson and Jaakkola, 2007), where the underlying graph is
+planar. Recently it is also used to derive efficient algorithms for
+some otherwise seemingly intractable problems, including the efficient
+simulation of certain types of restricted quantum computation.
+
+The calculation of the number of possible ways to tile a standard
+chessboard or 8-by-8 checkerboard with 32 dominoes is a simple example
+of a problem which may be solved through the use of the Pfaffian
+technique. There are 12,988,816 possible ways to tile a chessboard in
+this manner. Specifically, 12988816 is the number of possible ways to
+cover an 8-by-8 square with 32 1-by-2 rectangles. 12988816 is a square
+number: $12988816 = 3604^2$). Note that 12988816 can be written in the
+form: $2\times 1802^2 + 2\times 1802^2$, 
+where all the numbers have a digital root of 2.
+
+More generally, the number of ways to cover a $2n \times 2n$ square with 
+$2n^2$ dominoes (as calculated independently by Temperley and M.E. Fisher and
+Kasteleyn in 1961) is given by
+
+$$
+\prod_{j=1}^N 
+\prod_{k=1}^N 
+\left ( 4\cos^2 \frac{\pi j}{2n + 1} + 
+4\cos^2 \frac{\pi k}{2n + 1} \right ) 
+$$
+
+This technique can be applied in many mathematics-related subjects,
+for example, in the classical, 2-dimensional computation of the
+dimer-dimer correlator function in quantum mechanics.
+
+\section{History}
+
+The term Pfaffian was introduced by Arthur Cayley, who used the term
+in 1852: ``The permutants of this class (from their connection with the
+researches of Pfaff on differential equations) I shall term
+Pfaffians.'' The term honors German mathematician Johann Friedrich
+Pfaff.
+
+\section{Axiom code}
+I have hacked together an algorithm to compute a Pfaffian, using an algorithm
+of Gunter Rote.  Currently it's only an .input script, but if it's useful for
+somebody else than myself, we could make it a little more professional.
+
+Martin
+
+<<*>>=
+)spool pfaffian.output
+)set message test on
+)set message auto off
+)clear all
+ 
+--S 1 of 12
+B0 n == matrix [[(if i=j+1 and odd? j then -1 else _
+                   if i=j-1 and odd? i then 1 else 0) _
+                     for j in 1..n] for i in 1..n]
+--R 
+--R                                                                   Type: Void
+--E 1
+
+--S 2 of 12
+PfChar(lambda, A) ==
+    n := nrows A
+    (n = 2) => lambda^2 + A.(1,2)
+    M := subMatrix(A, 3, n, 3, n)
+    r := subMatrix(A, 1, 1, 3, n)
+    s := subMatrix(A, 3, n, 2, 2)
+
+    p := PfChar(lambda, M)
+    d := degree(p, lambda)
+
+    B := B0(n-2)
+    C := r*B
+    g := [(C*s).(1,1), A.(1,2), 1]
+    if d >= 4 then 
+        B := M*B
+        for i in 4..d by 2 repeat
+            C := C*B
+            g := cons((C*s).(1,1), g)
+    g := reverse! g
+
+    res := 0
+    for i in 0..d by 2 for j in 2..d+2 repeat
+        c := coefficient(p, lambda, i)
+        for e in first(g, j) for k in 2..-d by -2 repeat
+            res := res +  c * e * lambda^(k+i)
+
+    res
+--R 
+--R                                                                   Type: Void
+--E 2
+
+--S 3 of 12
+pfaffian A == eval(PfChar(l, A), l=0)
+--R 
+--R                                                                   Type: Void
+--E 3
+
+--S 4 of 12
+m:Matrix(Integer):=[[0,15],[-15,0]]
+--R
+--R        + 0    15+
+--R   (4)  |        |
+--R        +- 15  0 +
+--R                                                         Type: Matrix Integer
+--E 4
+
+--S 5 of 12
+pfaffian m
+--R
+--R   (5)  15
+--R                                                     Type: Polynomial Integer
+--E 5
+
+--S 6 of 12
+m1:Matrix(Polynomial(Integer)):=[[0,a,b,c],[-a,0,d,e],[-b,-d,0,f],[-c,-e,-f,0]]
+--R 
+--R
+--R        + 0    a    b   c+
+--R        |                |
+--R        |- a   0    d   e|
+--R   (6)  |                |
+--R        |- b  - d   0   f|
+--R        |                |
+--R        +- c  - e  - f  0+
+--R                                              Type: Matrix Polynomial Integer
+--E 6
+
+--S 7 of 12
+pfaffian m1
+--R 
+--R   Compiling function B0 with type PositiveInteger -> Matrix Integer 
+--R
+--R   (7)  a f - b e + c d
+--R                                                     Type: Polynomial Integer
+--E 7
+
+--S 8 of 12
+(a,b,c,d,e,f):=(3,5,7,11,13,17)
+--R
+--R   (8)  17
+--R                                                        Type: PositiveInteger
+--E 8
+
+--S 9 of 12
+m1
+--R 
+--R
+--R        + 0    a    b   c+
+--R        |                |
+--R        |- a   0    d   e|
+--R   (9)  |                |
+--R        |- b  - d   0   f|
+--R        |                |
+--R        +- c  - e  - f  0+
+--R                                              Type: Matrix Polynomial Integer
+--E 9
+
+--S 10 of 12
+a*f-b*e+d*c
+--R 
+--R
+--R   (10)  63
+--R                                                        Type: PositiveInteger
+--E 10
+
+--S 11 of 12
+n:=pfaffian m1
+--R
+--R   (11)  a f - b e + c d
+--R                                                     Type: Polynomial Integer
+--E 9
+
+--S 12 of 12
+eval(n,['a,'b,'c,'d,'e,'f]::List(Symbol),[a,b,c,d,e,f])
+--R
+--R   (12)  63
+--R                                                     Type: Polynomial Integer
+--E 12
+)spool 
+)lisp (bye)
+@
+\eject
+\begin{thebibliography}{99}
+\bibitem{1} {\bf ``http://en.wikipedia.org/wiki/Pfaffian''}
+\bibitem{2} ``The statistics of dimers on a lattice, Part I'', Physica, 
+vol.27, 1961, pp.1209-25, P.W. Kasteleyn.
+\bibitem{3} Propp, James (2004), 
+``Lambda-determinants and domino-tilings'', arXiv:math.CO/0406301.
+\bibitem{4} Globerson, Amir and Tommi Jaakkola (2007), 
+``Approximate inference using planar graph decomposition'', 
+Advances in Neural Information Processing Systems 19, MIT Press.
+\bibitem{5} ``The Games and Puzzles Journal'', 
+No.14, 1996, pp.204-5, Robin J. Chapman, University of Exeter
+\bibitem{6} ``Domino Tilings and Products of Fibonacci and Pell numbers'', 
+Journal of Integer Sequences, Vol.5, 2002, Article 02.1.2, 
+James A. Sellers, The Pennsylvania State University
+\bibitem{7} ``The Penguin Dictionary of Curious and Interesting Numbers'', 
+revised ed., 1997, ISBN 0-14-026149-4, David Wells, p.182.
+\bibitem{8} ``A Treatise on the Theory of Determinants'', 
+1882, Macmillan and Co., Thomas Muir, Online
+\bibitem{9} ``Skew-Symmetric Determinants'', 
+The American Mathematical Monthly, vol. 61, no.2., 1954, p.116, 
+S. Parameswaran Online-Subscription
+\end{thebibliography}
+\end{document}

\start
Date: 28 Sep 2007 08:23:54 +0200
From: Martin Rubey
To: Tim Daly
Subject: Re: pfaffian.input.pamphlet

Tim Daly writes:

> Martin,
>
> Attached is a pamphlet file documenting Pfaffian along with regression
> test cases. I've added it to axiom and am running a regression test
> cycle now.
>
> Tim

Many thanks.  Although I'm still unsure whether it wouldn't make more
 sense to just link to wikipedia.  It looks like duplicate effort to
 me.

Another tiny issue: this algorithm makes sense only for domains where
 there is no division or division is "slow", i.e., quotient fields.
 For floats or pr ime fields there are much faster algorithms.

It's just the same as with the determinant.  But I do not have the
time to sort these things out.

Martin

> =========================
==========================
=======================
> \documentclass{article}
> \usepackage{amsfonts}
> \usepackage{axiom}
> \begin{document}
> \title{\$SPAD/src/input pfaffian}
> \author{Timothy Daly, Gunter Rote, Martin Rubey}
\author{Timothy Daly, G=C3=BCnter Rote, Martin Rubey}

[...]

> \bibitem{9} ``Skew-Symmetric Determinants'',
> The American Mathematical Monthly, vol. 61, no.2., 1954, p.116,
> S. Parameswaran Online-Subscription

@article{570734,
 author = {G\"{u}nter Rote},
 title = {Division-free algorithms for the determinant and the Pfaffian:
 algebraic and combinatorial approaches},
 book = {Computational Discrete Mathematics: advanced lectures},
 year = {2001},
 isbn = {3-540-42775-9},
 pages = {119--135},
 publisher = {Springer-Verlag New York, Inc.},
 address = {New York, NY, USA},
 eprint = {http://page.mi.fu-berlin.de/rote/Papers/abstract/Division-free=
+algorithms+for+the+determinant+and+the+Pfaffian:+algebraic+and+combinatori=
al+approaches.html}
 }

> \end{thebibliography}
> \end{document}

\start
Date: Fri, 28 Sep 2007 02:46:35 -0400
From: Tim Daly
To: Martin Rubey
Subject: Re: pfaffian.input.pamphlet

>Many thanks.  Although I'm still unsure whether it wouldn't make more sense to
>just link to wikipedia.  It looks like duplicate effort to me.

In the longer term the documentation should explain the details of the
implementation as well as the theory. I didn't do that.

In the small it is duplicate effort but this algorithm should probably
go into the matrix domain. Eventually the documentation would end up
being more specific to the whole domain. 

In general all of the algorithms in Axiom have documentation
"somewhere" but my goal is to make the documentation an integral part
of the whole system architecture.

>Another tiny issue: this algorithm makes sense only for domains where there is
>no division or division is "slow", i.e., quotient fields.  For floats or prime
>fields there are much faster algorithms.

> It's just the same as with the determinant.  
> But I do not have the time to sort these things out.

If it lived in the algebra it would be reasonably straightforward to
have other pfaffian algorithms override this one for the specific domains
(e.g floats). Structurally that's exactly where Axiom wins.

I thought about putting it directly into Matrix but I'm busy with a
major rewrite of hyperdoc and wanted to capture it while I had the
ambition.

And, as a bonus, I tripped across a bug and a puzzling limitation.

Thanks for sharing the algorithm.

\start
Date: Sat, 29 Sep 2007 05:04:34 -0400
From: Alfredo Portes
To: list
Subject: End Of File

Hi everyone,

I think Arthur was going to be offline for
a couple days. Can somebody translate
this line for me:

while (char := STRING(READ_-CHAR_-NO_-HANG(s,NIL$Lisp,'EOF)$Lisp)$Lisp)
^= "EOF" repeat
             headers := concat [headers,char]

Better said, what does this do:

READ_-CHAR_-NO_-HANG(s,NIL$Lisp,'EOF)

What is necessary to kill this loop (end of file signal).

http://wiki.axiom-developer.org/images/AxServer.pamphlet

Sorry for the dumb question :-),

\start
Date: 29 Sep 2007 15:38:48 +0200
From: Martin Rubey
To: Tim Daly, Bill Page
Subject: Copyright notice Re: pfaffian.input.pamphlet

Dear Tim,

I just realised that you are possibly breaking Copyright in your pamphlet.  See
http://en.wikipedia.org/wiki/Wikipedia:Text_of_the_GNU_Free_Documentation_License 

\start
Date: Sat, 29 Sep 2007 11:41:20 -0400
From: Tim Daly
To: Alfredo Portes
Subject: Re: End Of File

Alfredo,

READ-CHAR-NO-HANG is looked for the EOF (end of file) marker.
However, the read to the socket always returns a zero length
string so read-char-no-hang returns that string and the loop
will never terminate.

The problem is that the socket is not working properly.
We need to debug this.

\start
Date: Sat, 29 Sep 2007 11:43:33 -0400
From: Tim Daly
To: Martin Rubey
Subject: Re: Copyright notice Re: pfaffian.input.pamphlet
Cc: Bill Page

> I just realised that you are possibly breaking Copyright in your pamphlet.  See
> <http://en.wikipedia.org/wiki/Wikipedia:Text_of_the_GNU_Free_Documentation_License>

Ok. I'll withdraw the change and see if I can understand what it takes to
be in compliance. I read the license over once and I'm not sure what it
means. It will take several readings to guess. Thanks for the heads-up.

\start
Date: Sat, 29 Sep 2007 11:00:55 -0500
From: Tim Daly
To: list
Subject: 20070929.01.tpd.patch

This change removes pfaffian.input.pamphlet.

=======================================================================
diff --git a/changelog b/changelog
index c254ce6..6c10a71 100644
--- a/changelog
+++ b/changelog
@@ -1,3 +1,5 @@
+20070929 tpd src/input/Makefile pfaffian regression test removed
+20070929 tpd src/input/pfaffian.input regression test removed
 20070927 tpd src/input/Makefile pfaffian regression test added 
 20070927 mxr src/input/pfaffian.input regression test added 
 20070920 tpd src/input/Makefile add bug101.input regression test
diff --git a/src/input/Makefile.pamphlet b/src/input/Makefile.pamphlet
index b9e5374..f62095a 100644
--- a/src/input/Makefile.pamphlet
+++ b/src/input/Makefile.pamphlet
@@ -340,7 +340,7 @@ REGRES= algaggr.regress algbrbf.regress  algfacob.regress alist.regress  \
     padic.regress     parabola.regress pascal1.regress  pascal.regress \
     patch51.regress   page.regress \
     patmatch.regress  pat.regress      perman.regress   perm.regress \
-    pfaffian.regress  pfr1.regress     pfr.regress      pmint.regress \
+    pfr1.regress      pfr.regress      pmint.regress \
     poly1.regress     polycoer.regress poly.regress     psgenfcn.regress \
     quat1.regress     quat.regress     r20abugs.regress r20bugs.regress \
     r21bugsbig.regress r21bugs.regress radff.regress    radix.regress \
@@ -593,7 +593,7 @@ FILES= ${OUT}/algaggr.input  ${OUT}/algbrbf.input    ${OUT}/algfacob.input \
        ${OUT}/pascal.input   \
        ${OUT}/patch51.input \
        ${OUT}/patmatch.input ${OUT}/perman.input \
-       ${OUT}/perm.input     ${OUT}/pfaffian.input \
+       ${OUT}/perm.input     \
        ${OUT}/pfr.input      ${OUT}/pfr1.input \
        ${OUT}/pinch.input    ${OUT}/plotfile.input   ${OUT}/pollevel.input \
        ${OUT}/pmint.input    ${OUT}/polycoer.input \
@@ -870,7 +870,7 @@ DOCFILES= \
   ${DOC}/pat.input.dvi         ${DOC}/patch51.input.dvi   \
   ${DOC}/patmatch.input.dvi   \
   ${DOC}/pdecomp0.as.dvi       ${DOC}/perman.input.dvi     \
-  ${DOC}/perm.input.dvi        ${DOC}/pfaffian.input.dvi   \
+  ${DOC}/perm.input.dvi        \
   ${DOC}/pfr1.input.dvi       \
   ${DOC}/pfr.input.dvi         ${DOC}/pinch.input.dvi      \
   ${DOC}/plotfile.input.dvi    ${DOC}/plotlist.input.dvi   \
diff --git a/src/input/pfaffian.input.pamphlet b/src/input/pfaffian.input.pamphlet
deleted file mode 100755
index ad4d7f0..0000000
--- a/src/input/pfaffian.input.pamphlet
+++ /dev/null
@@ -1,483 +0,0 @@
-\documentclass{article}
-\usepackage{amsfonts}
-\usepackage{axiom}
-\begin{document}
-\title{\$SPAD/src/input pfaffian}
-\author{Timothy Daly, Gunter Rote, Martin Rubey}
-\maketitle
-\begin{abstract}
-In mathematics, the determinant of a skew-symmetric matrix can always
-be written as the square of a polynomial in the matrix entries. This
-polynomial is called the Pfaffian of the matrix. The Pfaffian is
-nonvanishing only for $2n \times 2n$ skew-symmetric matrices, in which
-case it is a polynomial of degree $n$.
-\end{abstract}
-\eject
-\tableofcontents
-\eject
-\section{Examples}
-$$
-{\rm Pfaffian}\left[
-\begin{array}{cc}
-0 & a\\
--a & 0
-\end{array}
-\right] = a
-$$
-
-$$
-{\rm Pfaffian}\left[
-\begin{array}{cccc}
-0 & a & b & c\\
--a & 0 & d & e\\
--b & -d & 0 & f\\
--c & -e & -f & 0
-\end{array}
-\right] = af -be + dc
-$$
-
-$$
-{\rm Pfaffian}\left[
-\begin{array}{cccc}
-\begin{array}{cc}
-0 & \lambda_1\\
--\lambda_1 & 0
-\end{array} & 0 & \cdots & 0\\
-0 & 
-\begin{array}{cc}
-0 & \lambda_2\\
--\lambda_2 & 0
-\end{array} & & 0\\
-\vdots & & \ddots & \vdots\\
-0 & 0 & \cdots &
-\begin{array}{cc}
-0 & \lambda_n\\
--\lambda_n & 0
-\end{array}
-\end{array}
-\right] = \lambda_1\lambda_2\cdots\lambda_n
-$$
-\section{Formal definition}
-
-Let $A = \{a_{i,j}\}$ be a $2n \times 2n$ skew-symmetric matrix. 
-The Pfaffian of A is defined by the equation
-
-$$Pf(A) = \frac{1}{s^n n!}\sum_{\sigma\in{}S_{2n}}sgn(\sigma)
-\prod_{i=1}^n{a_{\sigma(2i-1),\sigma(2i)}}$$
-
-where $S_{2n}$ is the symmetric group and $sgn(\sigma)$ 
-is the signature of $\sigma$.
-
-One can make use of the skew-symmetry of $A$ to avoid summing over all
-possible permutations. Let $\Pi$ be the set of all partitions of 
-$\{1, 2, \ldots, 2n\}$ into pairs without regard to order. 
-There are $(2n - 1)!!$ such partitions. An element  
-$\alpha \in \Pi$, can be written as
-
-$$\alpha=\{(i_1,j_1),(i_2,j_2),\cdots,(i_n,j_n)\}$$
-
-with $i_k < j_k$ and $i_1 < i_2 < \cdots < i_n$. Let
-
-$$
-\pi=
-\left[
-\begin{array}{cccccc}
-1 & 2 & 3 & 4 & \cdots & 2n \\ 
-i_1 & j_1 & i_2 & j_2 & \cdots & j_{n} 
-\end{array}
-\right]
-$$
-
-be a corresponding permutation. This depends only on the partition $\alpha$
-and not on the particular choice of $\Pi$. Given a partition $\alpha$ as above
-define
-
-$$A_\alpha =sgn(\pi)a_{i_1,j_1}a_{i_2,j_2}\cdots a_{i_n,j_n}$$
-
-The Pfaffian of $A$ is then given by
-
-$$Pf(A)=\sum_{\alpha\in\Pi} A_\alpha$$
-
-The Pfaffian of a $n\times n$ skew-symmetric matrix for n odd is
-defined to be zero.
-
-\subsection{Alternative definition}
-
-One can associate to any skew-symmetric $2n \times 2n$ 
-matrix $A=\{a_{ij}\}$ a bivector
-
-$$\omega=\sum_{i<j} a_{ij}~e^i\wedge e^j$$
-
-where $\{e^1, e^2, \ldots,  e^{2n}\}$ is the standard basis of 
-$\mathbb{R}^{2n}$. The Pfaffian is then defined by the equation
-
-$$\frac{1}{n!}\omega^n = \mbox{Pf}(A)~e^1\wedge e^2\wedge\cdots\wedge e^{2n}$$
-
-here $\omega^n$ denotes the wedge product of $n$ copies of 
-$\omega^n$ with itself.
-
-\subsection{Derivation from Determinant}
-
-The Pfaffian can be derived from the determinant for a skew-symmetric
-matrix $A$ as follows. Using Laplace's formula we can write the
-determinant as
-
-$$\det(A)=(-1)^{p+1}a_{p1}A_{p1} + 
-(-1)^{p+2}a_{p2}A_{p2}+\cdots+(-1)^{n+p}a_{pn}A_{pn}$$
-
-where $A_{pi}$ is the $p,i$ minor matrix of the matrix $A$. We further
-use Laplace's formula to note that
-
-$$\det(A[A_{ij}]) = \vert A \vert^n$$
-
-since this determinant is that of an $n \times n$ matrix whose only
-non-zero elements are the diagonals (each with value det(A)) and
-$[A_{ij}]$ is a matrix whose $i,j$th component is the corresponding $i,j$
-minor matrix. In this way, following a proof by Parameswaran, we can
-write the determinant as,
-
-$$\det(A)\equiv\Delta_n=
-\left| 
-\begin{array}{cccc} 
-a_{11}&a_{12}&\cdots&a_{1n}\\
-a_{21}&a_{22}&\cdots&a_{2n}\\
-\vdots&&&\vdots\\
-a_{n1}&a_{n2}&\cdots&a_{nn}
-\end{array}
-\right|
-$$
-
-The minor of 
-$$
-\left| 
-\begin{array}{cc} 
-a_{11}&a_{12}\\
-a_{21}&a_{22}
-\end{array}
-\right|
-$$
-would be $\Delta_{n - 2}$. With this notation
-
-$$\left| 
-\begin{array}{cccc}
-1&0&\cdots&0\\
-0&1&\cdots&0\\
-a_{31}&a_{32}&\cdots&a_{3n}\\
-\cdots&\cdots&\cdots&\cdots\\
-a_{n1}&a_{n2}&\cdots&a_{nn}
-\end{array}
-\right|
-\times 
-\left| 
-\begin{array}{cccc}
-A_{11}&A_{21}&\cdots&A_{n1}\\
-A_{12}&A_{22}&\cdots&A_{n2}\\
-A_{13}&A_{23}&\cdots&A_{n3}\\
-\cdots&\cdots&\cdots&\cdots\\
-A_{1n}&A_{2n}&\cdots&A_{nn}
-\end{array}
-\right| =
-\left| 
-\begin{array}{cc} 
-A_{11}&A_{21}\\
-A_{12}&a_{22}
-\end{array}
-\right|
-\Delta_n^{n-2}
-$$
-
-Thus
-
-$$\Delta_{n-2}\Delta_n^{n-1}=
-\left| 
-\begin{array}{cc} 
-A_{11}&A_{21}\\
-A_{12}&a_{22}
-\end{array}
-\right|
-\Delta_n^{n-2}
-$$
-
-Of course, it was only arbitrarily that we chose to remove the first
-two rows, and more generically we can write
-
-$$A_{rr}A_{ss} - A_{rs}A_{sr} = \Delta_{rs,rs}\Delta_n$$
-
-where $\Delta_{rs,rs}$ is the determinant of the original matrix with
-the rows $r$ and $s$, as well as the columns $r$ and $s$ removed. The
-equation above simplifies in the skew-symmetric case to
-
-$$A_{rs} = \sqrt{\Delta_{rs,rs}\Delta_n}$$
-
-We now plug this back into the original formula for the determinant,
-
-$$\Delta_n=
-(-1)^{p+1}a_{p1}\sqrt{\Delta_{p1,p1}\Delta_n} + 
-(-1)^{p+2}a_{p2}\sqrt{\Delta_{p2,p2}\Delta_n} +
-\cdots +
-(-1)^{n+p}a_{pn}\sqrt{\Delta_{pn,pn}\Delta_n}
-$$
-
-or with slight manipulation,
-
-$$\sqrt{\Delta_n}=(-1)^{p+1}
-\left( \ a_{p1}\sqrt{\Delta_{p1,p1}} - 
-a_{p2}\sqrt{\Delta_{p2,p2}} +
-\cdots +
-(-1)^{n-1}a_{pn}\sqrt{\Delta_{pn,pn}} \ 
-\right)
-$$
-
-The determinant is thus the square of the right hand side, and so we
-identify the right hand side as the Pfaffian.
-
-\section{Identities}
-
-For a $2n \times 2n$ skew-symmetric matrix $A$ and an arbitrary 
-$2n \times 2n$ matrix B,
-\begin{itemize}
-\item $Pf(A)^2 = \det(A)$
-\item $Pf(BAB^T) = \det(B)Pf(A)$
-\item $Pf(\lambda{}A) = \lambda^nPf(A)$
-\item $Pf(A^T) = ( - 1)^nPf(A)$
-\item For a block-diagonal matrix
-$$A_1\oplus A_2=
-\left[
-\begin{array}{cc}
-A_1 & 0 \\
-0 & A_2 
-\end{array}
-\right]
-$$
-$$Pf(A1\oplus A2) = Pf(A_11)Pf(A_2)$$
-\item For an arbitrary $n \times n$ matrix $M$:
-$$\mbox{Pf}
-\left[
-\begin{array}{cc}
-0 & M \\
--M^T & 0 
-\end{array}
-\right] = 
-(-1)^{n(n-1)/2}\det M
-$$
-\end{itemize}
-\section{Applications}
-
-The Pfaffian is an invariant polynomial of a skew-symmetric matrix
-(note that it is not invariant under a general change of basis but
-rather under a proper orthogonal transformation). As such, it is
-important in the theory of characteristic classes. In particular, it
-can be used to define the Euler class of a Riemannian manifold which
-is used in the generalized Gauss-Bonnet theorem.
-
-The number of perfect matchings in a planar graph turns out to be the
-absolute value of a Pfaffian, hence is polynomial time
-computable. This is surprising given that for a general graph, the
-problem is very difficult (so called \#P-complete). This result is used
-to calculate the partition function of Ising models of spin glasses in
-physics, respectively of Markov random fields in machine learning
-(Globerson and Jaakkola, 2007), where the underlying graph is
-planar. Recently it is also used to derive efficient algorithms for
-some otherwise seemingly intractable problems, including the efficient
-simulation of certain types of restricted quantum computation.
-
-The calculation of the number of possible ways to tile a standard
-chessboard or 8-by-8 checkerboard with 32 dominoes is a simple example
-of a problem which may be solved through the use of the Pfaffian
-technique. There are 12,988,816 possible ways to tile a chessboard in
-this manner. Specifically, 12988816 is the number of possible ways to
-cover an 8-by-8 square with 32 1-by-2 rectangles. 12988816 is a square
-number: $12988816 = 3604^2$). Note that 12988816 can be written in the
-form: $2\times 1802^2 + 2\times 1802^2$, 
-where all the numbers have a digital root of 2.
-
-More generally, the number of ways to cover a $2n \times 2n$ square with 
-$2n^2$ dominoes (as calculated independently by Temperley and M.E. Fisher and
-Kasteleyn in 1961) is given by
-
-$$
-\prod_{j=1}^N 
-\prod_{k=1}^N 
-\left ( 4\cos^2 \frac{\pi j}{2n + 1} + 
-4\cos^2 \frac{\pi k}{2n + 1} \right ) 
-$$
-
-This technique can be applied in many mathematics-related subjects,
-for example, in the classical, 2-dimensional computation of the
-dimer-dimer correlator function in quantum mechanics.
-
-\section{History}
-
-The term Pfaffian was introduced by Arthur Cayley, who used the term
-in 1852: ``The permutants of this class (from their connection with the
-researches of Pfaff on differential equations) I shall term
-Pfaffians.'' The term honors German mathematician Johann Friedrich
-Pfaff.
-
-\section{Axiom code}
-I have hacked together an algorithm to compute a Pfaffian, using an algorithm
-of Gunter Rote.  Currently it's only an .input script, but if it's useful for
-somebody else than myself, we could make it a little more professional.
-
-Martin
-
-<<*>>=
-)spool pfaffian.output
-)set message test on
-)set message auto off
-)clear all
- 
---S 1 of 12
-B0 n == matrix [[(if i=j+1 and odd? j then -1 else _
-                   if i=j-1 and odd? i then 1 else 0) _
-                     for j in 1..n] for i in 1..n]
---R 
---R                                                                   Type: Void
---E 1
-
---S 2 of 12
-PfChar(lambda, A) ==
-    n := nrows A
-    (n = 2) => lambda^2 + A.(1,2)
-    M := subMatrix(A, 3, n, 3, n)
-    r := subMatrix(A, 1, 1, 3, n)
-    s := subMatrix(A, 3, n, 2, 2)
-
-    p := PfChar(lambda, M)
-    d := degree(p, lambda)
-
-    B := B0(n-2)
-    C := r*B
-    g := [(C*s).(1,1), A.(1,2), 1]
-    if d >= 4 then 
-        B := M*B
-        for i in 4..d by 2 repeat
-            C := C*B
-            g := cons((C*s).(1,1), g)
-    g := reverse! g
-
-    res := 0
-    for i in 0..d by 2 for j in 2..d+2 repeat
-        c := coefficient(p, lambda, i)
-        for e in first(g, j) for k in 2..-d by -2 repeat
-            res := res +  c * e * lambda^(k+i)
-
-    res
---R 
---R                                                                   Type: Void
---E 2
-
---S 3 of 12
-pfaffian A == eval(PfChar(l, A), l=0)
---R 
---R                                                                   Type: Void
---E 3
-
---S 4 of 12
-m:Matrix(Integer):=[[0,15],[-15,0]]
---R
---R        + 0    15+
---R   (4)  |        |
---R        +- 15  0 +
---R                                                         Type: Matrix Integer
---E 4
-
---S 5 of 12
-pfaffian m
---R
---R   (5)  15
---R                                                     Type: Polynomial Integer
---E 5
-
---S 6 of 12
-m1:Matrix(Polynomial(Integer)):=[[0,a,b,c],[-a,0,d,e],[-b,-d,0,f],[-c,-e,-f,0]]
---R 
---R
---R        + 0    a    b   c+
---R        |                |
---R        |- a   0    d   e|
---R   (6)  |                |
---R        |- b  - d   0   f|
---R        |                |
---R        +- c  - e  - f  0+
---R                                              Type: Matrix Polynomial Integer
---E 6
-
---S 7 of 12
-pfaffian m1
---R 
---R   Compiling function B0 with type PositiveInteger -> Matrix Integer 
---R
---R   (7)  a f - b e + c d
---R                                                     Type: Polynomial Integer
---E 7
-
---S 8 of 12
-(a,b,c,d,e,f):=(3,5,7,11,13,17)
---R
---R   (8)  17
---R                                                        Type: PositiveInteger
---E 8
-
---S 9 of 12
-m1
---R 
---R
---R        + 0    a    b   c+
---R        |                |
---R        |- a   0    d   e|
---R   (9)  |                |
---R        |- b  - d   0   f|
---R        |                |
---R        +- c  - e  - f  0+
---R                                              Type: Matrix Polynomial Integer
---E 9
-
---S 10 of 12
-a*f-b*e+d*c
---R 
---R
---R   (10)  63
---R                                                        Type: PositiveInteger
---E 10
-
---S 11 of 12
-n:=pfaffian m1
---R
---R   (11)  a f - b e + c d
---R                                                     Type: Polynomial Integer
---E 9
-
---S 12 of 12
-eval(n,['a,'b,'c,'d,'e,'f]::List(Symbol),[a,b,c,d,e,f])
---R
---R   (12)  63
---R                                                     Type: Polynomial Integer
---E 12
-)spool 
-)lisp (bye)
-@
-\eject
-\begin{thebibliography}{99}
-\bibitem{1} {\bf ``http://en.wikipedia.org/wiki/Pfaffian''}
-\bibitem{2} ``The statistics of dimers on a lattice, Part I'', Physica, 
-vol.27, 1961, pp.1209-25, P.W. Kasteleyn.
-\bibitem{3} Propp, James (2004), 
-``Lambda-determinants and domino-tilings'', arXiv:math.CO/0406301.
-\bibitem{4} Globerson, Amir and Tommi Jaakkola (2007), 
-``Approximate inference using planar graph decomposition'', 
-Advances in Neural Information Processing Systems 19, MIT Press.
-\bibitem{5} ``The Games and Puzzles Journal'', 
-No.14, 1996, pp.204-5, Robin J. Chapman, University of Exeter
-\bibitem{6} ``Domino Tilings and Products of Fibonacci and Pell numbers'', 
-Journal of Integer Sequences, Vol.5, 2002, Article 02.1.2, 
-James A. Sellers, The Pennsylvania State University
-\bibitem{7} ``The Penguin Dictionary of Curious and Interesting Numbers'', 
-revised ed., 1997, ISBN 0-14-026149-4, David Wells, p.182.
-\bibitem{8} ``A Treatise on the Theory of Determinants'', 
-1882, Macmillan and Co., Thomas Muir, Online
-\bibitem{9} ``Skew-Symmetric Determinants'', 
-The American Mathematical Monthly, vol. 61, no.2., 1954, p.116, 
-S. Parameswaran Online-Subscription
-\end{thebibliography}
-\end{document}

\start
Date: 29 Sep 2007 18:05:07 +0200
From: Martin Rubey
To: Tim Daly
Subject: Re: Copyright notice Re: pfaffian.input.pamphlet
Cc: Bill Page

Tim Daly writes:

> > I just realised that you are possibly breaking Copyright in your
> > pamphlet.  See
> > <http://en.wikipedia.org/wiki/Wikipedia:Text_of_the_GNU_Free_Documentation_License>
> > > > Ok. I'll withdraw the change and see if I can understand what
> > it takes to > be in compliance. I read the license over once and
> > I'm not sure what it > means. It will take several readings to
> > guess. Thanks for the heads-up.

In any case, I think it would be a lot better to describe what the
algorithm does instead of writing a treatise on Pfaffians.  I'd
presume that most people have access to the internet, so a link to the
wikipedia entry on Pfaffians and a link to Gunter Rote's paper,
including the section numbers (i.e., 3.2 and 3.3), and corrections
thereof (the leading coefficient of \lambda^2 in equation (22) should
be 1 rather than -1) would be more apropriate and more helpful.

Finally, if I read

\author{Timothy Daly, Gunter Rote, Martin Rubey}

(it's Gunter, by the way) I'd think that the three of them implemented the
algorithm, but that's maybe only my personal view.  And I must say that I was a
bit surprised that you claim copyright for pasting text from wikipedia, but did
not state the fact that most (all?) of the material is from that site.

\start
Date: Sat, 29 Sep 2007 12:17:54 -0400
From: Cliff Yapp
To: Tim Daly
Subject: Re: [Axiom-legal] Re: Copyright notice Re: pfaffian.input.pamphlet
Cc: Bill Page

root wrote:
>> I just realised that you are possibly breaking Copyright in your pamphlet.  See
>> <http://en.wikipedia.org/wiki/Wikipedia:Text_of_the_GNU_Free_Documentation_License>
> 
> Ok. I'll withdraw the change and see if I can understand what it takes to
> be in compliance. I read the license over once and I'm not sure what it
> means. It will take several readings to guess. Thanks for the heads-up.
> 
> Tim

That's why I use Wikipedia for just a starting point - often their
references are useful, and I try to write my own pamphlet based on the
original source material.

GFDL is a bit of a mess, IMHO - I've never cared for it, and literate
programming is going to confuse the issue even more.  The Debian
distribution doesn't put stuff with unmodifiable sections in Debian main:

http://www.debian.org/vote/2006/vote_001

\start
Date: Sat, 29 Sep 2007 12:30:19 -0400
From: Tim Daly
To: Martin Rubey
Subject: Re: Copyright notice Re: pfaffian.input.pamphlet
Cc: Bill Page

Please send a reference to Gunter's paper.
Please post a plain-text latex for the way you expect Gunter's
name to be spelled. All of my mail readers render it with a 'u'.
Please document your algorithm.

\start
Date: 29 Sep 2007 18:42:55 +0200
From: Martin Rubey
To: Tim Daly
Subject: Re: Copyright notice Re: pfaffian.input.pamphlet

Tim Daly writes:

> Please send a reference to Gunter's paper.
I did:

@article{570734,
 author = {G\"{u}nter Rote},
 title = {Division-free algorithms for the determinant and the Pfaffian:
 algebraic and combinatorial approaches},
 book = {Computational Discrete Mathematics: advanced lectures},
 year = {2001},
 isbn = {3-540-42775-9},
 pages = {119--135},
 publisher = {Springer-Verlag New York, Inc.},
 address = {New York, NY, USA},
 eprint = {http://page.mi.fu-berlin.de/rote/Papers/abstract/Division-free+algorithms+for+the+determinant+and+the+Pfaffian:+algebraic+and+combinatorial+approaches.html}
 }

> Please post a plain-text latex for the way you expect Gunter's name to be
> spelled.

\"u

> Please document your algorithm.

sorry, no time.

\start
Date: Sat, 29 Sep 2007 12:47:19 -0400
From: Tim Daly
To: Martin Rubey
Subject: Re: Copyright notice Re: pfaffian.input.pamphlet
Cc: Bill Page

>Finally, if I read
>
>\author{Timothy Daly, Gunter Rote, Martin Rubey}
>
>(it's Günter, by the way) I'd think that the three of them implemented the
>algorithm, but that's maybe only my personal view.  And I must say that I was a
>bit surprised that you claim copyright for pasting text from wikipedia, but did
>not state the fact that most (all?) of the material is from that site.

In total number of characters and time, the source text TeX, the
regression test case generation, the system merge issues, the testing
and the patch generation exceed the number of characters posted in the
algorithm. And the wikipedia text, despite appearances, is not "cut
and paste" but is hand written in latex format. In total I spent quite
a few hours on making the pamphlet.  If you had posted the final
pamphlet documentation with regression tests as a diff-Naur patch
I would have had nothing to contribute.

According to my first reading the wikipedia license appears to specify
the page layout of the final document which WAY exceeds the bounds of
common sense. I plan to change the content using other sources.

The fact that you understand the pfaffian enough to write a program does
not mean that the next person who has to maintain/extend/rewrite the
pfaffian has the same understanding. The point of the game is to make
the code live beyond the original author. Otherwise, what is science for?

\start
Date: 29 Sep 2007 18:55:21 +0200
From: Martin Rubey
To: Tim Daly
Subject: Re: Copyright notice Re: pfaffian.input.pamphlet
Cc: axiom-legal@nongnu.org, list

Tim Daly writes:

> In total number of characters and time, the source text TeX, the regression
> test case generation, the system merge issues, the testing and the patch
> generation exceed the number of characters posted in the algorithm.

Characters maybe, time I doubt.  It took me quite a while to figure out that
there is a misprint in the article.

> And the wikipedia text, despite appearances, is not "cut and paste" but is
> hand written in latex format.

So what?  If you retype a copyrighted book, you are still breaking copyright.

> In total I spent quite a few hours on making the pamphlet.  If you had posted
> the final pamphlet documentation with regression tests as a diff-Naur patch I
> would have had nothing to contribute.

I'm sorry about that.

> The fact that you understand the pfaffian enough to write a program does not
> mean that the next person who has to maintain/extend/rewrite the pfaffian has
> the same understanding.

Yes, that's what I think, too.  Although I hurry to say that I do *not*
understand the Pfaffian enough.

> The point of the game is to make the code live beyond the original
> author. Otherwise, what is science for?

Maybe for you.  I just needed a Pfaffian to do some experiments, and couldn't
find an implementation.  So I looked for an algorithm I thought I was able to
implement.  If you can use it, fine, if you can't, leave it.

\start
Date: Sat, 29 Sep 2007 13:10:11 -0400
From: Tim Daly
To: Martin Rubey
Subject: Re: Copyright notice Re: pfaffian.input.pamphlet

>> The point of the game is to make the code live beyond the original
>> author. Otherwise, what is science for?
>
>Maybe for you.  I just needed a Pfaffian to do some experiments, and couldn't
>find an implementation.  So I looked for an algorithm I thought I was able to
>implement.  If you can use it, fine, if you can't, leave it.

It is an excellent piece of work and I thank you for doing it.

I hope to merge it into the SQMATRIX domain, since it requires
the matrices to be square. It looks like I can use the antisymmetric
function to replace some of your code. But I'll have to do more
reading to gain a better understanding of the algorithm.

\start
Date: 29 Sep 2007 19:51:19 +0200
From: Martin Rubey
To: Tim Daly
Subject: Re: Copyright notice Re: pfaffian.input.pamphlet

Tim Daly writes:

> I hope to merge it into the SQMATRIX domain, since it requires the matrices
> to be square. It looks like I can use the antisymmetric function to replace
> some of your code.

I do not know of such a function.  However, you can use antiSymmetric? to check
whether the matrix is antisymmetric, which is required.

I guess you should follow the implementation of determinant.  Just grep for

"determinant.*=="

to get the picture.

By the way, SQMATRIX not being a domain of MatrixCategory is a sad limitation
of SPAD (not present in Aldor, fortunately).

> But I'll have to do more reading to gain a better understanding of the
> algorithm.

If you have questions, do not hesitate to ask.

\start
Date: Sun, 30 Sep 2007 00:52:10 +0200
From: Ralf Hemmecke
To: Martin Rubey
Subject: re: Copyright notice Re: pfaffian.input.pamphlet

On 09/29/2007 06:42 PM, Martin Rubey wrote:
> Tim Daly writes:
>
>> Please send a reference to Gunter's paper.
> I did:
>
> @article{570734,
>  author = {G\"{u}nter Rote},
>  title = {Division-free algorithms for the determinant and the Pfaffi=
an:
>  algebraic and combinatorial approaches},
>  book = {Computational Discrete Mathematics: advanced lectures},
>  year = {2001},
>  isbn = {3-540-42775-9},
>  pages = {119--135},
>  publisher = {Springer-Verlag New York, Inc.},
>  address = {New York, NY, USA},
>  eprint = {http://page.mi.fu-berlin.de/rote/Papers/abstract/Division-=
free+algorithms+for+the+determinant+and+the+Pfaffian:+algebraic+and+combi=
natorial+approaches.html}
>  }

I guess the right way to write is

   author = {G{\"u}nter Rote},

See Section 2.1(4) in http://www.eeng.dcu.ie/local-docs/btxdocs/btxdoc/

BIBTEXing
Oren Patashnik
February 8, 1988

Ralf

----------------------------------------------------------------------
PS: It follows the text that I cited above.

4. BibTEX now handles accented characters. For example if you have an
entry with the two fields

   author = "Kurt G{\"o}del",
   year = 1931,

and if you're using the alpha bibliography style, then BibTE X will
con- struct the label [G=F6d31] for this entry, which is what you'd
want. To get this feature to work you must place the entire accented
character in braces; in this case either {\"o} or {\"{o}} will
do. Furthermore these braces must not themselves be enclosed in braces
(other than the ones that might delimit the entire field or the entire
entry); and there must be a backslash as the very first character
inside the braces. Thus neither {G{\"{o}}del} nor {G\"{o}del} will
work for this example. This feature handles all the accented
characters and all but the nonback- slashed foreign symbols found in
Tables 3.1 and 3.2 of the LATEX book.  This feature behaves similarly
for ``accents'' you might define; we'll see an example shortly. For
the purposes of counting letters in labels, BibTEX considers
everything contained inside the braces as a single letter.

\start
Date: Sat, 29 Sep 2007 19:32:50 -0400
From: Tim Daly
To: Martin Rubey
Subject: Re: Copyright notice Re: pfaffian.input.pamphlet

Martin,

I've been studying Pfaffian systems (related to robotics, a field I
know a bit about). It seems that your algorithm does not work for
embedded matrices as in:

z:SQMATRIX(2,INT):=[[0,0],[0,0]]
m:SQMATRIX(2,INT):=[[0,1],[-1,0]]
m2:SQMATRIX(4,SQMATRIX(2,INT)):=[[m,z,z,z],[z,m,z,z],[z,z,m,z],[z,z,z,m]]
which should be 1*1*1*1 = 1

Am I doing something wrong?

\start
Date: 30 Sep 2007 03:10:11 +0200
From: Martin Rubey
To: Tim Daly
Subject: Re: pfaffian.input.pamphlet

Tim Daly writes:

> Martin,
> 
> I've been studying Pfaffian systems (related to robotics, a field I
> know a bit about). It seems that your algorithm does not work for
> embedded matrices as in:
> 
> z:SQMATRIX(2,INT):=[[0,0],[0,0]]
> m:SQMATRIX(2,INT):=[[0,1],[-1,0]]
> m2:SQMATRIX(4,SQMATRIX(2,INT)):=[[m,z,z,z],[z,m,z,z],[z,z,m,z],[z,z,z,m]]
> which should be 1*1*1*1 = 1
> 
> Am I doing something wrong?

The matrix m2 is not skew-symmetric: it should be zero along the diagonal, but
it contains m along the diagonal.  Try the following instead:

(19) -> z:SQMATRIX(2,INT):=[[0,0],[0,0]]; m:SQMATRIX(2,INT):=[[0,1],[-1,0]];
        m2:= matrix [[z,m,m,m],[-m,z,z,z],[-m,z,z,m],[-m,z,-m,z]]

         + +0  0+   + 0   1+  + 0   1+  + 0   1++
         | |    |   |      |  |      |  |      ||
         | +0  0+   +- 1  0+  +- 1  0+  +- 1  0+|
         |                                      |
         |+0  - 1+   +0  0+    +0  0+    +0  0+ |
         ||      |   |    |    |    |    |    | |
         |+1   0 +   +0  0+    +0  0+    +0  0+ |
   (19)  |                                      |
         |+0  - 1+   +0  0+    +0  0+   + 0   1+|
         ||      |   |    |    |    |   |      ||
         |+1   0 +   +0  0+    +0  0+   +- 1  0+|
         |                                      |
         |+0  - 1+   +0  0+   +0  - 1+   +0  0+ |
         ||      |   |    |   |      |   |    | |
         ++1   0 +   +0  0+   +1   0 +   +0  0+ +
                                         Type: Matrix SquareMatrix(2,Integer)
(20) -> PfChar(l, m2)

          4   + 0   2+ 2   +- 1   0 +
   (20)  l  + |      |l  + |        |
              +- 2  0+     + 0   - 1+
                                     Type: Polynomial SquareMatrix(2,Integer)

So, the Pfaffian is

+- 1   0 +
|        |
+ 0   - 1+

In particular, look at its type: the Pfaffiam is an element of the groung ring.

\start
Date: 30 Sep 2007 03:53:53 +0200
From: Martin Rubey
To: list
Subject: [ANN] new version of axiom mode for emacs.

The following message is a courtesy copy of an article
that has been posted to gnu.emacs.sources,comp.emacs.xemacs as well.

Axiom is a wonderful computer algebra system and

  axiom.el

ist the emacs mode that makes it great to use.

This new version now has a command

  axiom-yank

by default bound to C-Ret, that puts the front item of the kill ring into a
temporary .input file and makes axiom read that file.  This is useful when you
make changes to an .input file and do not want to re-read the whole file.

Furthermore it features directory tracking and filename completion after system
commands.

Get it from

  http://wiki.axiom-developer.org/AxiomEmacsMode

I'd be very happy to hear whether you find it useful in general, and
suggestions on how to improve it.  For example, do you find it useful that
touching previous input makes it turn red?

Martin

TODO: 

* I am unable to test it on MS-Windows, I highly appreciate reports and
  bugfixes.

* cleanup code, especially mode initialisation.  don't know anything about
  that.

* xemacs port

* allow lisp debugger to be entered, I.e., track when the prompt may change.
  How does shell mode do this?

* clean up initialisation routines.

  In particular, I'd like to have the following behaviour:
  
  [[M-x axiom]] should switch to the buffer [[*axiom*]], if it exists and if it
  is an "axiom buffer".  (I guess that should be a buffer in [[axiom-mode]],
  with a running axiom process.)
   
  If there is no such buffer, it should create a new buffer and a new axiom
  process.
   
  [[(add-hook 'axiom-mode-hook (lambda () (rename-uniquely)))]] should rename
  the buffer.  I do not know what else one could use [[shell-mode-hook]] (and
  therefore [[axiom-mode-hook]]) for.

* update the documentation and make it more concise.

* it would be important to have the possibility of deleting part or all of the
  buffer.  (Personally, I often have a buffer with a 100000 lines, which is a
  burden for emacs, it seems). By contrast, it is not necessary to provide
  functionality as stated in the section "Restarting and Re-evaluating - Kill
  and Restart Axiom without Erasing the Document" since such functionality is
  provided by axiom itself.

* undo should have sane behaviour, whatever that is.  Possibly, it should be
  restricted to the current input, but that might be too restrictive. (For
  example, if one has overwritten some important output by accident.)

* it would be extremely nice to have command tab-completion, as when starting
  axiom in a shell.  Very likely, one should prepare a TAGS file.

\start
Date: Sat, 29 Sep 2007 22:32:24 -0400
From: Tim Daly
To: Martin Rubey
Subject: Re: pfaffian.input.pamphlet

>> Martin,
>> 
>> I've been studying Pfaffian systems (related to robotics, a field I
>> know a bit about). It seems that your algorithm does not work for
>> embedded matrices as in:
>> 
>> z:SQMATRIX(2,INT):=[[0,0],[0,0]]
>> m:SQMATRIX(2,INT):=[[0,1],[-1,0]]
>> m2:SQMATRIX(4,SQMATRIX(2,INT)):=[[m,z,z,z],[z,m,z,z],[z,z,m,z],[z,z,z,m]]
>> which should be 1*1*1*1 = 1
>> 
>> Am I doing something wrong?
>
>The matrix m2 is not skew-symmetric: it should be zero along the diagonal, but
>it contains m along the diagonal.  Try the following instead:
>
>(19) -> z:SQMATRIX(2,INT):=[[0,0],[0,0]]; m:SQMATRIX(2,INT):=[[0,1],[-1,0]];
>        m2:= matrix [[z,m,m,m],[-m,z,z,z],[-m,z,z,m],[-m,z,-m,z]]
>
>         + +0  0+   + 0   1+  + 0   1+  + 0   1++
>         | |    |   |      |  |      |  |      ||
>         | +0  0+   +- 1  0+  +- 1  0+  +- 1  0+|
>         |                                      |
>         |+0  - 1+   +0  0+    +0  0+    +0  0+ |
>         ||      |   |    |    |    |    |    | |
>         |+1   0 +   +0  0+    +0  0+    +0  0+ |
>   (19)  |                                      |
>         |+0  - 1+   +0  0+    +0  0+   + 0   1+|
>         ||      |   |    |    |    |   |      ||
>         |+1   0 +   +0  0+    +0  0+   +- 1  0+|
>         |                                      |
>         |+0  - 1+   +0  0+   +0  - 1+   +0  0+ |
>         ||      |   |    |   |      |   |    | |
>         ++1   0 +   +0  0+   +1   0 +   +0  0+ +
>                                         Type: Matrix SquareMatrix(2,Integer)
>(20) -> PfChar(l, m2)
>
>          4   + 0   2+ 2   +- 1   0 +
>   (20)  l  + |      |l  + |        |
>              +- 2  0+     + 0   - 1+
>                                     Type: Polynomial SquareMatrix(2,Integer)
>
>So, the Pfaffian is
>
>+- 1   0 +
>|        |
>+ 0   - 1+
>
>In particular, look at its type: the Pfaffiam is an element of the groung ring.

You're quite correct. It seems that the documentation on wikipedia
is wrong, at least as I read it. Do you agree?

\start
Date: 30 Sep 2007 09:06:59 +0200
From: Martin Rubey
To: Tim Daly
Subject: Re: pfaffian.input.pamphlet

Tim Daly writes:

> You're quite correct. It seems that the documentation on wikipedia is wrong,
> at least as I read it. Do you agree?

Could you point me to the line you believe in error?

\start
Date: Sun, 30 Sep 2007 13:41:07 -0400
From: Tim Daly
To: Martin Rubey
Subject: Re: pfaffian.input.pamphlet

It appears that I mis-read example 3 from the wikipedia page. Their
example looks like the example I sent to you, that is, it looks like
there are 2x2 matrices on the diagonal. A second reading of the page
shows that it can be read instead as having lambdas adjacent to the
zero-diagonal. The lack of alignment of the other zeros led me to
read it as embedded matrices. My mistake.

\start
Date: 30 Sep 2007 15:58:57 -0500
From: Gabriel Dos Reis
To: list
Subject: re: Copyright notice Re: pfaffian.input.pamphlet

Tim Daly writes:

| Otherwise, what is science for?

Maybe plagiarism?

\start
Date: Sun, 30 Sep 2007 17:36:13 -0400
From: Tim Daly
To: Gabriel Dos Reis
Subject: Re: [Axiom-legal] re: Copyright notice Re:

Ah, Gaby, while I've got your attention....

It appears that installing OpenAxiom interferes with an already
installed Axiom. Alfredo looked into the problem and it appears 
to be a collision using the AXIOM shell variable.

Could you please rename the shell variable to use to be something
other that "AXIOM", say "OPENAXIOM"?

\start
Date: 30 Sep 2007 16:51:37 -0500
From: Gabriel Dos Reis
To: Tim Daly
Subject: Re: [Axiom-legal] re: Copyright notice Re: pfaffian.input.pamphlet

Tim Daly writes:

| Ah, Gaby, while I've got your attention....
| 
| It appears that installing OpenAxiom interferes with an already
| installed Axiom.

OpenAxiom installs its binaries in a directory distinct from
any other Axiom flavors.  It sets its internal variable AXIOM *within*
its own script and does not depend on external setting of it. 
The fact that Axiom seems to need external setting of the AXIOM
environment variable sounds to be like a bug that should be fixed in Axiom.

\start
Date: Sun, 30 Sep 2007 18:28:36 -0400
From: Tim Daly
To: Alfredo Portes
Subject: Axiom breakage when installing OpenAxiom

Alfredo,

>| Ah, Gaby, while I've got your attention....
>| 
>| It appears that installing OpenAxiom interferes with an already
>| installed Axiom.
>
>OpenAxiom installs its binaries in a directory distinct from
>any other Axiom flavors.  It sets its internal variable AXIOM *within*
>its own script and does not depend on external setting of it. 
>The fact that Axiom seems to need external setting of the AXIOM
>environment variable sounds to be like a bug that should be fixed in Axiom.

We observed that installing OpenAxiom breaks an existing Axiom install.
According to the above it appears that the AXIOM shell variable collision
is not the problem. Can you try it again and see if you can figure out
where the collision occurs? There is no technical reason why the two
projects cannot coexist on the same machine. 

\start
Date: Sun, 30 Sep 2007 18:35:34 -0400
From: Alfredo Portes
To: Tim Daly
Subject: Re: Axiom breakage when installing OpenAxiom

Maybe it is my fault. :-(

Reading now the script in OpenAxiom, I see that it sets
the AXIOM variable like Gaby explained. However, this
script cannot run in Windows.

In both installers, I use the AXIOMsys executable, following
the previous installer method.

If anybody has a suggestion of how I can handle this,
please let me know.

I apologize for any new friction I had introduced with this.

On 9/30/07, Tim Daly wrote:
> Alfredo,
>
> >| Ah, Gaby, while I've got your attention....
> >|
> >| It appears that installing OpenAxiom interferes with an already
> >| installed Axiom.
> >
> >OpenAxiom installs its binaries in a directory distinct from
> >any other Axiom flavors.  It sets its internal variable AXIOM *within*
> >its own script and does not depend on external setting of it.
> >The fact that Axiom seems to need external setting of the AXIOM
> >environment variable sounds to be like a bug that should be fixed in Axiom.
>
> We observed that installing OpenAxiom breaks an existing Axiom install.
> According to the above it appears that the AXIOM shell variable collision
> is not the problem. Can you try it again and see if you can figure out
> where the collision occurs? There is no technical reason why the two
> projects cannot coexist on the same machine.

\start
Date: Sun, 30 Sep 2007 18:50:36 -0400
From: William Sit
To: Alfredo Portes,Tim Daly
Subject: re: Axiom breakage when installing OpenAxiom
Cc: Gabriel Dos Reis

May be you can try creating separate short-cuts (pif 
files) where you can redefine the environment using 
different autoexec.bat that defines environmental 
variables. This method works for me for different 
installations of Miktex that runs in parallel with no 
conflicts. I did not try this with Axioms though.

William

On Sun, 30 Sep 2007 18:35:34 -0400
  Alfredo Portes wrote:
>Maybe it is my fault. :-(
>
>Reading now the script in OpenAxiom, I see that it sets
>the AXIOM variable like Gaby explained. However, this
>script cannot run in Windows.
>
>In both installers, I use the AXIOMsys executable, 
>following
>the previous installer method.
>
>If anybody has a suggestion of how I can handle this,
>please let me know.
>
>I apologize for any new friction I had introduced with 
>this.
>
>Regards,
>
>Alfredo
>
>On 9/30/07, Tim Daly wrote:
>> Alfredo,
>>
>> >| Ah, Gaby, while I've got your attention....
>> >|
>> >| It appears that installing OpenAxiom interferes with 
>>an already
>> >| installed Axiom.
>> >
>> >OpenAxiom installs its binaries in a directory distinct 
>>from
>> >any other Axiom flavors.  It sets its internal variable 
>>AXIOM *within*
>> >its own script and does not depend on external setting 
>>of it.
>> >The fact that Axiom seems to need external setting of 
>>the AXIOM
>> >environment variable sounds to be like a bug that 
>>should be fixed in Axiom.
>>
>> We observed that installing OpenAxiom breaks an existing 
>>Axiom install.
>> According to the above it appears that the AXIOM shell 
>>variable collision
>> is not the problem. Can you try it again and see if you 
>>can figure out
>> where the collision occurs? There is no technical reason 
>>why the two
>> projects cannot coexist on the same machine.

\start
Date: Sun, 30 Sep 2007 17:58:19 -0500 (CDT)
From: Gabriel Dos Reis
To: Alfredo Portes
Subject: Re: Axiom breakage when installing OpenAxiom

On Sun, 30 Sep 2007, Alfredo Portes wrote:

| In both installers, I use the AXIOMsys executable, following
| the previous installer method.

The AXIOMsys from OpenAxiom (mainline) can now take any arbitrary
command line option.  We can arrange to take the prefix ($AXIOM) of
the whole installation as command line, so that you can say

    AXIOMsys -- --prefix=/c/OpenAxiom

Would that help you?  If yes, I can arrange for a port to the 1.0.x
series -- though I'm currently on travel with limited access to my
development machine.

\start
Date: Sun, 30 Sep 2007 19:40:31 -0400
From: Tim Daly
To: Martin Rubey
Subject: Re: pfaffian.input.pamphlet

I've been writing some pfaffian examples. Should the PfChar code read:

PfChar(lambda, A) ==
  n := nrows A

PfChar(lambda, A) ==
  n := nrows A
  odd? n => 0

\start
Date: Sun, 30 Sep 2007 20:25:39 -0700
From: Arthur Ralfs
To: Alfredo Portes
Subject: Re: End Of File

Alfredo Portes wrote:
> Hi everyone,
>
> I think Arthur was going to be offline for
> a couple days. Can somebody translate
> this line for me:
>
> while (char := STRING(READ_-CHAR_-NO_-HANG(s,NIL$Lisp,'EOF)$Lisp)$Lisp)
> ^= "EOF" repeat
>              headers := concat [headers,char]
>
> Better said, what does this do:
>
> READ_-CHAR_-NO_-HANG(s,NIL$Lisp,'EOF)
>
> What is necessary to kill this loop (end of file signal).
>
> http://wiki.axiom-developer.org/images/AxServer.pamphlet
>
> Sorry for the dumb question :-),
>
> Alfredo
>
>   
Alfredo,

Don't imagine that I'm a lisp expert.  I'm just hacking this stuff together
and learning as I go.  The exact workings of lisp stream objects is
still mysterious to me.

I'm just back on line this hour, however I had my laptop with me and
spent some time working on those very 2 lines of code.  They were
proving unacceptably slow at GETting large files.  It turns out that
that following 2 lines work much better:

while (line := STRING(READ_-LINE(q,NIL$Lisp,'EOF)$Lisp)$Lisp) ^= "EOF"
repeat
    file := concat [file,line,STRING(NewLine$Lisp)$Lisp]

\start
Date: Sun, 30 Sep 2007 23:31:44 -0400
From: Tim Daly
To: Arthur Ralfs
Subject: Re: End Of File

Are you able to read from a socket?

\start
Date: Sun, 30 Sep 2007 20:37:45 -0700
From: Arthur Ralfs
To: Tim Daly
Subject: Re: End Of File

root wrote:
> Arthur,
>
> Are you able to read from a socket?
>
> Tim
>
>   
I don't understand.  Isn't this what we're doing in axserver?



\end{verbatim}
\eject
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\cleardoublepage
%\phantomsection
\addcontentsline{toc}{chapter}{Bibliography}
\bibliographystyle{axiom}
\bibliography{axiom}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\cleardoublepage
%\phantomsection
\addcontentsline{toc}{chapter}{Index}
\printindex
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\end{document}
