If R is the provided ring then R[X] is the returned polynomial ring:
- Scheme’s null list represents the 0 of R[X],
- If x represents x ∈ R[X] and x≠0 and y represents y ∈ R then (cons y x) represents xX + y.
- Thus if x, y ∈ R then (list x y) represents xX0 + yX1 ∈ R[X]
- The last member of the list is not 0 and every member of the list is from R.
The representation is thus unique.
- poly
- Given a ring R in the form of the following seven arguments, return a tool list for the
Polynomials over the ring.
((fileVal "Poly/poly") zer zer? + - * rng? one)
zer | R | the additive identity of the ring
|
zer? | R→bool | ring zero tester
|
+ | R×R→R | ring addition
|
- | R×R→R | ring subtraction
|
* | R×R→R | ring multiplication
|
rng? | | membership in R
|
one | R | any non zero element in R
|
The only use of rng? is to produce the last element of the yield and the only requirement on one is that (zer? one) yield #f.
The returned value is the list with elements:
R[X]×R[X]→R[X] | polynomial addition.
|
R[X]×R[X]→R[X] | polynomial subtraction.
|
R[X]×R[X]→R[X] | polynomial multiplication.
|
R×R[X]→R[X] | ring times polynomial.
|
| well formed polynomial query.
|
'() serves as a zero and null? serves as a zero test.
- qr
- Division Pack.
Let
z = ((fileVal "Poly/qr") / zer zer? + - * rng? one)
The arguments are the same as for "Poly/poly" above except for the additional multiplicative inverse.
For polynomials n and d≠0 the yield of ((z 'qr) n d) is a pair of polynomials (q . r) such that
n = qd + r and r is of lesser degree than d.
(z 'ply) is the yield of (fileVal "Poly/poly") above for the same arguments.
((z 'gcd) p q) returns the gcd of polynomials p and q.
The high order term is always one.
- tfe
- ((fileVal "Poly/tfe") / zer zer? + - * rng? one) with the same arguments as qr yields a list of values for the transcendental extension over the rationals.
- zero
- zero?
- one
- addition
- subtraction
- multiplication
- inversion
The field is the smallest subfield of the reals which include some particular transcendental value, which need not be specified.
Field elements are represented as the quotient of a pair of polynomials in the transcendental value.
Somewhat less esoteric is to say that this is the field of rational functions of one variable.
It is the same thing except perhaps for finite fields.
The high order term of the denominator must be the value provided by the last argument to (fileVal "Poly/tfe") which must be the multiplicative identity of the underlying ring.
There is a debugging switch bug which controls verification and reporting of such values coming into and going out of this module.
- pv
- (((fileVal "Poly/pv") zer + *) p f) returns the value of the polynomial in the conventional sense of polynomial (not abstract).
f is a value from the ring upon which the polynomial ring is built.
Project that launched this stuff.