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

add isomorphism #1243

Merged
merged 3 commits into from
Apr 7, 2022
Merged

add isomorphism #1243

merged 3 commits into from
Apr 7, 2022

Conversation

ThomasBreuer
Copy link
Member

This is a follow-up to #1182.

  • deprecate
    isomorphic_fp_group(G::GAPGroup),
    isomorphic_pc_group(G::GAPGroup),
    isomorphic_perm_group(G::GAPGroup)
    in favour of
    isomorphism(::Type{FPGroup}, G::GAPGroup)
    isomorphism(::Type{PcGroup}, G::GAPGroup)
    isomorphism(::Type{PermGroup}, G::GAPGroup)

  • deprecate also (the undocumented) isomorphic_group(::Type{T}, G::GAPGroup)
    (does not occur in tests) in favour of isomorphism

  • added
    isomorphism(::Type{FPGroup}, A::GrpAbFinGen)
    isomorphism(::Type{PcGroup}, A::GrpAbFinGen)
    isomorphism(::Type{PermGroup}, A::GrpAbFinGen)

  • moved _get_iso_function and isomorphic_group
    from sub.jl to homomorphisms.jl

  • added tests for new conversions

  • adjusted tests to use isomorphism instead of the deprecated versions

  • added (::Type{T})(G::GAPGroup)

This is a follow-up to #1182.

- deprecate
  `isomorphic_fp_group(G::GAPGroup)`,
  `isomorphic_pc_group(G::GAPGroup)`,
  `isomorphic_perm_group(G::GAPGroup)`
  in favour of
  `isomorphism(::Type{FPGroup}, G::GAPGroup)`
  `isomorphism(::Type{PcGroup}, G::GAPGroup)`
  `isomorphism(::Type{PermGroup}, G::GAPGroup)`

- deprecate also (the undocumented) `isomorphic_group(::Type{T}, G::GAPGroup)`
  (does not occur in tests) in favour of `isomorphism`

- added
  `isomorphism(::Type{FPGroup}, A::GrpAbFinGen)`
  `isomorphism(::Type{PcGroup}, A::GrpAbFinGen)`
  `isomorphism(::Type{PermGroup}, A::GrpAbFinGen)`

- moved `_get_iso_function` and `isomorphic_group`
  from `sub.jl` to `homomorphisms.jl`

- added tests for new conversions

- adjusted tests to use `isomorphism` instead of the deprecated versions

- added (::Type{T})(G::GAPGroup)
@fieker
Copy link
Contributor

fieker commented Apr 6, 2022

the old versin is used - at least the Galois stuff has to be adjusted as well

Return an isomorphism from `G` to a group of type `T`.
An exception is thrown if no such isomorphism exists.
"""
function isomorphism(::Type{T}, G::GAPGroup) where T <: Union{FPGroup, PcGroup, PermGroup}
Copy link
Member

Choose a reason for hiding this comment

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

Should we perhaps cache these isomorphisms, i.e.

Suggested change
function isomorphism(::Type{T}, G::GAPGroup) where T <: Union{FPGroup, PcGroup, PermGroup}
@attr function isomorphism(::Type{T}, G::GAPGroup) where T <: Union{FPGroup, PcGroup, PermGroup}

Copy link
Member Author

Choose a reason for hiding this comment

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

Caching is a good idea, but isomorphism takes two arguments, and @attr can deal only with unary functions.
(From this point of view, the old isomorphic_fp_group etc. were more suitable.)

Copy link
Member

Choose a reason for hiding this comment

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

Yeah, we can't just use @attr, but we can still "manually" implement that caching. Anyway, not in this PR.

Copy link
Member

@fingolfin fingolfin 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 to me. @fieker I've adjusted the Galois groups code, too

@@ -167,8 +167,7 @@ preimage(f::GAPGroupHomomorphism{S, T}, H::T) where S <: GAPGroup where T <: GAP
## Groups created by isomorphisms
Copy link
Member

Choose a reason for hiding this comment

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

I really don't like this section title. Though I also don't have a great alternative suggestion... perhaps just

Suggested change
## Groups created by isomorphisms
## Group isomorphisms

@fingolfin fingolfin merged commit e606f20 into oscar-system:master Apr 7, 2022
@ThomasBreuer ThomasBreuer deleted the TB_isomorphism_GrpAbFinGen branch April 8, 2022 08:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants