[Next] [Prev] [Right] [Left] [Up] [Index] [Root]
Elements Operations

Elements Operations

Subsections

Arithmetic Operators

+ n : RngIntResElt -> RngIntResElt
- n : RngIntResElt -> RngIntResElt
m + n : RngIntResElt, RngIntResElt -> RngIntResElt
m - n : RngIntResElt, RngIntResElt -> RngIntResElt
m * n : RngIntResElt, RngIntResElt -> RngIntResElt
n ^ k : RngIntResElt, RngIntResElt -> RngIntResElt
m / n : RngIntResElt, RngIntResElt -> RngIntResElt
m +:= n : RngIntResElt, RngIntResElt -> RngIntResElt
m -:= n : RngIntResElt, RngIntResElt -> RngIntResElt
m *:= n : RngIntResElt, RngIntResElt -> RngIntResElt
m /:= n : RngIntResElt, RngIntResElt -> RngIntResElt
m ^:= k : RngIntResElt, RngIntResElt -> RngIntResElt

Equality and Membership

m eq n : RngIntResElt, RngIntResElt -> BoolElt
m ne n : RngInRngIntRest, RngIntResElt -> BoolElt
n in R : RngIntResElt, Rng -> BoolElt
n notin R : RngIntResElt, Rng -> BoolElt

Parent and Category

Parent(n) : RngIntResElt -> RngIntRes
Category(n) : RngIntResElt -> Cat

Predicates on Ring Elements

IsZero(n) : RngIntResElt -> BoolElt
IsOne(n) : RngIntResElt -> BoolElt
IsMinusOne(n) : RngIntResElt -> BoolElt
IsNilpotent(n) : RngIntResElt -> BoolElt
IsIdempotent(n) : RngIntResElt -> BoolElt
IsUnit(n) : RngIntResElt -> BoolElt
IsZeroDivisor(n) : RngIntResElt -> BoolElt
IsRegular(n) : RngIntRes -> BoolElt
IsIrreducible(n) : RngIntResElt -> BoolElt
IsPrime(n) : RngIntResElt -> BoolElt
IsSquare(n) : RngIntResElt -> BoolElt, RngIntResElt
    Factorization: [ < int, int > ]     Default: [ ]
Given an element n inZ/mZ this function returns true if there exists a inZ/mZ such that a^2=n inZ/mZ, false otherwise. If n is a square, a square root a is also returned. If m is large and its prime factorization is known, the computation may be speeded up by assigning the factorization sequence for m to the optional argument Factorization.
IsPrimitive(n) : RngIntResElt -> BoolElt
Returns true if the element n inZ/mZ is primitive, that is, if it generates the multiplicative group of Z/mZ, false otherwise.

Other Element Functions

PrimitiveElement(R) : RngIntRes -> RngIntResElt
PrimitiveRoot(R) : RngIntRes -> RngIntResElt
Given R = Z/mZ, this function returns a generator for the group of units of R if this group is cyclic, and returns 0 otherwise. (Thus a valid generator is only returned if m = 2, 4, p^t or 2p^t, with p an odd prime and t >= 1.)
Order(a) : RngIntResElt -> RngIntElt
Given an element a belonging to Z/mZ, return the multiplicative order k >= 1 of a if a is in the unit group (Z/mZ)^*, and zero if a is not a unit.
Sqrt(a) : RngIntResElt -> RngIntResElt
SquareRoot(a) : RngIntResElt -> RngIntResElt
    Factorization: [ < int, int > ]     Default: [ ]
Given an element a of the ring Z/mZ, this function returns an element b of Z/mZ such that b^2=a inZ/mZ, if such an element exists, and an error otherwise. If m is large and its prime factorization is known, the computation may be speeded up by assigning the factorization sequence for m to the optional argument Factorization.
AllSquareRoots(a) : RngIntResElt -> [ RngIntResElt ]
AllSqrts(a) : RngIntResElt -> [ RngIntResElt ]
    Factorization: [ < int, int > ]     Default: [ ]
Return a sequence of all square roots of an element a in a residue class ring Z/mZ. If the modulus m is large and its prime factorization is known, the computation may be speeded up by assigning the factorization sequence for m to the optional argument Factorization.

Solving Linear Equations in Z/mZ

Solution(a, b) : RngIntResElt, RngIntResElt -> RngIntResElt
Given elements a and b of Z/mZ, return a solution x to the linear congruence a.x=b in Z/mZ. An error is signalled if no solution exists.
[Next] [Prev] [Right] [Left] [Up] [Index] [Root]