Section13.11

]>
Book Contents Previous Section 13.10 Origins Next Section 13.12 Example 1: Clifford Algebra Book Index

## 13.11 Short Forms

In Axiom, a domain could be defined using only an add-domain and no capsule. Although we talk about rational numbers as quotients of integers, there is no type RationalNumber in Axiom. To create such a type, you could compile the following ``short-form'' definition:

RationalNumber() == Fraction(Integer)

The Exports part of this definition is missing and is taken to be equivalent to that of Fraction(Integer). Because of the add-domain philosophy, you get precisely what you want. The effect is to create a little stub of a domain. When a user asks to add two rational numbers, Axiom would ask RationalNumber for a function implementing this +. Since the domain has no capsule, the domain then immediately sends its request to Fraction (Integer).

The short form definition for domains is used to define such domains as MultivariatePolynomial: MultivariatePolynomial

MultivariatePolynomial(vl: List Symbol, R: Ring) ==
SparseMultivariatePolynomial(R,
OrderedVariableList vl)
Book Contents Previous Section 13.10 Origins Next Section 13.12 Example 1: Clifford Algebra Book Index