The ring object is generated by the operator define_ring. This operator has a side effect; it also changes the current ring. The line
[(x,y) ring_of_differential_operators 0] define_ring /R setwould create the ring of differential operators
.Dsymbol (d) def
The current ring can be obtained by
[(CurrentRingp)] system_variable .
The current ring is the ring of polynomials of
two variables
All polynomial except belongs to a ring.
For a non-zero polynomial f,
the line
f (ring) dc /rr setput the associated ring object of f to the variable rr. As we have seen before, a given string is parsed as a polynomial in the current ring by the operator ``.''. To parse in a given ring, the operator ``__'' is used. That is,
[(x,y) ring_of_differential_operators 0] define_ring /R set (x^2-y) R __ /f setmeans to parse the string
x^2-y
in the ring R
and put the polynomial [(x,y) ring_of_polynomials 0] define_ring /R1 set (x-y). /f set [(x,y,z) ring_of_differential_operators 0] define_ring /R2 set (y+Dz). /g set f toString . /f set f g add ::would output
It is convinient to have a class of numbers that is contained in any ring. The datatype number (universalNumber) is the class of bignum, which is allowed to be added and multiplied to any polynomials with characteristic 0.
Nobuki Takayama 2020-11-24