Domains Version 1.0
<Text-field style="Heading 2" layout="Heading 2" bookmark="info">Description</Text-field>Domains is a tool for developing code for complicated algorithms. The computational facilities offered by Domains differ from Maple in that you can parametrize a domain, for example, a polynomial or matrix ring, by the coefficient ring. This means that the code is more general as it will work in principle for any coefficient ring.When computing in Domains, you first construct a domain of computation. For example, if you want to compute univariate polynomials with rational coefficients, first create the NiMmSSJRRzYiNiNJInhHRiU= domain as followswith(Domains):P := DenseUnivariatePolynomial(Q, x):The value assigned to NiNJIlBHNiI= is a Maple table of the operations, available for computing with polynomials in NiMmSSJRRzYiNiNJInhHRiU=. For example, you can compute the remainder of two polynomials NiNJImFHNiI= and NiNJImJHNiI= by doingP[Rem](a,b);To use Domains interactively, you must first load it into Maple using with(Domains);This also assigns the variables Z and Q to the domain of integers and rationals respectively, by executingZ := Integers():Q := Rationals():and defines many standard abbreviations for the domains known to Domains. For more information, see Domains/domain. Having defined the integers Z, you can compute the remainder of two integers m and n by doingZ[Rem](m,n);The principle advantage Domains offers over Maple is in allowing you to parametrize domains (for example, polynomial, series, and matrix rings) by a coefficient ring NiNJIlJHNiI=. If you know how to compute in a coefficient ring NiNJIlJHNiI=, and you write code for polynomials, then that code should work for any ring NiNJIlJHNiI=. You should not have to rewrite the polynomial code for a new NiNJIlJHNiI=.Consider another example. Suppose you have implemented Gaussian elimination to solve a linear system of equations over a field NiNJIkZHNiI=. Domains allows you to parametrize your subroutine by NiNJIkZHNiI= so that your routine works for all fields, not just the field of rational numbers that you may have envisioned when writing the routine. This is accomplished by grouping all operations in a ring or a field into a datastructure called a domain. In Domains, a domain is a Maple table of operations. For more details on domains and a list of known domains, see Domains/domain.
<Text-field style="Heading 2" layout="Heading 2">Coding</Text-field>Coding with the Domains tool is quite straightforward, although you must package-call every operation.(See Domains/example.) For an example of how to code a simple function that computes with values of a domain, see Domains/coding.Coding domains is somewhat more difficult and also cumbersome because nested lexical scopes and closures are not supported in Maple and must be simulated. It is recommended that you study the code of existing domains.Before using Domains, read the help file Domains/example to see a Domains sample session.
<Text-field style="Heading 2" layout="Heading 2">Acknowledgements</Text-field>Some of the main ideas behind Domains come from the AXIOM system, which was formerly called Scratchpad II. AXIOM also has the notion of parametrized types which it calls domains. The author of Domains would like to acknowledge the use of the primary idea behind AXIOM, namely that of passing as a parameter a collection of functions as a single unit, which the authors of AXIOM have termed a domain.
<Text-field style="Heading 2" layout="Heading 2" bookmark="seealso">See Also</Text-field>Domains/coding, Domains/domain, Domains/evaldomains, Domains/example, RealDomain