From 1fe66c1b6adde532858cd127c0b7d617861ed218 Mon Sep 17 00:00:00 2001 From: Tommy Hofmann Date: Tue, 20 Feb 2024 07:59:33 +0100 Subject: [PATCH 1/6] feat: add `regular_character` --- docs/src/Groups/group_characters.md | 2 ++ src/Groups/group_characters.jl | 46 +++++++++++++++++++++++++++-- src/exports.jl | 1 + test/Groups/group_characters.jl | 4 +++ 4 files changed, 51 insertions(+), 2 deletions(-) diff --git a/docs/src/Groups/group_characters.md b/docs/src/Groups/group_characters.md index f7618467996..2a1f42bb56a 100644 --- a/docs/src/Groups/group_characters.md +++ b/docs/src/Groups/group_characters.md @@ -140,6 +140,7 @@ orders_centralizers orders_class_representatives ordinary_table(tbl::GAPGroupCharacterTable) trivial_character(tbl::GAPGroupCharacterTable) +regular_character(tbl::GAPGroupCharacterTable) ``` ## Construct group characters from groups @@ -150,6 +151,7 @@ natural_character(G::Union{MatrixGroup{QQFieldElem}, MatrixGroup{AbsSimpleNumFie natural_character(G::MatrixGroup{T, MT}) where T <: FinFieldElem where MT natural_character(rho::GAPGroupHomomorphism) trivial_character(G::GAPGroup) +regular_character(G::GAPGRoup) ``` ## Operations for group characters diff --git a/src/Groups/group_characters.jl b/src/Groups/group_characters.jl index 4d9530f965a..a774866d38f 100644 --- a/src/Groups/group_characters.jl +++ b/src/Groups/group_characters.jl @@ -1673,7 +1673,7 @@ function class_function(tbl::GAPGroupCharacterTable, values::GapObj) return GAPGroupClassFunction(tbl, values) end -function class_function(tbl::GAPGroupCharacterTable, values::Vector{<:QQAbElem}) +function class_function(tbl::GAPGroupCharacterTable, values::Vector{<:Union{Integer, ZZRingElem, Rational, QQFieldElem, QQAbElem}}) gapvalues = GapObj([GAP.Obj(x) for x in values]) return GAPGroupClassFunction(tbl, GAPWrap.ClassFunction(GAPTable(tbl), gapvalues)) end @@ -1683,7 +1683,7 @@ function class_function(G::GAPGroup, values::GapObj) return GAPGroupClassFunction(character_table(G), values) end -function class_function(G::GAPGroup, values::Vector{<:QQAbElem}) +function class_function(G::GAPGroup, values::Vector{<:Union{Integer, ZZRingElem, Rational, QQFieldElem, QQAbElem}}) return class_function(character_table(G), values) end @@ -1724,6 +1724,48 @@ function trivial_character(G::GAPGroup) return class_function(G, [val for i in 1:Int(number_of_conjugacy_classes(G))]) end +@doc raw""" + regular_character(G::GAPGroup) + +Return the regular character of `G`. + +# Examples +```jldoctest +julia> G = symmetric_group(3); + +julia> values(regular_character(G)) +3-element Vector{QQAbElem{AbsSimpleNumFieldElem}}: + 6 + 0 + 0 +``` +""" +function regular_character(G::GAPGroup) + return regular_chacter(character_table(G)) +end + +@doc raw""" + regular_character(tbl::GAPGroupCharacterTable) + +Return the regular character of `G`. + +# Examples +```jldoctest +julia> tbl = character_table(symmetric_group(3)) + +julia> values(regular_character(tbl)) +3-element Vector{QQAbElem{AbsSimpleNumFieldElem}}: + 6 + 0 + 0 +``` +""" +function regular_character(tbl::GAPGroupCharacterTable) + val = ZZRingElem[0 for i in 1:length(tbl)] + val[1] = order(G) + return class_function(tbl, val) +end + @doc raw""" natural_character(G::PermGroup) diff --git a/src/exports.jl b/src/exports.jl index 6c764fdbddb..3f58a807edb 100644 --- a/src/exports.jl +++ b/src/exports.jl @@ -1264,6 +1264,7 @@ export register_morphism! export regular_120_cell export regular_24_cell export regular_600_cell +export regular_character export regular_triangulation export regular_triangulations export relations diff --git a/test/Groups/group_characters.jl b/test/Groups/group_characters.jl index 1b03f38d7f7..a14c037dd8c 100644 --- a/test/Groups/group_characters.jl +++ b/test/Groups/group_characters.jl @@ -844,6 +844,10 @@ end @test tr == t[end] @test tr == trivial_character(g) @test !is_faithful(tr) + re = regular_character(g) + @test coordinates(re) == degree.(t) + re = regular_character(t) + @test coordinates(re) == degree.(t) chi = t[2] @test chi isa Oscar.GAPGroupClassFunction @test chi[4] == t[2,4] From b0620f183c21a9b6d6587e5f6efe3016d750d9d7 Mon Sep 17 00:00:00 2001 From: Tommy Hofmann Date: Tue, 20 Feb 2024 13:31:51 +0100 Subject: [PATCH 2/6] Update src/Groups/group_characters.jl --- src/Groups/group_characters.jl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Groups/group_characters.jl b/src/Groups/group_characters.jl index a774866d38f..d8f1c95c077 100644 --- a/src/Groups/group_characters.jl +++ b/src/Groups/group_characters.jl @@ -1747,7 +1747,7 @@ end @doc raw""" regular_character(tbl::GAPGroupCharacterTable) -Return the regular character of `G`. +Return the regular character of `tbl`. # Examples ```jldoctest From 780430ceffd81b17b49e935dbcc8e353c18803e3 Mon Sep 17 00:00:00 2001 From: Tommy Hofmann Date: Tue, 20 Feb 2024 19:18:10 +0100 Subject: [PATCH 3/6] Update src/Groups/group_characters.jl --- src/Groups/group_characters.jl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Groups/group_characters.jl b/src/Groups/group_characters.jl index d8f1c95c077..afccf4cbe37 100644 --- a/src/Groups/group_characters.jl +++ b/src/Groups/group_characters.jl @@ -1741,7 +1741,7 @@ julia> values(regular_character(G)) ``` """ function regular_character(G::GAPGroup) - return regular_chacter(character_table(G)) + return regular_character(character_table(G)) end @doc raw""" From e924a63c41a850120d8da2d0f4ddb2b47554d2f7 Mon Sep 17 00:00:00 2001 From: Tommy Hofmann Date: Tue, 20 Feb 2024 19:37:34 +0100 Subject: [PATCH 4/6] Update docs/src/Groups/group_characters.md --- docs/src/Groups/group_characters.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/src/Groups/group_characters.md b/docs/src/Groups/group_characters.md index 2a1f42bb56a..5f0f6dcafd2 100644 --- a/docs/src/Groups/group_characters.md +++ b/docs/src/Groups/group_characters.md @@ -151,7 +151,7 @@ natural_character(G::Union{MatrixGroup{QQFieldElem}, MatrixGroup{AbsSimpleNumFie natural_character(G::MatrixGroup{T, MT}) where T <: FinFieldElem where MT natural_character(rho::GAPGroupHomomorphism) trivial_character(G::GAPGroup) -regular_character(G::GAPGRoup) +regular_character(G::GAPGroup) ``` ## Operations for group characters From 0ca4853721d649f01652dbe0fc11963eae8245da Mon Sep 17 00:00:00 2001 From: Tommy Hofmann Date: Tue, 20 Feb 2024 20:07:19 +0100 Subject: [PATCH 5/6] Update src/Groups/group_characters.jl --- src/Groups/group_characters.jl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Groups/group_characters.jl b/src/Groups/group_characters.jl index afccf4cbe37..e24d021b662 100644 --- a/src/Groups/group_characters.jl +++ b/src/Groups/group_characters.jl @@ -1762,7 +1762,7 @@ julia> values(regular_character(tbl)) """ function regular_character(tbl::GAPGroupCharacterTable) val = ZZRingElem[0 for i in 1:length(tbl)] - val[1] = order(G) + val[1] = order(group(tbl)) return class_function(tbl, val) end From e670fe121e9b0cccfc6824ff8810a8b08d89def0 Mon Sep 17 00:00:00 2001 From: Max Horn Date: Thu, 22 Feb 2024 15:37:23 +0100 Subject: [PATCH 6/6] Update src/Groups/group_characters.jl --- src/Groups/group_characters.jl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Groups/group_characters.jl b/src/Groups/group_characters.jl index e24d021b662..57032202148 100644 --- a/src/Groups/group_characters.jl +++ b/src/Groups/group_characters.jl @@ -1751,7 +1751,7 @@ Return the regular character of `tbl`. # Examples ```jldoctest -julia> tbl = character_table(symmetric_group(3)) +julia> tbl = character_table(symmetric_group(3)); julia> values(regular_character(tbl)) 3-element Vector{QQAbElem{AbsSimpleNumFieldElem}}: