Add character_degrees for a given group or character table, or for given invariants of a finite abelian group and finite field#5453
Conversation
as suggested by Claus
- use `Oscar.DiscLog.element_of_given_order` - work with a smaller field `L` (somehow this idea had been lost in the previous version)
- for a given group of character table, delegate to GAP - for given invariants of a finite abelian group and finite field, use Julia code
|
The failures happen with Julia nightly, they are not related to the proposed changes. |
character_degreescharacter_degrees for a given group or character table, or for given invariants of a finite abelian group and finite field
|
Since this adds a new function, I think it should appear in the manual, so I adjusted the labels and title accordingly. I'll leave it to @fieker to review and approve, as this functionality he requested, I think? |
|
One question to @fieker is whether |
|
|
||
| # for invariant lists of abelian groups, and order of a finite field | ||
| D = character_degrees([3, 3, 5], 2) | ||
| @test sort(collect(D)) == sort(collect(MSet([1, 2, 4], [1, 4, 9]))) |
There was a problem hiding this comment.
isn't == defined for MSet s? If not that is the problem... This seems to work as expected:
julia> ==(MSet([1]), MSet([2]))
false
julia> ==(MSet([1]), MSet([1]))
true
julia> ==(MSet([1]), MSet([1,1]))
false
julia> ==(MSet([1]), MSet([1,1]))
false
julia> ==(MSet([1,1]), MSet([1,1]))
true
The doc tests are tricky...
There was a problem hiding this comment.
Concerning the comparisons:
What we can do is this.
D = character_degrees([3, 3, 5], 2)
@test D == MSet(ZZRingElem[1, 2, 4], [1, 4, 9])
Concerning the doctests:
If the ordering of the entries in the show result for MSets is not safe then it is better not to show these MSets at all in doctests. (Would it then make sense to introduce a sorted variant for the case that the keys can be sorted?)
|
On Mon, Oct 20, 2025 at 08:39:00AM -0700, Thomas Breuer wrote:
@ThomasBreuer commented on this pull request.
> ***@***.*** "character degrees" begin
+ # for character tables
+ D = character_degrees(character_table("S5"))
+ @test sort(collect(D)) == [1, 1, 4, 4, 5, 5, 6]
+ @test D isa MSet{ZZRingElem}
+ D2 = character_degrees(Int, character_table("S5"))
+ @test sort(collect(D)) == sort(collect(D2))
+ @test D2 isa MSet{Int}
+ @test sort(collect(character_degrees(character_table("S5", 2)))) == [1, 4, 4]
+
+ # for groups
+ @test sort(collect(character_degrees(symmetric_group(5)))) == sort(collect(D))
+
+ # for invariant lists of abelian groups, and order of a finite field
+ D = character_degrees([3, 3, 5], 2)
+ @test sort(collect(D)) == sort(collect(MSet([1, 2, 4], [1, 4, 9])))
Concerning the comparisons:
What we can do is this.
```
D = character_degrees([3, 3, 5], 2)
@test D == MSet(ZZRingElem[1, 2, 4], [1, 4, 9])
```
Concerning the doctests:
If the ordering of the entries in the `show` result for `MSet`s is not safe then it is better not to `show` these `MSet`s at all in doctests. (Would it then make sense to introduce a sorted variant for the case that the keys can be sorted?)
I'd rather either
- not compare the output (can be done)
- show, by comparison that the result is correct (not using show)
But I don't like adding unnecessary complexity to the code just to
please the doc tests. My opinion.
…
--
Reply to this email directly or view it on GitHub:
#5453 (comment)
You are receiving this because you were mentioned.
Message ID: ***@***.***>
|
|
@ThomasBreuer tests still fail |
and use the documented `multiset` instead of `MSet`
add
character_degrees:and improve
_irred_abelian:Oscar.DiscLog.element_of_given_order, as suggested by Claus, and use this function in_irred_abelian(G::Oscar.GAPGroup, F::FinField),L(somehow this idea had been lost in the previous version)