Magma supports the following categories of rings, fields and algebras:
They are created by the functions:
One may create any ring by creating one of these magmas and then taking the required subring or quotient ring, as appropriate, with the sub or quo constructor.
The characteristic of ring R is Characteristic(R). Its cardinality is #R.
The operators for arithmetic on ring elements are: r + s, r - s, -r, r * s, and r ^ n. In fields the division operator is / and in other rings division-with-remainder is performed with div and mod .
The additive identity is Zero(R) or R!0, and the multiplicative identity is One(R) or R!1 .
Functions testing properties of a ring element include IsZero, IsOne, IsMinusOne, IsUnit.
For rings in which an ordering is defined on the elements, the comparison operations are gt, ge, lt, le, and also Max and Min.
> GF81<w> := GF(3, 4); > print GF81; Finite field of size 3^4 > e := 2 * w^5; print e; w^45> P<x> := PolynomialRing(GF81); > print P; Univariate Polynomial Algebra in x over Finite field of size 3^4 > p := 2*x^6 - w*x^2 + 1; print p; 2*x^6 + w^41*x^2 + 1
> FF := FieldOfFractions(P); print FF; Field of Fractions in x over Univariate Polynomial Algebra in x over Finite field of size 3^4 > print (p^2 - FF!1) / (p + 1) eq (p - 1); true
[Next] [Prev] [Right] [Left] [Up] [Index] [Root]