1
0
mirror of https://github.com/kalmarek/PropertyT.jl.git synced 2024-08-08 07:53:52 +02:00

add Nemo.isone(::GroupElem)

This commit is contained in:
kalmarek 2017-11-06 11:31:15 +01:00
parent 84813fedc4
commit 12c5c47ca8

View File

@ -20,6 +20,8 @@ function (chi::PermCharacter)(g::Nemo.perm)
return Int(Nemo.MN1inner(R, p, 1, Nemo._charvalsTable))
end
Nemo.isone(p::GroupElem) = p == parent(p)()
## NOTE: this works only for Z/2!!!!
function (chi::DirectProdCharacter)(g::DirectProductGroupElem)
return reduce(*, 1, ((-1)^isone(g.elts[j]) for j in 1:chi.i))