: Tag : Data types : Array   目次

## Ring

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 set

would create the ring of differential operators

store it in the variable R and changes the current ring to this Weyl algebra. is denoted by on sm1. The suffix can be changed; for example, if you want to use dx instead of Dx, execute the command /@=11@@=11@@=11@.Dsymbol (d) def  The current ring can be obtained by [(CurrentRingp)] system_variable . The current ring is the ring of polynomials of two variables when the system starts.

All polynomial except belongs to a ring. For a non-zero polynomial f, the line

   f (ring)  dc /rr set

put 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  set

means to parse the string  x^2-y  in the ring R and put the polynomial in the variable f. Arithmetic operators for two polynomials can be performed only when the two polynomials belong to a same ring. If you want to map a polynomial to a different ring, the easiest way is to translate the polynomial into a string and parse it in the ring. That is,
   [(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.

: Tag : Data types : Array   目次
Nobuki Takayama 平成22年2月8日