CurrentModule = Nemo
DocTestSetup = quote
using Nemo
end
Nemo allows the creation of residue rings of the form
We don't require
There is a generic implementation of residue rings of this form in AbstractAlgebra.jl,
which accepts any ring
The associated types of parent object and elements for each kind of residue rings in Nemo are given in the following table.
Base ring | Library | Element type | Parent type |
---|---|---|---|
Generic ring |
AbstractAlgebra.jl | EuclideanRingResidueRingElem{T} |
EuclideanRingResidueRing{T} |
|
Flint | zzModRingElem |
zzModRing |
|
Flint | ZZModRingElem |
ZZModRing |
The modulus
All residue element types belong to the abstract type ResElem
and all the
residue ring parent object types belong to the abstract type ResidueRing
.
This enables one to write generic functions that accept any Nemo residue type.
All the residue rings in Nemo provide the functionality described in AbstractAlgebra for residue rings:
https://nemocas.github.io/AbstractAlgebra.jl/stable/residue
In addition, generic residue rings are available.
We describe Nemo specific residue ring functionality below.
gcdx(::zzModRingElem, ::zzModRingElem)
gcdx(::ZZModRingElem, ::ZZModRingElem)
Examples
julia> R, = residue_ring(ZZ, 123456789012345678949);
julia> g, s, t = gcdx(R(123), R(456))
(1, 123456789012345678928, 41152263004115226322)