I know of three set packages for Maxima:
(a) The circa 1982 set.lisp package; it is located in /share/misc. The
last time I tried loading this package, it
was broken.
(b) a package I wrote a few years ago; this code was added to /src about
two months ago. This package tried
to be compatible the Macsyma set package while extending it. Briefly,
Macsyma's set package makes no
distinction between lists and sets. This makes it impossible to define
sets that have both lists and sets as
members. My package used a global switch to control whether a set element
is a list or a set.
This is a terrible design. With assistence and prodding from Stavros last
fall, we wrote a new set package.
(c) the nset package that Stavros and I wrote last fall. This code isn't
in the Maxima CVS; you may
download nset-1.0.tar.gz from http://www.unk.edu/acad/math/people/willisb/
Compared to my
older set package, nset is much better designed, more efficient, better
tested, and better documented.
Unlike the other two set packages, nset doesn't redefine powerset.
Recommendations:
(a) The set package currently in /src should be expunged from Maxima. If
somebody wants to keep it,
at least it should be moved to a new directory; named something like
.../hokie-and-soon-to-be-depreciated-low-quality-code.
(b) The nset package should be appended to either /share/contrib, or
/share/misc, or wherever.
(c) We consider formalizing the process for adding new packages to
Maxima; especially when they are added to /src.
I don't know the best way to fix the berlefact : false bug.
Barton
Wolfgang Jenkner <wjenkner@inode.at>
03/04/2003 04:36 PM
To: willisb <willisb@unk.edu>
cc: Stavros Macrakis <macrakis@alum.mit.edu>, Maxima List
<maxima@www.ma.utexas.edu>
Subject: set.lisp redefines POWERSET
>From a recent bug report (by Stavros):
I tried setting Berlefact:false to see if that would make a
difference, but that causes an internal error (POWERSET requires
less than two arguments).
This is because set.lisp redefines POWERSET (originally defined in
ratout.lisp). Please suggest a different name (only for POWERSET, not
for the user-visible $POWERSET).
Wolfgang