one(GroupRing) returns multiplicative identity

This commit is contained in:
kalmar 2017-05-18 17:57:15 +02:00
parent e3fa702507
commit 92daac300b
1 changed files with 3 additions and 1 deletions

View File

@ -3,7 +3,7 @@ module GroupRings
using Nemo
import Nemo: Group, GroupElem, Ring, RingElem, parent, elem_type, parent_type
import Base: convert, show, hash, ==, +, -, *, //, /, length, norm, rationalize, deepcopy_internal, getindex, setindex!, eltype
import Base: convert, show, hash, ==, +, -, *, //, /, length, norm, rationalize, deepcopy_internal, getindex, setindex!, eltype, one
###############################################################################
#
@ -162,6 +162,8 @@ end
eltype(X::GroupRingElem) = eltype(X.coeffs)
one(RG::GroupRing) = RG(RG.group())
function generators(RG::GroupRing)
S = generators(RG.group)
S = unique([S..., [inv(s) for s in S]...])