Section13.8

]>
Book Contents Previous Section 13.7 Multiple Representations Next Section 13.9 Defaults Book Index

## 13.8 Add Domain

The capsule part of Implementation defines functions that implement the operations exported by the domain---usually only some of the operations. In our demo in ugDomainsDemo we asked for the value of 3*q-q+q. Where do the operations *, +, and - come from? There is no definition for them in the capsule!

The Implementation part of a definition can domain:add optionally specify an ``add-domain'' to the left of an add add (for QuadraticForm, defines SquareMatrix(n,K) is the add-domain). The meaning of an add-domain is simply this: if the capsule part of the Implementation does not supply a function for an operation, Axiom goes to the add-domain to find the function. So do *, + and - (from QuadraticForm) come from SquareMatrix(n,K)?

Book Contents Previous Section 13.7 Multiple Representations Next Section 13.9 Defaults Book Index