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

some == issues for group elements and related objects #4191

Open
ThomasBreuer opened this issue Oct 10, 2024 · 5 comments
Open

some == issues for group elements and related objects #4191

ThomasBreuer opened this issue Oct 10, 2024 · 5 comments
Labels
enhancement New feature or request topic: groups

Comments

@ThomasBreuer
Copy link
Member

The change proposed in Nemocas/AbstractAlgebra.jl/pull/1853 has raised some questions about perhaps missing == methods in Oscar's code for groups.

  • We have == methods for two BasisGAPGroupElems and for two MatrixGroupElems. Other cases were handled up to now by a generic method that returns false, but with Add generic == error Nemocas/AbstractAlgebra.jl#1853 we will have to deal with more cases. One addition can be a == method for two GAPGroupElems that returns false.
  • A more subtle question (which is interesting independent of Add generic == error Nemocas/AbstractAlgebra.jl#1853) is about the relation between elements of automorphism groups and the corresponding group homomorphisms.
    • It is likely that users want to compare an automorphism group element and a group homomorphism via == --our tests contain already such cases. We want to return false (this happens now) or throw an exception (but then with a meaningful error message). Thus we need special methods for this situation.
    • It is documented that h in A shall return false for a group homomorphism h and a group A of automorphisms, also if there is an element of A that is equal to h as a map on A.
      If we want to keep this definition then what is a good way to decide if A(h) will throw an exception or return the corresponding element of A?
      (In the related situation g in H where H is a subgroup of the parent of g, we had decided that g in H should return true if H(g) would be successful, i.e., that g in H is the natural way to ask this question.)
    • A related question about elements of automorphism groups:
      They can be used as maps in the sense that they have a domain, and one can ask for images and preimages. But they aren't Maps (and they do not have a codomain) -- is there a good reason why?
@ThomasBreuer ThomasBreuer added enhancement New feature or request topic: groups labels Oct 10, 2024
@fingolfin
Copy link
Member

One addition can be a == method for two GAPGroupElems that returns false.

But why do we need that, where do we compare group elems like that? The one legit case I can think of are PcGroupElems vs. SubPcGroupElems (and similar for fp groups) but for those we could provide dedicated methods?

@fieker
Copy link
Contributor

fieker commented Oct 11, 2024 via email

@ThomasBreuer
Copy link
Member Author

But why do we need that,

For consistency reasons:

julia> g = symmetric_group(3)  # perm. group
Sym(3)

julia> h = small_group(24,12)  # pc group
Pc group of order 24

julia> m = GL(2,3)  # matrix group
GL(2,3)

julia> g[1] == h[1]  # the method for BasisGAPGroupElem
false

julia> g[1] == m[1]  # the generic method from AbstractAlgebra
ERROR: == is not implemented for the given types
[...]

Either we forbid g[1] == h[1], or we let g[1] == m[1] return false.

@fieker
Copy link
Contributor

fieker commented Oct 11, 2024

We need to forbid the spurious "false", in general they mask programming errors

@ThomasBreuer
Copy link
Member Author

We need to forbid the spurious "false", in general they mask programming errors

O.k., then the breaking change from Nemocas/AbstractAlgebra.jl#1853 is the right opportunity for this change. I will create a pull request for that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request topic: groups
Projects
None yet
Development

No branches or pull requests

3 participants