3.2 The src Subdirectory

  3.2.1 Species and Generating Series
  3.2.2 Tools for Polynomials and Power Products
  3.2.3 Tools for Small Integers
  3.2.4 Compatibility with Axiom
ToDo 2
rhx 1 01-Sep-2006: Write an abstract for this section.

3.2.1 Species and Generating Series

src/species.as.nw:
Definition of combinatorial species.
src/series.as.nw:
Implementation of formal power series.
src/gseries.as.nw:
Implementation of generating series (ordinary and exponential generating series as well as cycle index series).
src/multinom.as.nw:
Implementation of binomial an multinomial coefficients.
src/stream.as.nw:
Re-implementation of the Aldor domain Stream, but with more access to allow recursive definitions of streams.
src/spexpr.as.nw:
This is a domain for describing expressions of species.
src/parse.as.nw:
Parsing strings into expressions of species.
src/interp.as.nw:
Interpreting ExpressionTrees as Species.

3.2.2 Tools for Polynomials and Power Products

The subdirectory src/poly might become a separate library since it provides features that are not really specific to Combinat, but might be of interest in a more general context. It implements sparse polynomials (lists of pairs of coefficient and term) where the term can come from any totally ordered (multiplicative) monoid. Univariate polynomials serve as a model to implement commutative power products of countably many variables via the isomorphism

                    ∑n        ∏n
A[x] → [x0,x1,...],      ajxj ↦→    xajj
                    j=0       j=0
src/poly/istruc.as.nw:
Implementation of indexed additive structures as a preliminary to implement the (commutative) monoid of infinitely many variables.
src/poly/idxpp.as.nw:
Implementation of power products with a variable domain indexed by an arbitrary index set.
ToDo 3
rhx 2 For a general polynomial library we should distinguish between monoid rings RM (where the inner structure of the monoid M is not known) and polynomial rings R[V ] where V is a finite or infinite set and [V ] is the monoid of words (commutative or not) with letters in V .
src/poly/distpoly.as.nw:
Implementation of a distributed form of polynomials in an arbitrary number of variables.

3.2.3 Tools for Small Integers

Since primality testing does not work in the Algebra library, we implement our own version.

src/sitools/siprimes.as.nw:
Provides an implementation of all 16-bit primes. This allows primality testing of all 32-bit MachineIntegers (231 x < 231).
src/sitools/sitools.as.nw:
Provides factorization of all 32-bit MachineIntegers (231 x < 231).

3.2.4 Compatibility with Axiom

src/axiom-compatibility/axcompat.as.nw:
This is a compatibility layer that provides the interface of relevant domains and categories from the Aldor and Algebra libraries in terms of the Axiom library.
src/axiom-compatibility/axcompat2.as.nw:
This is a second compatibility layer that provides functionality of domains and categories from the Aldor and Algebra libraries, but is independent of Axiom but rather depends only on src/axiom-compatibility/axcompat.as.nw.