mirror of
https://github.com/kalmarek/PropertyT.jl.git
synced 2024-12-26 10:35:29 +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
|
p::Generic.Partition
|
||||||
end
|
end
|
||||||
|
|
||||||
struct DirectProdCharacter <: AbstractCharacter
|
struct DirectProdCharacter{N, T<:AbstractCharacter} <: AbstractCharacter
|
||||||
i::Int
|
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
|
end
|
||||||
|
|
||||||
function (chi::PermCharacter)(g::Generic.perm)
|
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))
|
return Int(Nemo.Generic.MN1inner(R, p, 1, Nemo.Generic._charvalsTable))
|
||||||
end
|
end
|
||||||
|
|
||||||
Nemo.isone(p::GroupElem) = p == parent(p)()
|
|
||||||
|
|
||||||
function Nemo.dim(χ::PropertyT.PermCharacter)
|
function Nemo.dim(χ::PropertyT.PermCharacter)
|
||||||
G = PermutationGroup(sum(χ.p))
|
G = PermutationGroup(sum(χ.p))
|
||||||
return χ(G())
|
return χ(G())
|
||||||
end
|
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]
|
for T in [PermCharacter, DirectProdCharacter]
|
||||||
@eval begin
|
@eval begin
|
||||||
function (chi::$T)(X::GroupRingElem)
|
function (chi::$T)(X::GroupRingElem)
|
||||||
|
Loading…
Reference in New Issue
Block a user