1
0
mirror of https://github.com/kalmarek/GroupRings.jl.git synced 2024-12-29 11:00:28 +01:00

throw if dividing by a non-unit

This commit is contained in:
kalmar 2017-07-11 22:37:53 +02:00
parent 7ce52c6997
commit 4e213c691d

View File

@ -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