[][src]Module maths_traits::algebra::ring_like

Traits

Bezout

A trait for finding the Bezout coefficients of a pair of elements

BezoutDomain

A commutative ring where every pair of elements has a weighted sum to their GCD

CommutativeRing

A unital ring where multiplication is commutative

CommutativeSemiring

A unital semiring where multiplication is commutative

Distributive

A marker trait for stucts whose multiplication operation preserves addition, ie z*(x+y)=z*x+z*y and (x+y)*z=x*z+y*z for all x, y, and z.

Divisibility

Common methods regarding multiplicative inverses in a ring or semiring

DivisionRing

A ring with a multiplicative inverse

DivisionSemiring

A semiring with a multiplicative inverse

Domain

A unital ring with no pairs of nonzero elements that multiply to zero

EuclideanDiv

A trait for performing division with with remainder

EuclideanDomain

A commutative ring with a division algorithm for dividing with a remainder

EuclideanSemidomain

A UF semidomain with a division algorithm for dividing with a remainder

Field

A set that is both an additive and multiplicative abelian group where multiplication distributes

GCD

A trait for finding the greatest common divisor and least common multiple of two elements

GCDDomain

A commutative ring where every pair of elements has a greatest common divisor

GCDSemidomain

An integral semidomain where every pair of elements has a greatest common divisor

IntegralDomain

A domain that is commutative

IntegralSemidomain

A semidomain that is commutative

NoZeroDivisors

A marker trait for semirings where there are no nonzero elements that multiply to zero

PID

An integral domain where every ideal is generated by one element

Primality

Methods for testing irreduciblity and primality

Ring

An additive abelian group with a distributive and associative multiplication operation

Semidomain

A unital semiring with no pairs of nonzero elements that multiply to zero

Semiring

A commutative and additive monoid with a distributive and associative multiplication operation

UFD

A commutative ring that is uniquely factorizable into irreducible (up to units)

UFSemidomain

A GCD semidomain where every pair of elements is uniquely factorizable into irreducible elements (up to units)

UniquelyFactorizable

A marker trait for semirings where each element's set of irreducible divisors is unique

UnitalRing

A ring with an identity element

UnitalSemiring

A semiring with an identity element

Functions

euclidean

Uses the Euclidean Algorithm to find the GCD of two ring elements using division with remainder

extended_euclidean

Uses the Extended Euclidean Algorithm to find the GCD of two ring elements and their bezout coefficients using division with remainder

miller_rabin

Determines if a given Natural number is prime using the Miller-Rabin primality test