Skip to content

Conversation

@varuntrehan7
Copy link
Contributor

The original issue also mentions extending group(...) to other generator types
(e.g. matrix generators or GAP groups). So far i have only added
permutation generators to keep the change small and reviewable.

i will add them next, thanks!

@fingolfin fingolfin changed the title Add a function group() which produces Oscar groups from various inputs Add new function group which constructs groups from various inputs Jan 8, 2026
@fingolfin fingolfin added enhancement New feature or request topic: groups release notes: use title For PRs: the title of this PR is suitable for direct use in the release notes labels Jan 8, 2026
@fingolfin fingolfin requested a review from ThomasBreuer January 8, 2026 10:12
Copy link
Member

@ThomasBreuer ThomasBreuer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Eventually, the new meaning of group should be documented, with a remark that for "higher level objects" such as cosets, transversals, or invariant rings, calling group means to fetch a stored group.

@test degree(G2) == 4

@test order(G1) == order(G2)
@test is_isomorphic(G1, G2)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
@test is_isomorphic(G1, G2)
@test G1 == G2

We want that the two permutation_group results have the same elements, not just that the two groups are abstractly isomorphic.


@test order(H1) == order(G1)
@test is_isomorphic(H1, G1)
@test is_isomorphic(H2, G2)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

see above

isempty(gs) && throw(ArgumentError("need at least one generator"))
n = maximum(degree, gs)
return permutation_group(n, PermGroupElem[gs...])
end
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wouldn't the two new permutation_group methods better be added to perm.jl, where the method for the case of a prescribed degree is?
(And the docstring for that method could be extended in order to cover the case that no degree is given.)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

okay got it, thankyou for the suggestion.

@varuntrehan7
Copy link
Contributor Author

Eventually, the new meaning of group should be documented, with a remark that for "higher level objects" such as cosets, transversals, or invariant rings, calling group means to fetch a stored group.

Thankyou for your response, I agree. once the semantics of group are clearer, this would be good to document.

Copy link
Member

@ThomasBreuer ThomasBreuer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, thanks.

@varuntrehan7
Copy link
Contributor Author

also, the original issue mentioned extending group(...) to other generator types
(e.g. matrix generators or GAP groups), do i make a different PR for that or continue in this. thanks!

@lgoettgens
Copy link
Member

@varuntrehan7 Once you think that you have reacted to all comments, please mark this PR as "ready to review". This not only applies to this PR, but also to most of your other ones

@varuntrehan7
Copy link
Contributor Author

@varuntrehan7 Once you think that you have reacted to all comments, please mark this PR as "ready to review". This not only applies to this PR, but also to most of your other ones

i will do that, thanks!

@varuntrehan7 varuntrehan7 marked this pull request as ready for review January 13, 2026 00:19
@varuntrehan7 varuntrehan7 marked this pull request as draft January 14, 2026 13:27
@varuntrehan7
Copy link
Contributor Author

i will now work to add matrix groups before we merge permutation groups so if there are any complications we can clear them up together, thus converted this back to a draft. Thanks!

@varuntrehan7
Copy link
Contributor Author

i added matrix groups @ThomasBreuer, please have a look. Thanks!

Copy link
Member

@ThomasBreuer ThomasBreuer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

perhaps one small change in the delegation

group(gs::AbstractVector{<:PermGroupElem}) = permutation_group(gs)

# Matrix group from matrix generators
group(g::MatElem, gs::MatElem...) = group(MatElem[g, gs...])
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
group(g::MatElem, gs::MatElem...) = group(MatElem[g, gs...])
group(g::MatElem, gs::MatElem...) = matrix_group(MatElem[g, gs...])

@fieker
Copy link
Contributor

fieker commented Jan 14, 2026 via email

@varuntrehan7
Copy link
Contributor Author

On Wed, Jan 14, 2026 at 08:33:30AM -0800, Thomas Breuer wrote: @ThomasBreuer approved this pull request. perhaps one small change in the delegation > @@ -102,6 +102,14 @@ and false otherwise. """ @gapattribute is_isomorphic_to_alternating_group(G::GAPGroup) = GAP.Globals.IsAlternatingGroup(GapObj(G))::Bool +# Generic group convenience: for permutations that agrees with permutation_group +group(g::PermGroupElem, gs::PermGroupElem...) = permutation_group(g, gs...) +group(gs::AbstractVector{<:PermGroupElem}) = permutation_group(gs) + +# Matrix group from matrix generators +group(g::MatElem, gs::MatElem...) = group(MatElem[g, gs...]) suggestion group(g::MatElem, gs::MatElem...) = matrix_group(MatElem[g, gs...])
What about also adding check to pass it through to the matrix_group function?

-- Reply to this email directly or view it on GitHub: #5686 (review) You are receiving this because you are subscribed to this thread. Message ID: @.***>

good point, thanks. I have added the check.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request release notes: use title For PRs: the title of this PR is suitable for direct use in the release notes topic: groups

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants