mirror of
https://github.com/kalmarek/GroupRings.jl.git
synced 2025-01-01 11:45:28 +01:00
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
|
else
|
||||||
idx = findfirst(Y)
|
idx = findfirst(Y)
|
||||||
c = Y[idx]
|
c = Y[idx]
|
||||||
|
c == 0 || throw("Can not invert")
|
||||||
g = parent(Y).basis[idx]
|
g = parent(Y).basis[idx]
|
||||||
return X*1//c*parent(Y)(inv(g))
|
return X*1//c*parent(Y)(inv(g))
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
###############################################################################
|
###############################################################################
|
||||||
#
|
#
|
||||||
# *-involution
|
# *-involution
|
||||||
|
Loading…
Reference in New Issue
Block a user