Basics
Finite rings and their elements implement the ring interface. We document the methods that are unique to finite rings.
Creation of finite rings
finite_ring — Method
finite_ring(c::Vector{IntegerUnion},
m::Vector{ZZMatrix}; check::Bool = true)Return the finite ring with additive group isomorphic to $\mathbf{Z}/c_1\mathbf{Z} \times \dotsb \times \mathbf{Z}/c_n \mathbf{Z}$ and such that generators satisfy $b_i b_j = \sum_{k=1}^n m^{(i)}_{jk} b_k$, where $m^{(i)}$ is the $j$-th entry of $m$.
If check is true (default), it is verified that this defines a ring.
Examples
julia> finite_ring([2, 2], [ZZ[1 0; 0 0], ZZ[0 0; 0 1]]) # Z/2Z x Z/2Z
Finite ring with additive group
isomorphic to (Z/2)^2
and with 2 generators and 2 relationsfinite_ring — Method
finite_ring(c::Vector{IntegerUnion},
m::Vector{ZZMatrix}; check::Bool = true)Return the finite ring with additive group isomorphic to $\mathbf{Z}/c_1\mathbf{Z} \times \dotsb \times \mathbf{Z}/c_n \mathbf{Z}$ and such that generators satisfy $b_i b_j = \sum_{k=1}^n m^{(i)}_{jk} b_k$, where $m^{(i)}$ is the $j$-th entry of $m$.
If check is true (default), it is verified that this defines a ring.
Examples
julia> finite_ring([2, 2], [ZZ[1 0; 0 0], ZZ[0 0; 0 1]]) # Z/2Z x Z/2Z
Finite ring with additive group
isomorphic to (Z/2)^2
and with 2 generators and 2 relationsfinite_ring — Method
finite_ring(A::AbstractAssociativeAlgebra) -> FiniteRing, FiniteRingMapGiven an algebra $A$ over a finite field $k$, return $(R, f)$, where $R$ is a finite ring and $f \colon R \to A$ an isomorphism rings. Currently, the field $k$ must be a prime field.
Examples
julia> R, f = finite_ring(matrix_algebra(GF(2), 3));
julia> R
Finite ring with additive group
isomorphic to (Z/2)^9
and with 9 generators and 9 relationsfinite_ring — Method
finite_ring(A::MatRing{FiniteRingElem}) -> FiniteRingGiven a matrix ring $A$ over a finite ring, return $(R, f)$, where $R$ is a finite ring and $f \colon R \to A$ an isomorphism rings. Currently, the field $k$ must be a prime field.
Examples
julia> R, = finite_ring(matrix_algebra(GF(2), 2));
julia> S = matrix_ring(R, 2);
julia> T, = finite_ring(S);
julia> T
Finite ring with additive group
isomorphic to (Z/2)^16
and with 16 generators and 16 relationsProperties
additive_generators — Method
additive_generators(R::FiniteRing) -> Vector{FiniteRingElement}Return generators of the additive group of a finite ring $R$.
Examples
julia> R, _ = finite_ring(matrix_algebra(GF(2), 2));
julia> additive_generators(R)
4-element Vector{FiniteRingElem}:
Finite ring element [1, 0, 0, 0]
Finite ring element [0, 1, 0, 0]
Finite ring element [0, 0, 1, 0]
Finite ring element [0, 0, 0, 1]number_of_additive_generators — Method
number_of_additive_generators(R::FiniteRing) -> IntReturn the number generators of the additive group of a finite ring $R$.
Examples
julia> R, _ = finite_ring(matrix_algebra(GF(2), 2));
julia> number_of_additive_generators(R)
4elementary_divisors — Method
elementary_divisors(R::FiniteRing) -> VectorReturn the elementary divisors of the additive group of the finite ring $R$.
Examples
julia> R, f = finite_ring(matrix_algebra(GF(2), 2));
julia> elementary_divisors(R)
4-element Vector{ZZRingElem}:
2
2
2
2Maximal quotient rings
maximal_p_quotient_ring — Method
maximal_p_quotient_ring(R::FiniteRing, p::IntegerUnion) -> FiniteRing, FiniteRingHomGiven a finite ring $R$ and a prime $p$, return the largest quotient ring $S$ of $p$-power order and the projection $R \to S$.
Examples
julia> R = finite_ring([6, 6], [ZZ[1 0; 0 0], ZZ[0 0; 0 1]]); # Z/6Z x Z/6Z
julia> S, f = maximal_p_quotient_ring(R, 3);
julia> S
Finite ring with additive group
isomorphic to (Z/3)^2
and with 2 generators and 4 relationsDecomposition
central_primitive_idempotents — Method
central_primitive_idempotents(R::FiniteRing) -> Vector{FiniteRingElem}Given a finite ring $R$, return the set of orthgonal central primitive idempotents of $R$.
Examples
julia> R = finite_ring([6, 6], [ZZ[1 0; 0 0], ZZ[0 0; 0 1]]); # Z/6Z x Z/6Z
julia> central_primitive_idempotents(R)
4-element Vector{FiniteRingElem}:
Finite ring element [0, 3]
Finite ring element [3, 0]
Finite ring element [4, 0]
Finite ring element [0, 4]decompose_into_indecomposable_rings — Method
decompose_into_indecomposable_rings(R::FiniteRing)
-> Vector{FiniteRing}, Vector{FiniteRingHom}Given a finite ring $R$, return a list of indecomposable rings $S$ and a list of projections $R \to S$, such that $R$ is the direct product of these rings.
Examples
julia> R = finite_ring([6, 6], [ZZ[1 0; 0 0], ZZ[0 0; 0 1]]); # Z/6Z x Z/6Z
julia> rings, projections = decompose_into_indecomposable_rings(R);
julia> length(rings)
4is_indecomposable — Method
is_indecomposable(R::FiniteRing) -> BoolReturn whether the finite ring $R$ is indecomposable.
Examples
julia> R = finite_ring([6, 6], [ZZ[1 0; 0 0], ZZ[0 0; 0 1]]); # Z/6Z x Z/6Z
julia> is_indecomposable(R)
false
julia> R, _ = finite_ring(matrix_algebra(GF(2), 2));
julia> is_indecomposable(R)
trueCreaton of elements
Elements of finite rings can be constructed by specifying the coordinates with respect to the additive additive generators or as linear combinations of the additive generators:
julia> R = finite_ring([6, 6], [ZZ[1 0; 0 0], ZZ[0 0; 0 1]]); # Z/6Z x Z/6Z
julia> x = R([1, 2])
Finite ring element [1, 2]
julia> e1, e2 = additive_generators(R);
julia> y = e1 + 2 * e2;
julia> x == y
trueConversion to other structures
Finite rings of prime characteristic can be converted to algebras using the isomorphism method:
julia> R, = finite_ring(GF(2)[small_group(8, 3)]);
julia> S = matrix_ring(R, 2);
julia> T, = finite_ring(S);
julia> f = isomorphism(MatAlgebra, R)
Map
from finite ring
to matrix algebra of dimension 8 over Prime field of characteristic 2
julia> f = isomorphism(StructureConstantAlgebra, R)
Map
from finite ring
to structure constant algebra of dimension 8 over GF(2)