From 0d20df8207d640cec24408d1d8edf04ed2463ff5 Mon Sep 17 00:00:00 2001 From: kalmarek Date: Thu, 16 Nov 2017 20:01:12 +0100 Subject: [PATCH] add dim function for Characters --- src/Projections.jl | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/Projections.jl b/src/Projections.jl index 8990ae6..81d856f 100644 --- a/src/Projections.jl +++ b/src/Projections.jl @@ -22,6 +22,11 @@ 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))