The function G takes a list of mostly functions pertaining to one algebra and returns a like list for the next more complex algebra.
Here is the nature of the list elements:
- Conjugate operator — as in complex conjugate.
- Sample generator — 0 argument function that returns a random value from algebra.
- Zero — Additive identity
- Zero predicate — test a value for being zero.
- One — Multiplicative identity
- Addition operator Note that "+" is an argument!
- Subtraction operator
- Multiplication operator
- Multiplicative inverse
The value reals provides the list for ordinary reals.
Within that list the sample generator produces random rationals with the function rr. rand31 generates random number generators.
Of course other fields could be supplied here, such as irrational extensions to the field of rationals supplied by Scheme.
The function testAlg takes an algebra and tests for familiar field like properties.
Successive algebras deteriorate by losing properties.