mirror of
https://github.com/kalmarek/PropertyT.jl.git
synced 2024-12-25 10:20:30 +01:00
fix hacks around DirectProdCharacter
It should work over different groups as well
This commit is contained in:
parent
589e1882cd
commit
5bed58de2c
@ -15,8 +15,16 @@ struct PermCharacter <: AbstractCharacter
|
||||
p::Generic.Partition
|
||||
end
|
||||
|
||||
struct DirectProdCharacter <: AbstractCharacter
|
||||
i::Int
|
||||
struct DirectProdCharacter{N, T<:AbstractCharacter} <: AbstractCharacter
|
||||
chars::NTuple{N, T}
|
||||
end
|
||||
|
||||
function (chi::DirectProdCharacter)(g::DirectProductGroupElem)
|
||||
res = 1
|
||||
for (χ, elt) in zip(chi.chars, g.elts)
|
||||
res *= χ(elt)
|
||||
end
|
||||
return res
|
||||
end
|
||||
|
||||
function (chi::PermCharacter)(g::Generic.perm)
|
||||
@ -25,18 +33,11 @@ function (chi::PermCharacter)(g::Generic.perm)
|
||||
return Int(Nemo.Generic.MN1inner(R, p, 1, Nemo.Generic._charvalsTable))
|
||||
end
|
||||
|
||||
Nemo.isone(p::GroupElem) = p == parent(p)()
|
||||
|
||||
function Nemo.dim(χ::PropertyT.PermCharacter)
|
||||
G = PermutationGroup(sum(χ.p))
|
||||
return χ(G())
|
||||
end
|
||||
|
||||
## 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))
|
||||
end
|
||||
|
||||
for T in [PermCharacter, DirectProdCharacter]
|
||||
@eval begin
|
||||
function (chi::$T)(X::GroupRingElem)
|
||||
|
Loading…
Reference in New Issue
Block a user