From 92daac300ba16d5c0fedad1a513926004c775a32 Mon Sep 17 00:00:00 2001 From: kalmar Date: Thu, 18 May 2017 17:57:15 +0200 Subject: [PATCH] one(GroupRing) returns multiplicative identity --- src/GroupRings.jl | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/GroupRings.jl b/src/GroupRings.jl index 3918b9b..1d10354 100644 --- a/src/GroupRings.jl +++ b/src/GroupRings.jl @@ -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]...])