Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add regular_character #3393

Merged
merged 6 commits into from
Feb 22, 2024
Merged
Show file tree
Hide file tree
Changes from 5 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions docs/src/Groups/group_characters.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down
46 changes: 44 additions & 2 deletions src/Groups/group_characters.jl
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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

Expand Down Expand Up @@ -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_character(character_table(G))
end

@doc raw"""
regular_character(tbl::GAPGroupCharacterTable)

Return the regular character of `tbl`.

# Examples
```jldoctest
julia> tbl = character_table(symmetric_group(3))
fingolfin marked this conversation as resolved.
Show resolved Hide resolved

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(group(tbl))
return class_function(tbl, val)
end

@doc raw"""
natural_character(G::PermGroup)

Expand Down
1 change: 1 addition & 0 deletions src/exports.jl
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 4 additions & 0 deletions test/Groups/group_characters.jl
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand Down
Loading