throw if dividing by a non-unit
This commit is contained in:
parent
7ce52c6997
commit
4e213c691d
|
@ -387,10 +387,12 @@ function divexact{T}(X::GroupRingElem{T}, Y::GroupRingElem{T})
|
|||
else
|
||||
idx = findfirst(Y)
|
||||
c = Y[idx]
|
||||
c == 0 || throw("Can not invert")
|
||||
g = parent(Y).basis[idx]
|
||||
return X*1//c*parent(Y)(inv(g))
|
||||
end
|
||||
end
|
||||
|
||||
###############################################################################
|
||||
#
|
||||
# *-involution
|
||||
|
|
Loading…
Reference in New Issue